BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003074 [BusyBox] Kernel Module Support major always 04-22-08 15:18 06-22-08 09:32
Reporter addu219 View Status public  
Assigned To BusyBox
Priority normal Resolution open  
Status assigned   Product Version
Summary 0003074: "mount -o bind ..." returns invalid argumnent for elements in /dev folder
Description I am using the busybox 1.10.0

I am trying to mount an element log in /dev
srw-rw-rw- 1 root root 0 Apr 22 17:27 log

For a trivial case I am trying to mount it onto /tmp/log through the command
mount -t none -o bind /dev/log /tmp/log

I get the message "mount: mounting /dev/log on /tmp/log failed: Invalid argument"

I have noticed this error message while mounting any element present in the /dev directory.

The elements in the following folders get mounted successfully:
/home, /tmp, /var

e.g if I copy the element log into /var and try mounting it with the command
mount -t none -o bind /var/log /tmp/log
It is successful!!

I have played around with the folder permissions for /dev but to no avail.

There are other folders in the root directory as well for which the mount command returns the "invalid argument" error. Some of them are
/bin, /etc, /lib, /sbin, /usr

I just want to know the reason as to why can't elements in /dev and other folders listed above, be mounted. Is there some restriction due the -o bind option that it does not accept elements in these folder as a valid argument.

Let me know what could be wrong.
Thanks
Additional Information On a target that is running an older version of the busybox i.e. v1.1.2 the elements in the /dev folder get mounted successfully
The command
mount -t none -o bind /dev/log /tmp/log
is successful.

This gives a suspicion that the newer version of the busybox could have some changes in the mount command that leads to this error. Just my speculation!
Attached Files

- Relationships

- Notes
(0008464)
vda
06-22-08 09:32

mount was completely rewritten by Rob, yes.

However, for me it works:

strace -o mount.strace ./busybox mount -t none -o bind /dev/log /tmp/log

Log:

execve("./busybox", ["./busybox", "mount", "-t", "none", "-o", "bind", "/dev/log", "/tmp/log"], [/* 32 vars */]) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
getuid32() = 0
brk(0) = 0x8110000
brk(0x8111000) = 0x8111000
getuid32() = 0
geteuid32() = 0
stat64("/dev/log", {st_mode=S_IFSOCK|0666, st_size=0, ...}) = 0
mount("/dev/log", "/tmp/log", 0xffb3bcb3, MS_BIND|MS_VERBOSE, 0) = 0
_exit(0)

Please provide strace of your case.
 

- Issue History
Date Modified Username Field Change
04-22-08 15:18 addu219 New Issue
04-22-08 15:18 addu219 Status new => assigned
04-22-08 15:18 addu219 Assigned To  => BusyBox
06-22-08 09:32 vda Note Added: 0008464


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker