Gentoo Archives: gentoo-user

From: Mike Gilbert <floppym@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Strange new behavior from the "mount" command
Date: Mon, 20 Apr 2015 20:01:45
Message-Id: CAJ0EP40phebLjcjPSjfF_R31iiBFhY3+BAGCyBtDQZq5F-h4KQ@mail.gmail.com
In Reply to: [gentoo-user] Re: Strange new behavior from the "mount" command by walt
1 On Mon, Apr 20, 2015 at 3:21 PM, walt <w41ter@×××××.com> wrote:
2 > On 04/19/2015 05:45 PM, Mike Gilbert wrote:
3 >> On Sun, Apr 19, 2015 at 6:18 PM, walt <w41ter@×××××.com> wrote:
4 >
5 >>> As a quick-and-dirty way of testing your idea I moved /etc/fstab out of the way.
6 >>>
7 >>> I was surprised to learn that "mount" doesn't care about fstab, and doesn't even
8 >>> bother to look for it (when invoked with no arguments).
9 >>>
10 >>
11 >> It reads information from /etc/mtab primarily, as well as
12 >> /run/mount/utab. Also, if /etc/mtab is a symlink, it reads from
13 >> /proc/self/mountinfo instead of /etc/mtab.
14 >>
15 >> It seems like there is probably some difference in the data it is
16 >> reading from those files on your system. Maybe post them so we can all
17 >> have a look?
18 >
19 > I really appreciate your help, thanks. Sorry there's so much to read through.
20 >
21 > I avoided the possible caching problem Francisco mentioned by booting the machine
22 > without an /etc/fstab, so it wound up with only / and swap partitions actually
23 > mounted.
24 >
25 > Here are the files that "mount" opened (running with no arguments) that it
26 > normally would not open:
27 >
28 > #cat /proc/cmdline
29 > BOOT_IMAGE=(hd0,gpt5)/boot/vmlinuz root=PARTUUID=345FD3C4-9E1C-49EB-859C-E3A3034325B3 rootwait init=/usr/lib64/systemd/systemd
30 >
31 > #cat /proc/self/mountinfo
32 > 12 0 8:21 / / rw,relatime shared:1 - ext4 /dev/root rw,data=ordered
33
34 I think this may be related to having /dev/root appear in
35 /proc/self/moutinfo. In this case, mount will look for your root
36 filesystem in /proc/cmdline, and resolve it from there.
37
38 Since your kernel command line has a PARTUUID tag, it probably needs
39 to scan the partition tables to resolve that. This is mostly a SWAG; I
40 didn't trace the code to this point.

Replies