[BusyBox] Re: Problem with busybox based initrd: umount of initrd hangs system (Terry Barnaby)

Peter S. Mazinger ps.m at gmx.net
Fri Jul 1 09:58:24 UTC 2005


On Fri, 1 Jul 2005, Terry Barnaby wrote:

> Peter S. Mazinger wrote:
> >>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 ?
> Thanks for the reply.
> 
> This is a simple debug point allowing me to have a look to see
> what is running and mounted etc. Removing it make no difference.
> This is a "simplified" test init script.
> 
> > 
> > 
> >>pivot_root . initrd1
> > 
> > 
> > does the initrd1 dir exist on the root filesystem?
> > 
> > 
> Yes, the harddisk based file system has /initrd1 and the initial ram
> disk does end up mounted on /initrd1 Ok. Its just when I try and
> run "umount /initrd1" the system locks up.
> With the full script Fedora3 boots completely and runs Ok apart
> from unmounting the initrd. Thats why I have been using /initrd1
> rather than /initrd (saves me modifying Fedora init code :) )

mkinitrd utility from redhat runs also:
umount /initrd/proc (and other mounted ones, if any) before /umount /initrd
you could also check if you have lock on some files

you could also try mkinitrd first and see if that can umount (using nash 
for the test, not busybox)

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