[BusyBox] Problem with mount from initrd
Gareth Glaccum
Gareth.Glaccum at compusys.co.uk
Wed Apr 28 14:52:25 UTC 2004
Hmm,
You are running this from within an initrd? When I start my initrd, I do
not have a / mounted in the conventional way, my / is the initrd itself.
I always do a
mkdir -p /mnt
At the start, this works with the pre-6, 8 and 10 that I have tried
recently. The error message means either /dev/hda1 does not exist (have
you done a mknod? Or mnt does not exist).
Gareth
-----Original Message-----
From: Philipp Taprogge [mailto:philipp.taprogge at gmx.net]
Sent: 28 April 2004 15:38
To: busybox at mail.codepoet.org
Subject: [BusyBox] Problem with mount from initrd
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