Le 27/06/2022 à 09:13, Stephan a écrit :
Pascal Hambourg <pascal@xxxxxxxxxxxxxxx> writes:
Le 25/06/2022 à 19:10, Wols Lists wrote :
On 25/06/2022 14:35, Stephan wrote:
Does mdraid with metadata 1 work on the root filesystem w/o initramfs?
No. Why would one not use an initramfs ?
An initramfs adds unnecessary intransparency to the system.
An initramfs is already necessary if root|usr|hibernation swap is on LVM
or LUKS, if UUID or LABEL is used for root specification, with
merged+separated /usr... Some distributions do not support booting
without an initramfs any more.
If you're using v1.0, then you could boot off of one of the mirror
members no problem.
You would point the kernel boot line at sda1 say (if that's part of
your mirror). IFF that is mounted read-only for boot, then that's
not a problem.
Mounting read-only does not guarantee that there won't be any
write. See man mount(8)
(...)
Good point. Thus, there is no alternative to superblock 0.90 for root on
mdraid w/o initramfs. This is the answer to the question why somebody
(like me) may need to use superblock 0.90.
Your fstab would then mount /dev/md0 as root read-write
I don't think so. IME the root device in fstab is ignored, only the
options are used.
This is some of the intransparency. Will the / entry in the /etc/fstab
be copied to the initramfs to use it for mounting the real root
filesystem? You imply that this is the case but the device will be
ignored. Why?
There are different kind of initramfs out there, and I don't know them
all. I can only speak about the initramfs built by initramfs-tools used
by default in Debian and derivatives.
AFAIK, /etc/fstab is not copied into the initramfs. The initramfs uses
only the command line parameters (root=, rootfstype=, rootflags=,
ro|rw...) to mount the real root filesystem, then hands over to the real
root init.
At some point, init remounts the root filesystem (mount -o remount /) to
apply the mount options in /etc/fstab (this is usually when ro is
changed to rw). Remount does not change the root device.