[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] Problems with init after pivot_root
From:       Matthew Schumacher <matt.s () aptalaska ! net>
Date:       2004-02-27 21:30:49
Message-ID: 403FB709.7010608 () aptalaska ! net
[Download RAW message or body]

Ok figured this out so I figured I would add the resolution to the list 
for later searching:

First I didn't have a /dev filesystem mounted, Second I didn't use the 
devfs devices in my getty syntax.

schu

Matthew Schumacher wrote:
> Hello list,
> 
> I can't seem to make init work after I do a pivot_root in my linuxrc 
> script in my initrd image.
> 
> Here is what I am trying to do:
> 
> Boot initrd image, mount cdrom, mount fs image on the cd, pivot root to 
> the new fs image, call init on the new root.
> 
> Here is my linuxrc:
> 
> =========================================================================
> #!/bin/sh
> 
> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/; export PATH
> 
> umask 022
> 
> mount -t proc none /proc
> 
> mount -t devpts none /dev/pts
> 
> mount -t iso9660 -o ro /dev/cdroms/cdrom0 /cdrom
> 
> mount -t ext2 -o loop,ro /cdrom/rootfs.img  /newroot
> 
> cd /
> 
> cd /newroot
> 
> pivot_root . initrd
> 
> exec chroot . sh -c 'exec /sbin/init'
> =========================================================================
> 
> And here is my inittab on my newroot fs:
> 
> ========================================================================
> ::sysinit:/etc/init.d/rcS
> ::ctrlaltdel:/sbin/reboot
> ::shutdown:/sbin/swapoff -a
> ::shutdown:/bin/umount -a -r
> ::restart:/sbin/init
> 
> tty1::respawn:/sbin/getty 38400 tty1
> =========================================================================
> 
> The problem is the system just hangs when it gets to init, I never get 
> the console listed in the inittab above.
> 
> Anyone know what I'm doing wrong?  I'm using devfs, linux-2.4.25, 
> busybox-1.00-pre8 init, chroot, and pivot root.
> 
> Thanks,
> schu
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> busybox mailing list
> busybox@mail.busybox.net
> http://codepoet.org/mailman/listinfo/busybox


_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic