how can I determine the root device?

Mike Frysinger vapier at gentoo.org
Wed Jun 20 21:58:11 UTC 2007


On Wednesday 20 June 2007, Dallas Clement wrote:
> Does anyone know of a way to determine the root device from which the
> kernel has been booted?  I've heard of a utility called "rdev" which
> will do this.  Just wondering if something like this is included in
> busybox or if there is a way to determine this from files found in the
> proc filesystem or something...

rdev works by comparing the major/minor from stat("/") to the major/minor of 
the device nodes in /dev/

depending on what you want to do, /dev/root may also work
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070620/d1dd5254/attachment-0002.pgp 


More information about the busybox mailing list