Help needed with mount
Sean Richards
richardss at lvl.co.nz
Tue Aug 1 01:31:34 UTC 2006
Rob Landley wrote:
>On Monday 24 July 2006 11:13 pm, Sean Richards wrote:
>
>
>>Thanks for the reply :)
>>Have built busybox with make defconfig and CONFIG_FEATURE_SH_IS_ASH=y.
>>Just checked in .config and CONFIG_FEATURE_MTAB_SUPPORT is not set so
>>that looks OK. At the moment I boot the system with Grub using 'root
>>(hd1,0)', 'kernel (hd1,0)/boot/vmlinuz-2.6.17.1 root=/dev/hdb1'. It all
>>boots up OK and everything seems to be working OK, just can't get rid of
>>these errors from mount when rebooting or shutting down. Not really sure
>>where to go from here.
>>
>>
>
>Ok, let's see if I can reproduce this...
>
>Legacy mtab disabled check, the grub stuff is vaguely irrelevant,
>root=/dev/hdb1 check...
>
>From your previous message, I have:
>
>/etc/fstab contains
>/dev/hdb1 / reiserfs defaults 0 0
>devpts /dev/pts devpts defaults 0 0
>proc /proc proc defaults 0 0
>
>/etc/init.d/rcS contains
>/bin/mount /proc
>/bin/mount -a
>/bin/mount -o remount,rw /
>
>Ok, I don't use reiserfs and my laptop hasn't got a /dev/hdb, but let's see...
>
>I can't reproduce this. Here's what I did:
>
>Grab a current busybox snapshot (svn 15754), make defconfig, make menuconfig,
>switch on static linking, make. Move the resulting "busybox" binary to an
>empty testing directory.
>
>Build a User Mode Linux instance from the kernel source I have lying around
>(2.6.17.1) with the attached miniconfig (using my miniconfig patch, also
>attached). The command line was:
>
>make ARCH=um miniconfig MINICONFIG=linux-miniconfig-uml
>make ARCH=um
>
>Move the resulting "linux" binary to the testing directory.
>
>Then I created an ext2 filesystem image:
>dd if=/dev/zero of=walnut.img bs=1M count=20
>mke2fs walnut.img
>tune2fs -c 0 -i 0 walnut.img
>mkdir sub
>su - # become root
>mount -o loop walnut.img sub
>cd sub
>mkdir -p dev/pts proc etc sys
>mknod dev/console c 5 1
>cp ../busybox .
>exit
>umount sub
>exit
>
>Now let's run the image under UML:
>
>./linux rw ubda=walnut.img root=/dev/ubda init=/busybox lash
>
>In there, do:
>
>mount -t sysfs /sys /sys
>mdev -s # this populates /dev
>cat > /etc/rcS << EOF
>mount /proc
>mount -a
>mount -o remount,rw /
>EOF
>chmod +x /etc/rcS
>cat > /etc/fstab << EOF
>/dev/ubda / ext2 defaults 0 0
>devpts /dev/pts devpts defaults 0 0
>proc /proc proc defaults 0 0
>EOF
>ln -s /proc/mounts /etc/mtab
>sync
>exit
>
>From the parent system,
>e2fsck walnut.img
>
>And now run the image again and try it out:
>
>./linux rw ubda=walnut.img root=/dev/ubda init=/busybox lash
>
>At the command prompt:
>
>lash /etc/rcS
>umount -a
>
>I didn't get an error from that...
>
>What do I do to reproduce this?
>
>Rob
>
Hi Rob,
Thanks again for taking the time, much appreciated. Followed your setup
and am able to reboot and shutdown without any errors. This helped me
track down the cause of the problem in my setup. The cause seems to be
thttpd. If I am running thttpd when I reboot umount gives the errors
mentioned earlier - 'unmount: Couldn't umount /:No such file or
directory'. If I kill the thttpd process before reboot or shutdown then
no errors are reported. Any ideas why running thttpd would cause these
umount errors?
Thanks, Sean
More information about the busybox
mailing list