You are not logged in.

#1 2018-11-20 21:29:04

megagram
Member
Registered: 2007-12-26
Posts: 46

Root partition not in fstab

Hey there, I'm wanting to change some mount options for my root "/" partition in fstab. However, when I opened fstab I do not see any entries for root.

I have two arch installs, one installed about 2 months ago and another that's been installed for years and both do not have the root partition entries in fstab.

I could have sworn those used to be there. But I do noticed systemd has a -.mount entry for the root mount.

Question is, is this normal? And how do I edit the root mount options?

Thanks!

Offline

#2 2018-11-20 21:53:27

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Root partition not in fstab

Your root is configured on your kernel command line through the "root=..." and "rootflags=..." options. The /etc/fstab entry then overwrites those options while booting, but if you don't have an entry in /etc/fstab, then the system uses whatever was on the kernel command line.

Check out your boot loader's configuration.

Offline

#3 2018-11-20 22:05:36

megagram
Member
Registered: 2007-12-26
Posts: 46

Re: Root partition not in fstab

My syslinux config looks like this:

LABEL arch
    MENU LABEL Arch Linux
    LINUX ../vmlinuz-linux
#    APPEND root=UUID=667750c4-66d9-4a16-99ec-ef2feb6bde54 rw vga=current quiet splash
   APPEND root=UUID=667750c4-66d9-4a16-99ec-ef2feb6bde54 rw vga=773 nomodeset
    INITRD ../initramfs-linux.img

The output of mount, however, looks like this:

/dev/sda3                                            on  /                                  type  btrfs        (rw,relatime,ssd,space_cache,subvolid=5,subvol=/)

So where are those btrfs mount options coming from, I wonder?

Offline

#4 2018-11-20 22:42:08

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Root partition not in fstab

Maybe those are the mount options that are used by default? I don't know where else options might be hiding if there's nothing on the kernel command line or in /etc/fstab.

Offline

#5 2018-11-20 22:43:16

megagram
Member
Registered: 2007-12-26
Posts: 46

Re: Root partition not in fstab

They aren't default... i definitely used fstab in the past to define them. That subvolid is a btrfs subvolume used for my root partition.

Offline

#6 2018-11-21 10:28:05

sincomil
Member
Registered: 2018-02-13
Posts: 118

Re: Root partition not in fstab

megagram please post you fstab file

Offline

#7 2018-11-21 15:21:06

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Root partition not in fstab

https://www.freedesktop.org/software/sy … ator.html#

Not an Installation issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2018-11-21 16:53:04

megagram
Member
Registered: 2007-12-26
Posts: 46

Re: Root partition not in fstab

cat /etc/fstab

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
UUID=ff5a6098-7253-4365-a4ce-c6d2e308b3c3               /boot           ext2            rw,relatime     0 2

UUID=82f230da-7124-4694-b3ac-4edbd5d03fb1               none            swap            defaults        0 0

Offline

#9 2018-11-21 17:16:05

loqs
Member
Registered: 2014-03-06
Posts: 19,106

Re: Root partition not in fstab

What is the output of

systemctl cat -- -.mount

Offline

#10 2018-11-21 17:20:59

megagram
Member
Registered: 2007-12-26
Posts: 46

Re: Root partition not in fstab

$ systemctl cat -- -.mount
No files found for -.mount.

interestingly I do see the root mount in systemctl

  UNIT                                                                                                  LOAD   ACTIVE SUB       DESCRIPTION
  -.mount                                                                                               loaded active mounted   Root Mount

Offline

#11 2018-11-21 17:26:21

loqs
Member
Registered: 2014-03-06
Posts: 19,106

Re: Root partition not in fstab

Does the system use the systemd hook in mkinitcpio?

Offline

#12 2018-11-21 17:37:43

megagram
Member
Registered: 2007-12-26
Posts: 46

Re: Root partition not in fstab

$ grep HOOKS /etc/mkinitcpio.conf
HOOKS=(base udev autodetect modconf block filesystems keyboard fsck btrfs)

Offline

#13 2018-11-21 17:46:56

loqs
Member
Registered: 2014-03-06
Posts: 19,106

Re: Root partition not in fstab

Is there a -.mount in /run/systemd/generator/ ? Which would be created by systemd-gpt-auto-generator or systemd-fstab-generator.
Otherwise not sure what is causing -.mount to appear but you could just add / to the fstab.

Offline

#14 2018-11-21 17:54:09

megagram
Member
Registered: 2007-12-26
Posts: 46

Re: Root partition not in fstab

Yeah it's really weird. Especially weird since even my brand-new install has it missing as well.

It's not showing up in /run/systemd/generator/

I'll just re-add it to fstab.

Thanks!

Offline

#15 2018-11-21 18:16:31

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,703
Website

Re: Root partition not in fstab

Why is it weird? fstab only has in it, what you put in it. How are you installing Arch?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#16 2018-11-21 18:25:01

megagram
Member
Registered: 2007-12-26
Posts: 46

Re: Root partition not in fstab

It's weird because I'm like 99% certain at one point in time the root mount was defined in fstab and now it's gone.

Also weird because I don't understand how it got those options defined--they must have come from fstab because I definitely didn't define them elsewhere.

I installed Arch both times by following the install guide (genfstab)

Offline

#17 2018-11-21 18:28:00

loqs
Member
Registered: 2014-03-06
Posts: 19,106

Re: Root partition not in fstab

The kernel has default mount options there can also be mount options stored in the filesystem itself which can cause the options string produced by mount to be different than rootflags / the options string in fstab.

Offline

#18 2018-11-21 18:31:11

megagram
Member
Registered: 2007-12-26
Posts: 46

Re: Root partition not in fstab

Alright, fair enough. Here's a question though, should genfstab during the installation process not populate an fstab with the root mount in it? Cause my newly-installed arch box from like a month ago is also missing it....

Offline

#19 2018-11-21 18:36:40

loqs
Member
Registered: 2014-03-06
Posts: 19,106

Re: Root partition not in fstab

Yes however Installation_guide#Fstab does note to check the generated fstab for errors.

Offline

Board footer

Powered by FluxBB