dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
606 stars 400 forks source link

overlayfs LiveOS question #686

Closed udeved closed 4 years ago

udeved commented 5 years ago

I am working on replacing our live mkinitcpio with live dracut.

Our iso has two layers, a rootfs and a overlay "livefs" to throw away when the installer extracts rootfs.

Now the question, is it possible to mount the livefs overlay with dracut on livecd?

All I get is an overlayfs mounted root, but dracut always mounts an empty overlay tmpfs. I can't seem to find documentation if and how and where to put the overlay livefs.img in the iso layout.

I am pretty flexible as to how to deploy img files, no matter it is a squash embedded ext img, a flat squash or a direct ext4 img.

Currently, the squashfs.img is a flat squash rootfs. But what do I chose for the overlay?

Any help would be appreciated.

udeved commented 5 years ago

Atm, I am trying with these args

rdargs: root=live:LABEL=ARTIX_201911 rd.live.overlay=LABEL=ARTIX_201911:/livefs.img rd.live.overlay.overlayfs=1 rd.live.image ro rd.debug

udeved commented 5 years ago

After looking a bit at the dmsquashlive code, it looks like what I want is not supported by dracut.

I basically want a lower join of the root, like lower=livefs:rootfs.

This would also make it possible to run a console only rootfs joined with a desktop layer, ie bootloader could have multiple entries with different desktops to start.

udeved commented 5 years ago

Ok, I have made a hacky patch to support a union join on the rootfs.

I added rd.live.join, but I am entirely unsure about any side effects with other setups.

I can send a PR, but this would have to be properly tested, however, for my purposes, it works.

haraldh commented 4 years ago

seems like https://github.com/dracutdevs/dracut/pull/687 is your PR