-
Notifications
You must be signed in to change notification settings - Fork 401
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
Live system multiple overlays #2597
Comments
@mid-kid How do you feel about using systemd-sysext or you prefer a solution not using systemd ? |
First time hearing of it, but it doesn't seem to be what I want. Not only because the image I'm building doesn't have systemd, but also simply because I intend to add files to /var and /etc, and both of these directories should remain writable through a tmpfs at runtime, like dracut sets them up to be. That said, you're right in that it doesn't need to be handled in the initrd stage, I could do it in an early stage of booting after the rootfs kicks in. The thing is that I'd have to undo the dracut mounts which might break whatever dracut's doing to mount a persistent overlay. I wonder, is anyone using the systemd-sysext program in a livecd context? I wonder what that'd look like, honestly. |
Somewhat related, dracut can generate initramfs that prepares an overlay and copies over files from /updates - see https://github.com/dracutdevs/dracut/blob/master/modules.d/90dmsquash-live/apply-live-updates.sh . CC @FGrose |
Oh! That looks like a possible solution. It'd require more ram, but that's acceptable for small customizations. I'm just unable to find any documentation about it. |
There is a bit of information in the original commit message (which is over 10 years old) - f116ca1 The This can be used in combination of the idea is that some boot-loaders (e.g. grub) allows to specify more than one initramfs files - see https://www.gnu.org/software/grub/manual/grub/grub.html#index-initrd So instead of several squashfs files, you would have several cpio files - maybe one or more with optional /updates/* If this is working for you, than we would welcome contributions to improve the documentation (or perhaps even dracut tests) :-) |
Thanks @LaszloGombos
And for the documentation you are referring to:
Could you please elaborate on how one should be taking advantage of apply-live-updates.sh ? so that "dracut generates an intramfs that prepares an overlay and copies over files from /updates" ? Let's say I've downloaded Fedora Workstation 39 Live ISO onto my LiveUSB and wanting to use this method to include openssl or add custom modules like @mid-kid 's or insert custom files to be included in the Live System:
|
The idea is to make a cpio image with just an /updates directory, and chain it when loading the linux kernel (linux supports stacking multiple initrd files on top of eachother). The files then get copied from /updates into the tmpfs overlay of the running system, effectively overriding whatever is in the squashfs/base image. Anyway, I might use this soon as I found a computer on which my live system won't run unless I bump the kernel... might add an early-boot script to bind-mount a new /lib/modules instead of sticking it all into tmpfs though. |
Describe the enhancement
I want to be able to mount multiple root=live: squashfs filesystems on top of eachother.
This would allow me to add custom modules to my liveUSB without rebuilding the whole thing, and having one image that I can reuse across multiple variants.
Though primarily the purpose is making the customizations more easily introspectable.
There's been a previous issue and PR for this, but it fell out of favor: #686 #687
The text was updated successfully, but these errors were encountered: