[Wylug-help] Root device / pivot_root question
James Holden
wylug at jamesholden.net
Fri Nov 5 14:30:54 GMT 2004
--
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:
mount -t msdos /dev/hda1 /disk
mount -t tmpfs none /realroot
tar xjpf /disk/rootfs.tbz -C /realroot
There is now a base filesystem (less /usr) in /realroot
mount -t proc none /realroot/proc
mount -t devfs none /realroot/dev
The /proc and /dev are now mounted in the eventual filesystem root.
umount /disk (not needed just now, but will be later to load /usr)
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)
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.
The problem appears to be that init is failing, but I don't know why.
There exists an /etc/inittab in the 'real' root fs.
Any ideas anyone?
James
--
Content-Description: This is a digitally signed message part
[ signature.asc of type application/pgp-signature deleted ]
--
More information about the Wylug-help
mailing list