[BusyBox] Problem with mount from initrd

Philipp Taprogge philipp.taprogge at gmx.net
Wed Apr 28 14:38:14 UTC 2004


Hello all!

I am not sure you guys can help me, but I am beginning to suspect my 
problem lies in busybox. Anyway, here goes:

I am building a very small linux system to boot off an IDE-Flash module 
and run from a ramdisk. To this end I have built an initrd containing a 
statically linked busybox-1.00-pre4 and a 2.4.26 kernel (with build-in 
ide and ext2 support).
My linuxrc, which is supposed to set up the ramdisk that will contain 
the root-fs, looks something like this:

---

#!/bin/ash

PATH=/bin:/sbin

mount -o remount,rw /
mount -o ro /dev/hda1 /mnt
gunzip /mnt/rootfs.gz > /dev/ram1
umount /mnt
pivot_root /dev/ram1 initrd
exec /sbin/init

---

The problem is that "mount -o ro /dev/hda1 /mnt" fails with "mount of 
/dev/hda1 on /mnt failed: no such file or directory".
/bin/mount is a smylink to busybox, /dev/hda1 a block special device 
with major 3, minor 1, owned by root.root and rights 640 and /mnt is a 
directory owned by root.root with rights 755.

Could there be a bug in busybox that prevents the mount command from 
working? A am totally lost here :-/

Thanks for any clues you might have to offer

		Phil



More information about the busybox mailing list