Re: Initrd Question

"Andrey Borzenkov"
2004-02-13T14:14:30Z

>> echo 0x0100 > /proc/sys/kernel/real-root-dev
>
> This makes no sense as you're using pivot_root.

this makes all sort of sense. Please check sources. It is required so that kernel will not attempt to mount root passed to it by loader. You are welcome to clean up the code :)

>> mount -n -o ro /dev/sda2 /new_root
>
> This doesn't even match with the 0x0100 above, now does it?

so what? kernel happily ignores real-root-dev, it is possible that some user-level tools may be confused but I have not seen any so far.

>> pivot_root /new_root /new_root/initrd
>
> You should cd into /new_root before running pivot_root,

Huh? Why?

SYNOPSIS
pivot_root new_root put_old

>> if [ -c initrd/dev/.devfsd ]
>> then
>> echo "Mounting devfs..."
>> mount -n -t devfs none dev
>> fi
>
> Should you check for /dev/.devfsd on the real root here? I thought .devfsd
> is created by the devfsd process,

you are wrong here, sorry. .devfsd is created by devfs.

-andrey