[BusyBox] mount problems
Brian Webb
webbb at desertscenes.net
Tue Jul 16 09:27:03 UTC 2002
I've seen the "Bad address" error before, but I thought it was just my
oddball kernel. My fix is as follows:
diff -urN busybox/util-linux/mount.c busybox-0.61.pre1/util-linux/mount.c
--- busybox/util-linux/mount.c 2002-05-14 15:56:29.000000000 -0700
+++ busybox-0.61.pre1/util-linux/mount.c 2002-06-25 22:39:14.000000000 -0700
@@ -469,6 +469,7 @@
strcpy(directory, m->mnt_dir);
filesystemType = xstrdup(m->mnt_type);
singlemount:
+ filesystemType = xstrdup(filesystemType);
string_flags = xstrdup(string_flags);
rc = EXIT_SUCCESS;
#ifdef CONFIG_NFSMOUNT
This ensures that filesystemType is heap allocated rather than stack
allocated (which seemed to be the problem).
Brian
> I'm using busybox.0.60.2 with a powerpc linux.2.4.18-pre8 kernel. I'm
> having troubles with the mount command.
>
> I have a startup script that does a "mount -a". All the mounts seem to
> fail.
> mount: Mounting proc on /proc failed: Bad address
> mount: Mounting tmpfs on /tmp failed: No such device
> mount: Mounting tmpfs on /var/log failed: No such device
> Note that "mount -t proc proc /proc" works fine if run manually at the
> shell prompt.
> # mount /proc
> #
>
> I am also trying to mount tmpfs but getting errors. If I type "mount -t
> tmpfs tmpfs /tmp" I get a "Bad address" error. It seems to work OK if
> I add a "-o mode=700" option. ie. "mount -t tmpfs tmpfs /tmp -o
> mode=700" works fine.
> # mount -t tmpfs tmpfs /tmp
> mount: Mounting tmpfs on /tmp failed: Bad address
> # mount -t tmpfs tmpfs /tmp -o mode=700
> #
>
> Any clues as to what's going on ? I'm running the kernel and root
> filesystem from an NFS server for development purposes. Could this be
> causing problems ???
>
> My /etc/fstab is:
> #/dev/nftla1 / ext2 ro,suid,dev,exec,async,noatime
> 0 1 #/dev/nftla2 /var ext2
> rw,suid,dev,exec,async,noatime 0 2 #/dev/nftla1 /
> ext2 defaults 0 1
> #/dev/nftla2 /var ext2 defaults 0 2
> proc /proc proc defaults 0 0
> tmpfs /tmp ramfs defaults 0 0
> tmpfs /var/log ramfs defaults 0 0
> #ramfs /tmp ramfs defaults 0 0
> #ramfs /var/log ramfs defaults 0 0
> 192.168.0.5:/home /home nfs rw,defaults,nolock 0 0
>
> Thanks for any help or pointers.
> Brendan Simon.
More information about the busybox
mailing list