Advanced

Hacking the Init Ramdisk

Posted by gus3 on
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

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

This topic does not have any threads posted yet!


Starting a new topic:

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Subject:

Your message:

|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post