GNU bug report logs - #40514
Should we shrink the installer by a gig or so?

Previous Next

Package: guix-patches;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Wed, 8 Apr 2020 20:57:01 UTC

Severity: normal

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40514 in the body.
You can then email your comments to 40514 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#40514; Package guix-patches. (Wed, 08 Apr 2020 20:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 08 Apr 2020 20:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Guix-patches via <guix-patches <at> gnu.org>
Subject: Should we shrink the installer by a gig or so?
Date: Wed, 08 Apr 2020 22:56:27 +0200
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40514; Package guix-patches. (Wed, 08 Apr 2020 21:02:01 GMT) Full text and rfc822 format available.

Message #8 received at 40514 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 40514 <at> debbugs.gnu.org
Subject: [PATCH] vm: Transparently compress iso9660 images.
Date: Wed,  8 Apr 2020 23:01:32 +0200
* 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"
-- 
2.25.2





Information forwarded to guix-patches <at> gnu.org:
bug#40514; Package guix-patches. (Thu, 09 Apr 2020 21:35:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Tobias Geerinckx-Rice via Guix-patches via <guix-patches <at> gnu.org>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 40514 <at> debbugs.gnu.org
Subject: Re: [bug#40514] [PATCH] vm: Transparently compress iso9660 images.
Date: Thu, 9 Apr 2020 23:34:39 +0200
[Message part 1 (text/plain, inline)]
Hi T G-R,

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

> * 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.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40514; Package guix-patches. (Thu, 09 Apr 2020 21:35:02 GMT) Full text and rfc822 format available.

Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Fri, 10 Apr 2020 00:03:01 GMT) Full text and rfc822 format available.

Notification sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
bug acknowledged by developer. (Fri, 10 Apr 2020 00:03:02 GMT) Full text and rfc822 format available.

Message #19 received at 40514-done <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 40514-done <at> debbugs.gnu.org
Subject: Re: [bug#40514] [PATCH] vm: Transparently compress iso9660 images.
Date: Fri, 10 Apr 2020 02:02:27 +0200
[Message part 1 (text/plain, inline)]
Danny,

Danny Milosavljevic 写道:
> Tested it and it works

Thanks!  Pushed as 26c1bd9dfafb5a954d2174b7a000304cd7ae6345.

> 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
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 08 May 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 127 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.