Messages in this thread | | | Date | Mon, 20 May 2013 14:39:18 -0500 | From | Rob Landley <> | Subject | Re: new mount is broken w/regard to devnames in /etc/fstab |
| |
On 05/19/2013 12:01:18 AM, Linda Walsh wrote: > 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.
There was a thread on this a couple months ago: https://lkml.org/lkml/2013/3/20/315
You can get the major/minor of a filesystem with the stat() system call, or even the stat command line utility. That gives you the major/minor of the device the filesystem was mounted from.
Note that there's only a major/minor when the filesystem _has_ a backing block device. If it's initramfs or tmpfs: there isn't one. If it's nfs, smbfs, or v9fs: there isn't one.
Rob
| |