Is the fstab entry for mounting / ignored?
I'm asking this because in the grub config /boot/grub/grub.cfg it is also specified how to mount /.
Example:
In my fstab it says something like this:
UUID=f252... / btrfs rw,noatime,subvol=/@,subvol=@ 0 0
But the package grub-btrfs has created a grub.cfg-entry with this in it:
linux "/vmlinuz-linux" root=UUID=f252... rw rootflags=subvol="@snapshots/4/snapshot" cryptdevice=UUID=22f...d3:cryptroot quiet processor.max_cstate=1
Notice the rootflags=subvol="@snapshots/4/snapshot" which specifies another subvolume than the one specified in fstab to be mounted. And it works perfectly fine, so to me it seems like fstab is just getting ignored.
About this post
- Posted
- Archived
- Score
- 13 · 100% up
- Kind
- Text
- ID
- fda3vs
8 comments
It's not getting ignored, certain options just can't get changed with a simple remount. Imagine what would happen if the system would remount a different subvolume to / while the system is running. Boom!, madness ensues, flames everywhere!
If it is used then it is bootloader dependend. I am quite sure that in my setup, with systemd-boot, it is unused.
This has nothing to do with any particular bootloader, the behavior is the same.
If you don't need to remount the /-fs with different options after switch_root then you shouldn't have an entry for it in fstab, it's redundant.
Ok, so it is not getting completely ignored, it's just that the kernel flags precedence over the fstab entry. So the noatime in my fstab is still being used.
Did I understand that correctly?
You can check the effective mount-options with either
mountorfindmnt /.Not really, what's already running will continue to run as it did. Why should it change? We're not on Windows here.
Programs you call out of your $PATH and contents of your home dir will obviously be different depending on what the other subvol contains but I can't think of much that'd break.
Yeah, your bootloader is passing kernel flags to the initramfs, telling it which partition the root partition is (so that it can boot).