[buug] IDE drive recognition
Michael Paoli
mp at rawbw.com
Sat Nov 6 13:19:38 PST 2004
Quoting Bill Honeycutt:
> To cut to the chase, look at this line in the output from strace...
> stat64("/sbin/mount.ext2", 0xbffffb00) = -1 ENOENT (No such file or
> directory)
> rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV RTMIN], NULL, 8) = 0
> mount("/dev/hdb1", "/data", "ext2", 0xc0ed0000, 0) = -1 EBUSY (Device or
> resource busy)
> I'm focusing on the line that says, "stat64("/sbin/mount.ext2",
> 0xbffffb00) = -1 ENOENT (No such file or directory)".
I think you're having the problem with the mount(2) call. From mount(2)
we have:
EBUSY Specialfile is already mounted. Or, it cannot be
remounted read-only, because it still holds files
open for writing. Or, it cannot be mounted on dir
because dir is still busy (it is the working direc-
tory of some task, the mount point of another
device, has open files, etc.).
Perhaps with a bit of luck, fuser(1) and/or lsof(8) may indicate
precisely what has /dev/hdb1 and/or /data busy and/or you might
otherwise happen to be able to determine what has them busy.
I note that mount(8) seems to look for an available
/sbin/mount.filesystem_type, and presumably if it finds that, it uses or
additionally uses that, or if it doesn't find that, it presumably uses
stuff which is more built-in and/or automagically loaded.
# insmod rd rd_size=16384
Using /lib/modules/2.4.27/kernel/drivers/block/rd.o
# mke2fs -q /dev/ram0 || echo $?
mke2fs 1.27 (8-Mar-2002)
# type Strace
Strace is /home/r/root/bin/Strace
# cat /home/r/root/bin/Strace
#!/bin/sh
exec strace -fv -eall -s2048 ${1+"$@"}
# Strace -o ext2.strace mount -t ext2 /dev/ram0 /mnt
# mount | grep '^/dev/ram0'
/dev/ram0 on /mnt type ext2 (rw)
# cat ext2.strace
...
3369 stat64("/sbin/mount.ext2", 0xbffffad8) = -1 ENOENT (No such file or directory)
3369 rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV], NULL, 8) = 0
3369 mount("/dev/ram0", "/mnt", "ext2", 0xc0ed0000, 0) = 0
...
# umount /dev/ram0 && freeramdisk /dev/ram0 && rmmod rd
http://www.weak.org/pipermail/buug/2004-November/002619.html
http://www.weak.org/pipermail/buug/2004-November/date.html
More information about the buug
mailing list