Feedback needed for automatic overlay partition creation #1736
Replies: 7 comments 4 replies
-
How hard would it be to add Btrfs? I could see some interesting use-cases around being able to use
From the Linux distribution perspective, I would prefer things to work automatically. So I would go with option 1 rather than option 2. The problem with option 2 is that it makes the warning not show up at all with ISOs and that would make it difficult for when an ISO is burned to a USB stick unless we modified the image as part of flashing it (which people generally don't do anymore).
The tight coupling is pretty convincing to me that we should just merge it into the main module. |
Beta Was this translation helpful? Give feedback.
-
I've jerry rigged a Fedora ISO to use a Btrfs root, and the existing |
Beta Was this translation helpful? Give feedback.
-
It was very easy to add btrfs support, so I've gone ahead and done that. This does add about half a megabyte to the initramfs image size, due to the inclusion of |
Beta Was this translation helpful? Give feedback.
-
I've discovered a potential edge case bug: the overlay partition is created based on percentages to allow A simple fix is to check if the partition start is 100% before attempting to create the partition and cleanly exit, similarly to how it already behaves if there's absolutely no free space on the device. I've just pushed this change to my overlay-test project. However, should it go one step further and enforce a certain minimum amount of free space? That could prevent confusion on the user's part. For example, if you wrote a 3.9G ISO to a 4G USB stick, it'd only have 100MB of space for overlay contents, which could lead to system instability pretty quickly. Should the initramfs really make that type of decision, though? It's unlikely that we could come up with a truly universal minimum free space percentage. It seems like individual projects that use this module should just document the minimum supported USB disk size in their system requirements. |
Beta Was this translation helpful? Give feedback.
-
I've been taking a look at merging my Currently,
The dependencies for
Should I keep |
Beta Was this translation helpful? Give feedback.
-
I've addressed all the concerns brought up in this discussion and opened a pull request: |
Beta Was this translation helpful? Give feedback.
-
The pull request has been merged and the new module is available in the master branch: |
Beta Was this translation helpful? Give feedback.
-
I made a Dracut module that creates an overlay partition for dmsquash-live and would like to contribute it to dracut.
It creates the overlay partition if the
rd.live.overlay
kernel parameter references a partitionLABEL
. The user can optionally specify which filesystem to use for the overlay partition. Currently, ext4, xfs, and btrfs are supported.A Kiwi image description that builds an ISO image containing the module is available here:
https://github.com/iammattcoleman/overlay-test
The dracut module is located here:
https://github.com/iammattcoleman/overlay-test/tree/main/image-description/root/usr/lib/dracut/modules.d/85create-overlay
This is my first time writing a dracut module, so please go over it with a fine-toothed comb.
In addition to an initial code review, I'm curious what you think about these remaining concerns that I've got:
When booting on read-only media (E.G. the ISO image attached to a VM's virtual CD-ROM drive) with the
rd.live.overlay
parameter set, the boot process halts with an error about not being able to locate the persistence partition.I anticipate that this would be a common scenario. For instance, distributions' live/installer ISO images would want to cleanly boot on both read-only and read-write media.
In order to facilitate that behavior, which of the following approaches would be preferable?
This should work as-is if I just open a pull request to add my
85create-overlay
module to dracut. However, it's very tightly coupled to the dmsquash-live module.Should this functionality be directly included in the dmsquash-live module instead of a separate module?
Beta Was this translation helpful? Give feedback.
All reactions