Skip to content
Andrei Pozolotin edited this page Apr 23, 2020 · 3 revisions

Based on issue 62

To All: to clarify the "root= vs fstab" issue:

  1. systemd bootup sequence requires that sysroot.mount
    mount unit is defined by someone, somewhere

  2. 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
  1. 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

  2. in order to understand "how much magic" is done by fstab-generator,
    you have to study fstab-generator.c

  3. 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

Clone this wiki locally