2013-05-20 23:30:41

by L A Walsh

[permalink] [raw]
Subject: Re: mount --no-canonical seems broken.




Karel Zak wrote:
>
> The problem is that "mount" (without options) prints always canonicalized
> paths (and in this case --no-canonicalize has no effect, this option
> is used for mounting only). It means if you have non-canonical paths
> in /etc/mtab then "mount" still prints canonical paths. I can fix it
> and make the output sensitive to --no-canonicalize option too.
>
> Anyway, use findmnt, it provides but complete control on the output.
>
> Karel
>
----
Sure give better control, but not as widely known as "df" or "mount".

I might point out that by default,
> findmnt /

TARGET SOURCE FSTYPE OPTIONS
/ /dev/root xfs rw,nodiratime,relatime,attr2,inode64,noquota
> > l /dev/root
ls: cannot access /dev/root: No such file or directory

-----
It's not a device in /dev/ nor is it in /proc/devices.

Conversely,

klogd 1.4.1, log source = ksyslog started.
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.9.0-Isht-Van (law@Ishtar) (gcc version
4.7.2 20130205 [gcc-4_7-branch revision 195759] (SUSE Linux) ) #6 SMP
PREEMPT Wed May 8 17:28:40 PDT 2013
[ 0.000000] Command line: BOOT_IMAGE=390-Isht-Van rw root=/dev/sdc1
root=/dev/sdc1 showopts console=ttyS0,115200n8 console=tty0 elevator=cfq
pcie_aspm=force pcie_ports=native reboot=bios

The kernel seems to know the root image at boot (even told twice from
this output!)

Not to mention, there is some comment in the kernel-related code of using
/dev/root because there is no writable storage available... even though
the command line
shows that root is mounted 'rw'...



2013-05-21 09:47:24

by Karel Zak

[permalink] [raw]
Subject: Re: mount --no-canonical seems broken.

On Mon, May 20, 2013 at 04:30:21PM -0700, Linda Walsh wrote:
> widely known as "df" or "mount".
>
> I might point out that by default,
> > findmnt /
>
> TARGET SOURCE FSTYPE OPTIONS
> / /dev/root xfs rw,nodiratime,relatime,attr2,inode64,noquota
> > > l /dev/root
> ls: cannot access /dev/root: No such file or directory

util-linux 2.23 ?

libmount since this version is able to use the root= kernel command
line option to convert /dev/root from the /proc/self/mountinfo file
to a real device name.

Karel

--
Karel Zak <[email protected]>
http://karelzak.blogspot.com

2013-05-21 19:31:47

by L A Walsh

[permalink] [raw]
Subject: Re: mount --no-canonical seems broken.





Karel Zak wrote:
> On Mon, May 20, 2013 at 04:30:21PM -0700, Linda Walsh wrote:
>
>> widely known as "df" or "mount".
>>
>> I might point out that by default,
>>
>>> findmnt /
>>>
>> TARGET SOURCE FSTYPE OPTIONS
>> / /dev/root xfs rw,nodiratime,relatime,attr2,inode64,noquota
>>
>>>> l /dev/root
>>>>
>> ls: cannot access /dev/root: No such file or directory
>>
>
> util-linux 2.23 ?
>
> libmount since this version is able to use the root= kernel command
> line option to convert /dev/root from the /proc/self/mountinfo file
> to a real device name.
>
----
I'm only at 2.19, will get & try newer version. Thanks!