[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1369078758.2776.2@driftwood>
Date: Mon, 20 May 2013 14:39:18 -0500
From: Rob Landley <rob@...dley.net>
To: Linda Walsh <lkml@...nx.org>
Cc: LKML <linux-kernel@...r.kernel.org>
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--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists