[BusyBox] Re: Problem with busybox based initrd: umount of initrd hangs system (Terry Barnaby)
Peter S. Mazinger
ps.m at gmx.net
Thu Jun 30 19:21:24 UTC 2005
> From: Terry Barnaby <terry1 at beam.ltd.uk>
> Subject: [BusyBox] Problem with busybox based initrd: umount of initrd
> hangs system
> To: busybox at mail.codepoet.org
> Message-ID: <42C3DD97.1060709 at beam.ltd.uk>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I am building a custom initrd for booting a Fedora 3 based system.
> In general all is working fine, except that when I try an umount the initrd
> after boot has suceeded the system hangs with no error messages.
>
> I have created a cpio based initrd using busybox. A simplified version
> of the "init" script is attched. This finishes with running /bin/sh on the
> hard disk mounted file system. If I try and run "umount /initrd1" the system
> hangs.
> The system is booted using PXE based network boot using pxelinux 3.0.9.
> I am using busybox-1.00.
> The kernel is Fedora3's version 2.6.11-1.35_FC3smp.
>
> Any Ideas ??
>
> Terry
> -------------- next part --------------
> #!/bin/ash
> ################################################################################
> # Init Beamsys Startup
> # T.Barnaby, BEAM Ltd, 2005-06-29
> ################################################################################
> #
>
> echo ""
> echo "##### Beamsys Initrd init: ${VERSION} #####"
>
> echo "Mounting /proc filesystem"
> mount -t proc /proc /proc
>
> insmod /lib/jbd.ko
> insmod /lib/ext3.ko
>
> echo "Mounting root filesystem"
> mount -r -t ext3 /dev/hda1 /sysroot
>
> echo "Switching to new root"
> umount /proc
> cd /sysroot
>
> # Debug point
> /bin/ash
why do you run the shell again ?
>
> pivot_root . initrd1
does the initrd1 dir exist on the root filesystem?
>
> # Debug point
> exec usr/sbin/chroot . /bin/sh <dev/console >dev/console 2>&1
>
> #exec usr/sbin/chroot . sbin/init <dev/console >dev/console 2>&1
> #exec usr/sbin/chroot . /bin/sh -c 'umount /initrd1; exec /sbin/init' <dev/console >dev/console 2>&1
Peter
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
More information about the busybox
mailing list