Re: new mount is broken w/regard to devnames in /etc/fstab
From: Rob Landley
Date: Mon May 20 2013 - 15:39:26 EST
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--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/