[Wylug-help] Root device / pivot_root question

Timothy Baldwin tim.lists at majoroak.f2s.com
Sat Nov 6 16:48:10 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 05 Nov 2004 14:30, James Holden wrote:
> --
> Hello All,
>
> I'm trying to bootstrap a system with it's root filesystem on tmpfs. I
> understand that this is possible.
>
> Here's the process. The thing boots from an IDE flash disk using
> syslinux.
>
> 1) The initrd loads and /linuxrc is executed.
>
> 2) /linuxrc does the following:
>

[snip]

> cd realroot
> mkdir old_root
> pivot_root . old_root
>
> This leaves me in / in the 'real' root filesystem, in the tmpfs.
>
> But then, when I:
>
> exec chroot . /sbin/init < dev/console >dev/console 2>&1
>
> ...I get:
>
> Usage: init 0123456SsQqAaBbCcUu
> VFS: Cannot open root device "rd/0" or unknown-block(0,0)
> Please append a correct "root=" boot option
> Kernel panic: VFS Unable to mount root fs on unknown-block(0,0)

init should be started with a process id of 1, and therefore cannot be started
from /linuxrc

Rename /linuxrc, and give the kernel the options root=/dev/ram0 init=<new name
of /linuxrc>.

> I think the problem is with init not working. Once init bombs, the old
> change_root method kicks in, but finds it doesn't have a root to mount.

I don't think the old change root method can be used with tmpfs, due to it not
being mounted on a device. (nfs is a special case)

- --
Member AFFS, WYLUG, SWP (UK), ANL, RESPECT, Leeds SA, Leeds Anti-war coalition
No to software patents!    Victory to the iraqi resistance!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBjQBSjXSPyZ9/z+QRAl3ZAJ9OxcSJShkay7nLAH1nLYO1iD3p0ACgsxAd
p85G65B0+gHS9p01m3JY98U=
=AA/9
-----END PGP SIGNATURE-----




More information about the Wylug-help mailing list