[Gllug] Where to get the system device number

Kostas Georgiou k.georgiou at imperial.ac.uk
Tue Mar 27 16:35:38 UTC 2007


On Tue, Mar 27, 2007 at 02:55:23PM +0100, Tom Schutzer-Weissmann wrote:

> I'm trying to boot from an IDE drive on an IDE-USB adaptor. I'm able to boot 
> off a simple USB pen and I've got as far as booting an initrd system that 
> loads the USB modules and finds the root device (by looking for a block 
> device of a certain size - asking the user would be simpler)
> 
> What I don't know is how to hand over to the real system. Does my real root 
> filesystem need to be mounted before I update /proc/sys/kernel/real-root-dev? 
> How do I find the "system device number" I need to update it with?
> 
> The man page of initrd says 
> 
> >  For example, the following shell command line would change the normal root
> > device to /dev/hdb1: 
> > echo 0x365 >/proc/sys/kernel/real-root-dev 
> 
> - where does that "0x365" come from?

real-root-dev is obsolete for quite some time now, pivot_root is what you want.
I am surprised that your initrd man page doesn't mention this, here is what it
says in my machine:

       Note: The use of /proc/sys/kernel/real-root-dev to  change  the
       root file system is obsolete.  See the kernel source file Docu-
       mentation/initrd.txt as well as pivot_root(2) and pivot_root(8)
       for  information on the modern method of changing the root file
       system.

Kostas Georgiou
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list