The grub menu displayed as if the system knew which partition contains the bootloader. The root partition mounted by itself. Neither dmesg nor my init/process manager threw any errors. The boot partition was not mounted, neither was swap.

I did manually create an fstab from within the installed system and all is fine, so my question is purely academic. Do modern systems not need an fstab in order to know which devices and partitions to mount where?

  • Mactan@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    highly recommend setting up both grub and a second bootloader, it’s ok to have multiple! really handy when shtf

  • Courant d'air 🍃@jlai.lu
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    The root partition ID is in the grub configuration, it’s mounted when the system boots. Then fstab is read and the other partitions are mounted.

    fstab is needed for root mount options and other partitions, but as you saw with your system if the only partitions other than root are not needed to boot your system will boot fine (I don’t know which options grub uses when mounting root though)

  • deadbeef79000@lemmy.nz
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    Grub typically stores the uuid of the root filesystem in the kernel command line arguments (I can’t quite remember if that’s the right name it not).

    Have a look at the grub configuration when in the grub menu and you should see it there.

  • hades@feddit.uk
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    To be clear, grub itself doesn’t mount your root partition. Grub provides the root partition device path or id to the kernel via kernel command line. Then kernel mounts the root partition early in its boot sequence with a limited set of options (typically read only).

    Logically, the root partition should be mountable without fstab because otherwise it would be a chicken and egg problem :)

    Usually once the userspace starts, an init script will remount the root partition with its normal options from fstab.

    (It’s a bit more complicated if initramfs is involved, but the principle is the same).

    • printf("%s", name);@piefed.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      Thanks! I guess I need to read up on the boot process. 😅

      Logically, the root partition should be mountable without fstab because otherwise it would be a chicken and egg problem :) Don’t I have egg (or chicken???) on my face… 🤣

  • Static_Rocket@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    If the initramfs is using systemd, it’s actually able to look up the root (by label) and ESP partitions (by guid) automatically. GRUB can also detect the ESP and enumerate UKI images. There’s still some assumptions being made, but it’s cleaner than ever.