-
Notifications
You must be signed in to change notification settings - Fork 28
Root vs Fstab
Based on issue 62
To All: to clarify the "root= vs fstab" issue:
-
systemd
bootup sequence requires thatsysroot.mount
mount unit is defined by someone, somewhere -
there are 3 ways to define
sysroot.mount
:
A. auto-magically, with root=
+ fstab-generator
kernel-cmdline: root=... ---> fstab-gen ---> /run/systemd/generator/sysroot.mount
B. auto-magically, with /etc/fstab
+ fstab-generator
[initramfs]/etc/fstab ---> fstab-gen ---> /run/systemd/generator/sysroot.mount
C. manually, with user-provided mount unit file with a name sysroot.mount
[initramfs]/etc/systemd/system/sysroot.mount
-
A-vs-B-vs-C have different set of available features, (which also keeps changing over time);
A is more limited, B is more complete, and only C is the "real form",
which allows complete control over mount unit file -
in order to understand "how much magic" is done by
fstab-generator
,
you have to study fstab-generator.c -
usage examples:
A. that is what yourselves describe above about your various setups
B. that is what this project recommends in src/fstab
C. that is what is used by Case: Sysroot on Btrfs