I am experimenting with an Archlinux VM and two virtual disks. I am trying to mount
/ as an OverlayFS with, for example:
sda1 containng the lowerdir and
sdb1 containing the upperdir and the workdir.
While learning how to use OverlayFS, I added an entry to
/etc/fstab to do mount this overlay in
/mnt/new_root. It works without issue.
I have found some solutions (on StackExchange) to mount
/ as overlayFS with
initramfs and I think I understand how they work. However, none of them mention editing
/etc/fstab and the archwiki does go into much details about the boot process.
To my understanding,
initramfs is only used to mount the root temporarily in read only before
init takes care of the rest.
So, I am wondering, will this line in
# /dev/sda1 UUID=<uuid> / ext4 rw,relatime,data=ordered 0 1
overwrite the overlay on
I guess it should be replaced with something like:
# /dev/sda1 UUID=<uuid> /lower ext4 rw,relatime,data=ordered 0 1
/dev/sdb1's line would require some editing too.)