Hacking the Init Ramdisk

Posted by gus3 on Jul 27, 2008 12:56 AM EDT
I Am, Therefore I Think; By gus3
Mail this story
Print this story

In Linux 2.6.24.5, the problem is explained in init/do_mounts.c. Following the execution path, you can see that the first root filesystem mount happens in mount_root(). First, the device name is converted to a (major,minor) device number pair, then /dev/root is created with that (major,minor) pair. Finally, /dev/root is mounted as the root filesystem.

The catch to this is that the only partition accessible is the one created for /dev/root. The way around it is to make some other mount the first mount, then switch to the XFS later in the boot process. This is exactly what an init ramdisk gives us.

Full Story

  Nav
» Read more about: Groups: Slackware

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.