new mount is broken w/regard to devnames in /etc/fstab
There are 2 problems -- they are unlikely to be
directly related, but are in so much as they are in the new version of mount.
1) How is one supposed to get the real root device?
It's not /dev/root -- and on my system /dev/root doesn't even exist. (though to be fair, it has in the past -- udev musta got sloppy this time, and did point to the real root device). But how can I get /proc to display the real root device instead of some fake name.
It's insecure the way it is -- as /dev/root could be "anything"...
2) I'd like lvm's naming to be available through mount. Ideally, lvm's naming would be available in /proc/mounts... At least, though in going from /dev/VG/LV => /dev/mapper/VG-LV, that can be scripted reliably to get the mount device name.
But /dev/root?... How to script that, *reliably*... And why the bogus name?
Karel Zak
maintainerQuoted 7 lines · Linda Walsh
1) How is one supposed to get the real root device?
It's not/dev/root-- and on my system/dev/rootdoesn't even exist. (though to be fair, it has in the past -- udev musta got sloppy this time, and did point to the real root device). But how can I get /proc to display the real root device instead of some fake name.It's insecure the way it is -- as
/dev/rootcould be "anything"...
I don't think this is util-linux issue. It's more distro specific and related to kernel & initramfs & udevd.
For example my Fedora 18:
$ findmnt / TARGET SOURCE FSTYPE OPTIONS / /dev/sda4 ext4 rw,relatime,data=ordered
$ df / Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda4 35146488 16233036 17121452 49% /
$ grep ' / ' /proc/mounts rootfs / rootfs rw 0 0 /dev/sda4 / ext4 rw,relatime,data=ordered 0 0
Quoted 4 lines
2) I'd like lvm's naming to be available through mount. Ideally, lvm's naming would be available in
/proc/mounts... At least, though in going from/dev/VG/LV=>/dev/mapper/VG-LV, that can be scripted reliably to get the mount device name.
For example lsblk(8) should be able to convert to the /dev/mapper format
lsblk -rno NAME /dev/VG/LV
you can also use /dev/VG/LV for findmnt(8), it should be able to convert the names for /dev/mapper/VG-LV to search for mountpoint.
.. or use /dev/mapper/<name> in your /etc/fstab ;-)
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Hallo, Linda,
Du meintest am 18.05.13:
Quoted 9 lines
There are 2 problems -- they are unlikely to be
directly related, but are in so much as they are in the new version of mount.1) How is one supposed to get the real root device?
It's not/dev/root-- and on my system/dev/rootdoesn't even exist. (though to be fair, it has in the past -- udev musta got sloppy this time, and did point to the real root device). But how can I get /proc to display the real root device instead of some fake name.
rdev
should do the job.
Viele Gruesse!
Helmut
Hallo, Linda,
Du meintest am 18.05.13:
Quoted 1 line
1) How is one supposed to get the real root device?
rdev
Quoted 3 lines
It's not
/dev/root-- and on my system/dev/rootdoesn't even exist. (though to be fair, it has in the past -- udev musta got sloppy this time, and did point to the real root device).
My system doesn't use "udev", it has no "/dev/root" entry, and it shows since some (few) years "/dev/root" when I invoke "df". No problem.
Viele Gruesse!
Helmut