Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option for persistent de-compression of SquashFS during first boot #32714

Open
adrelanos opened this issue May 8, 2024 · 1 comment
Open
Labels
RFE 🎁 Request for Enhancement, i.e. a feature request

Comments

@adrelanos
Copy link

Component

No response

Is your feature request related to a problem? Please describe

Most Linux distributions ship:

  • ISO images, that
  • are uncompressed but,
  • contain a SquashFS (compressed archive).

In Fitting Everything Together you mentioned:

Live Systems vs. Installer Systems vs. Installed Systems

In my model I'd like to remove the distinction between these three concepts as much as possible: each of these three images should carry the exact same /usr/ file system, and should be suitable to be replicated the same way.

And that is a great plan!

One obstacle I am seeing there is that most Linux distributions are using a SquashFS for their live and installer images. This is presumably so because the SquashFS is a highly compressed file system that saves download time, download traffic, and flashing time.

dracut also supports uncompressed live filesystem image (rootfs.img) but it is not used much because I guess then the ISO itself would need to be compressed.

Describe the solution you'd like

So why not have the best of both worlds? feature request:

The ability to have compressed SquashFS but when a specific kernel parameter is configured, de-compress it at first boot. Then delete the no longer needed SquashFS to save disk space.

Describe alternatives you've considered

  • Why not compress the raw image?
    • For usability reasons. Because most image to USB writer tools do not have native compression support. It requires an extra step from the user. It requires knowing it is compressed, installing, using a compression tool, finding the decompressed file on the file system.
    • Presumably hard to convince Linux distributions to drop their SquashFS and compress their ISO instead.
  • Why decompress the SquashFS? Why not keep the SquashFS?
    • Cannot be mounted as read-write, even if it could,
    • it's slower than not using a SquashFS.
  • Why not use overlays?
    • Complex. Requires more disk space. Not the usual simple disk layout.
  • mkosi-initrd feature: Does not belong there. (mkosi-initrd feature request: add option for persistent de-compression of SquashFS during first boot mkosi#2695)

The systemd version you checked that didn't have the feature you are asking for

No response

@adrelanos adrelanos added the RFE 🎁 Request for Enhancement, i.e. a feature request label May 8, 2024
@septatrix
Copy link
Contributor

Why decompress the SquashFS? Why not keep the SquashFS?

  • Cannot be mounted as read-write, even if it could,

So you want to create a new partition and copy the content of the squashfs onto it. Take a look at #27792 (which sadly is currently dormant)

  • it's slower than not using a SquashFS.

Not necessarily. SquashFS and even more so EROFS are quite fast, especially on non-SSD disks where reading and decompression on the fly is often faster than no decompressing but having to read more data. (For setting compression algo/level I opened #32737 just a few moments ago.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFE 🎁 Request for Enhancement, i.e. a feature request
Development

No branches or pull requests

2 participants