Lior Kesos <[EMAIL PROTECTED]> writes:

> Hi I've been working lately on a set of scripts that bootstrap a linux
> mainframe instance.(although this I believe is a generic linux
> question).
> They way I accomplish this is to have an extended initrd which sets up
> networking on the initrd and then nfs mounts a real disk dumping data
> upon it and in the end running init from the new mounted disk.
> In kernel 2.4/2.6 pivot_root was introduced to do exactly that and
> we've dealt with it.
> This is how I'm mounted now..
> 
> /dev/ram0 on / type ext2 (rw)
> none on /proc type proc (rw)
> none on /sys type sysfs (rw)
> /dev/dasdb1 on /mnt type ext2 (ro)
> 
> basically I'm running the next sequence of events trying to leave the 
> initrd...
> 
> cd /mnt
> pivot_root . initrd
> exec chroot . /bin/sh -c 'umount /initrd ;  exec -a init.new
> /sbin/init' <dev/console >dev/console 2>&1
> 
> This crashes  with:
> + /tmp/pivot_root . initrd
> + exec chroot . /bin/sh -c 'umount /initrd ;  exec -a init.new /sbin/init '
> umount: /initrd: device is busy
> Usage: init.new 0123456SsQqAaBbCcUu
> VFS: Cannot open root device "dasdb1" 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)
> HCPGIR450W CP entered; disabled wait PSW 00020001 80000000 00000000
> 0046CB4C

Any kernel messages before the panic? 

What do you mean by "extended initrd"? How big is that? Does it fit
into CONFIG_BLK_DEV_RAM_SIZE?

> 3. If I use the pivot_root(8) manpages _first_ example (running sh
> instead of init) it works ok.

Maybe there is a hint in the _second_ example in that manpage: portmap
is implicitly started by NFS mount and keeps the old root (initrd)
busy. Try killall portmap?

These are wild guesses. I don't run Linux on mainframes to reproduce
it (though I know a few people who do it for a living :).

-- 
Oleg Goldshmidt | [EMAIL PROTECTED]

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to