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

mkosi-initrd feature request: add option for persistent de-compression of SquashFS during first boot #2695

Closed
adrelanos opened this issue May 8, 2024 · 1 comment

Comments

@adrelanos
Copy link

adrelanos commented May 8, 2024

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.

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.

  • 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.
@DaanDeMeyer
Copy link
Contributor

DaanDeMeyer commented May 8, 2024

mkosi-initrd only composes an initrd out of packages. We do not implement our own extra features like dracut or other initrd generators. Hence, if you want something like this, either propose it for systemd or some other package and install/configure that package in an initramfs generated with mkosi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants