Should we shrink the installer by a gig or so?

  • Done
  • quality assurance status badge
Details
2 participants
  • Danny Milosavljevic
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
Tobias Geerinckx-Rice
Severity
normal
T
T
Tobias Geerinckx-Rice wrote on 8 Apr 2020 22:56
(name . Guix-patches via)(address . guix-patches@gnu.org)
87zhblofwk.fsf@nckx
Guix,

I've met at least someone who was worried that Guix wouldn't
support their System ‘because the installer fell back to text
mode’. They didn't mean nomodeset: obviously a 1.5-GiB ISO must
be hiding a full desktop somewhere, not just the interface of a
text-mode netinstaller image about 2.5% its total size:

$ du -h Downloads/trisquel-netinst_8.0_amd64.iso
37M …

$ du -h /gnu/store/l005v0ssz34gz5mrg3vpr51sq8sry8wp-image.iso
1.5G …

Now I'm not suggesting we add Gnome (yet), but how about reducing
the size by 60% for 1.1.0?

du -h /gnu/store/jcpg5wsflpymiq3vx929wq2cr0qbw44f-image.iso
561M …

Our CD image finally fits on a CD! Remember those? I try not to.

It also fits onto the ~100 1-‘GB’ USB drives I have in a box and
can now finally give away as Guix installers.

Zisofs is a somewhat obscure, Linux-specific extension to Rock
Ridge that transparently (de)compresses file data using zlib. Our
linux-libre already supports it. As far as the system is
concerned it's just a regular iso9660 file system.

Unlike squashfs (with which I'm currently playing) it requires
zero further changes to the creation or boot process that could
introduce new bugs. Hence I'm hopeful that this can be tested and
merged in time for the next release.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl6OOnsACgkQ2Imw8BjF
STyrKA//SwprnvDEbo6IPbbdgPDbd+Dz9apL4n1cDcNtBwv1uHOShMl8fEXkjWgC
4fG0dI/+VtXucVCSCG6hAIlgbo5O+3rncl+RenYkJg1VWqKBeSOgugSiNe7mFi2+
3zl06jJVzUpwW4geQOWcNXGO32a0axSwFXc/LZLiC+Uf/rZmCSG976bXyHUMcyMx
pjl4PzcdeaIRka4jkuqvt3+CQKPYKn5+czhoVZjZouV5VNfHDSafBkFWOr/ZjW4W
bIbTpGLVWWNOJzHRWHz9LPKiPxeoDoLV7Vz1ZWmAf0m3HezGew4wk4zOk3nPifcx
I2nFIfFAKD/zATNXtrnw3hjB61aWgEkG8PW4kLUhZRAS2YT+MYpu8Y9Ymg1e9AiF
m37ecV15jEczscUfOWJGexeK7OIeKvGs2iNgzoNAvcDoTJ7RqhLnzQZQVc7zPoqS
a4jBgiNyQQ6BjVJbTJEGunr6s/itF3CdIih3EYeflEi/hyxwIMNpN+9eoPAu87kC
FMZVfp8tJhTTnPilNK4kKbVQPbJsW7XJZwoiiiSypb8zenYrqKNDnVVfLy0b7vG1
baOzhR069+K5orpSrH+QnRuG5XUBByJB731OO6YLhaWBZVjTOFfgvQde4mL01OU6
DY0KFZLuB+R7tdryfO/wU2NSz91bkPFm8yPXDBuF/B1I6/Tt9bA=
=+mT+
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 8 Apr 2020 23:01
[PATCH] vm: Transparently compress iso9660 images.
(address . 40514@debbugs.gnu.org)
20200408210132.23612-1-me@tobias.gr
* gnu/build/vm.scm (make-iso9660-image): Use the ‘--zisofs’ xorriso
filter at the highest compression settings for supported directories.
---
gnu/build/vm.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 79eed48c1f..972eb4bdf9 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -533,6 +533,24 @@ GRUB configuration and OS-DRV as the stuff in it."
;; Set all timestamps to 1.
"-volume_date" "all_file_dates" "=1"
+ ;; ‘zisofs’ compression reduces the total image size by ~60%.
+ "-zisofs" "level=9:block_size=128k" ; highest compression
+ ;; It's transparent to our Linux-Libre kernel but not to GRUB.
+ ;; Don't compress the kernel, initrd, and other files read by
+ ;; grub.cfg, as well as common already-compressed file names.
+ "-find" "/" "-type" "f"
+ ;; XXX Even after "--" above, and despite documentation claiming
+ ;; otherwise, "-or" is stolen by grub-mkrescue which then chokes
+ ;; on it (as ‘-o …’) and dies. Don't use "-or".
+ "-not" "-wholename" "/boot/*"
+ "-not" "-wholename" "/System/*"
+ "-not" "-name" "unicode.pf2"
+ "-not" "-name" "bzImage"
+ "-not" "-name" "*.gz" ; initrd & all man pages
+ "-not" "-name" "*.png" ; includes grub-image.png
+ "-exec" "set_filter" "--zisofs"
+ "--"
+
"-volid" (string-upcase volume-id)
(if volume-uuid
`("-volume_date" "uuid"
--
2.25.2
D
D
Danny Milosavljevic wrote on 9 Apr 2020 23:34
(name . Tobias Geerinckx-Rice via Guix-patches via)(address . guix-patches@gnu.org)
20200409233439.69bf8943@scratchpost.org
Hi T G-R,

On Wed, 8 Apr 2020 23:01:32 +0200
Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org> wrote:

Toggle quote (36 lines)
> * gnu/build/vm.scm (make-iso9660-image): Use the ‘--zisofs’ xorriso
> filter at the highest compression settings for supported directories.
> ---
> gnu/build/vm.scm | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
> index 79eed48c1f..972eb4bdf9 100644
> --- a/gnu/build/vm.scm
> +++ b/gnu/build/vm.scm
> @@ -533,6 +533,24 @@ GRUB configuration and OS-DRV as the stuff in it."
> ;; Set all timestamps to 1.
> "-volume_date" "all_file_dates" "=1"
>
> + ;; ‘zisofs’ compression reduces the total image size by ~60%.
> + "-zisofs" "level=9:block_size=128k" ; highest compression
> + ;; It's transparent to our Linux-Libre kernel but not to GRUB.
> + ;; Don't compress the kernel, initrd, and other files read by
> + ;; grub.cfg, as well as common already-compressed file names.
> + "-find" "/" "-type" "f"
> + ;; XXX Even after "--" above, and despite documentation claiming
> + ;; otherwise, "-or" is stolen by grub-mkrescue which then chokes
> + ;; on it (as ‘-o …’) and dies. Don't use "-or".
> + "-not" "-wholename" "/boot/*"
> + "-not" "-wholename" "/System/*"
> + "-not" "-name" "unicode.pf2"
> + "-not" "-name" "bzImage"
> + "-not" "-name" "*.gz" ; initrd & all man pages
> + "-not" "-name" "*.png" ; includes grub-image.png
> + "-exec" "set_filter" "--zisofs"
> + "--"
> +
> "-volid" (string-upcase volume-id)
> (if volume-uuid
> `("-volume_date" "uuid"

LGTM!

Tested it and it works, and I see no downside either.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6PlO8ACgkQ5xo1VCww
uqVj+wgAkFhAurat+w5Q5wXLYbMiuAPHIKrYmcnztPYOogds4gA+8eEYxMCpQRI7
NQDDAYDsMSWof8hujpdUpGheinIsKwaWHkbBeJvL5J4lkdVoDX2+KWaWRH3q+2dw
R1N0ch7MG9hiNS3eVeqLPaK1f93SkH1E+9Cd749v0OoKJwsjdyiWfjh9JHa2Np6W
80H6qfLlC2pEyBctq13fA1BDMtnrDvF0Wd9BqbE0f0z6t5b+EDWHOAyfMDHcr1SC
JFc2eo922KMTD+RLie4uPsPADe9iKoSmOnu2Y7oi36ljFnC7maMVBJs0SQKQgE/h
IwPUZ+SQzar5SXDThq6ShAyhcYJy9w==
=pAhm
-----END PGP SIGNATURE-----


T
T
Tobias Geerinckx-Rice wrote on 10 Apr 2020 02:02
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 40514-done@debbugs.gnu.org)
87369c8ayg.fsf@nckx
Danny,

Danny Milosavljevic ???
Toggle quote (2 lines)
> Tested it and it works

Thanks! Pushed as 26c1bd9dfafb5a954d2174b7a000304cd7ae6345.

Toggle quote (2 lines)
> and I see no downside either.

We can now fit a Gnome 3 desktop on an image the size of the
previous installer. I'm sure someone considers that a downside.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl6Pt5MACgkQ2Imw8BjF
STyPag//dv6Jp/wtPN1LgCi7hYu3H2LWCEBocRFCtvSrXT7kVLapXtEjoF1A0f3r
jv9/AG23z6Q5duP27LypH+BZ0ZQKHzahcMjKplhxGtDfJNoW9v7QfglIuSBuM9Gx
h7zjw8f9TWfy85SPJzumx+Lhqqpw9tECHLJ7k5mYslVFT8TU1QRgWM1jfpn9zlcW
tbOhVE1xUlTjrkpJFcBqicEpIHs8nLSqmgcBOiI8aNf0iZwAZnmkh8WzUDmJKEZt
XpdcjMAhczReq3uXu5P5GPKvNHbrPtaHPvRiP6XOfDVO9vmIUwjgbARWaGdTe3Fg
gPcBEi2bhuazHDbX70kzXM066pcnrNoq11kjsgM1qQmnIGZ1oZnQo28f51IS7Vhz
IgzcQgFg7hZY29BZJi95tCVE6rEMWTG8zBeGDtxqThqil8KIoQCv45xipWmN87dW
eyxJ6Z8ViAapmgadzxf7TGyAWUGWZPTiJZCrGhGflOHRGeiIhLCr8AciRcZYfqQ5
uO8qUoMEAA55a7jnK2X1eGahVwEUjqScQaUqjWKhMwyhJ9aPndB7goWq9gUUJAJA
6VQFwNiVr4MLkLHKBIFZH0ZhgdXKXQDqPjvMjs4eRrWFLPWy03AEtvhv7aLdxknq
hHEi1cNFqyApWMRcMmMXHrA0HyDTlUXh2uQLiQdGIrGHDur3rBU=
=OCe0
-----END PGP SIGNATURE-----

Closed
?