gcc vdfuse.c -o vdfuse -L/lib -lfuse -L/usr/lib/virtualbox -lVBoxDD -Wl,-rpath,/usr/lib/virtualbox -I/home/fgleich/vbox/VirtualBox-2.1.2_OSE/include -D_FILE_OFFSET_BITS=64
echo6 wrote:What version of fuse are you using? If you have the strace command, I would also like to know the output of strace <mount command>.
fusermount 2.7.2 I'm using the latest kernel 2.6.28.5
You really want all the strace output from mount?
fgleich wrote:Here are all the compilation data I used:
- Code: Select all Expand viewCollapse view
gcc vdfuse.c -o vdfuse -L/lib -lfuse -L/usr/lib/virtualbox -lVBoxDD -Wl,-rpath,/usr/lib/virtualbox -I/home/fgleich/vbox/VirtualBox-2.1.2_OSE/include -D_FILE_OFFSET_BITS=64
The compiler insisted I put that -D_FILE_OFFSET_BITS=64 thing in there, or it wouldn't work.
gcc vdfuse.c -o vdfuse `pkg-config --cflags --libs fuse` -l:/usr/lib/virtualbox/VBoxDD.so -Wl,-rpath,/usr/lib/virtualbox -pthread -I ~/VBox/include
strace /home/fgleich/fuse/vdfuse/vdfuse -f WinXP2.vdi vdi
execve("/home/fgleich/fuse/vdfuse/vdfuse", ["/home/fgleich/fuse/vdfuse/vdfuse"..., "-f", "WinXP2.vdi", "vdi"], [/* 67 vars */]) = 0
brk(0) = 0x804d000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f07000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/virtualbox/tls/i686/sse2/libfuse.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/virtualbox/tls/i686/libfuse.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/virtualbox/tls/sse2/libfuse.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/virtualbox/tls/libfuse.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/virtualbox/i686/sse2/libfuse.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/virtualbox/i686/libfuse.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/virtualbox/sse2/libfuse.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/virtualbox/libfuse.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=89198, ...}) = 0
mmap2(NULL, 89198, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7ef1000
close(4) = 0
**** plus similar Load path searches and maps for ****
open("/lib/libfuse.so.2", O_RDONLY) = 4
open("/usr/lib/virtualbox/VBoxDD.so", O_RDONLY) = 4
open("/lib/i686/libc.so.6", O_RDONLY) = 4
open("/usr/lib/virtualbox/VBoxDDU.so", O_RDONLY) = 4
open("/lib/i686/librt.so.1", O_RDONLY) = 4
open("/lib/libdl.so.2", O_RDONLY) = 4
open("/lib/i686/libpthread.so.0", O_RDONLY) = 4
open("/usr/lib/virtualbox/VBoxVMM.so", O_RDONLY) = 4
open("/usr/lib/virtualbox/VBoxRT.so", O_RDONLY) = 4
open("/usr/lib/virtualbox/VBoxDD2.so", O_RDONLY) = 4
open("/usr/lib/libstdc++.so.6", O_RDONLY) = 4
open("/lib/libgcc_s.so.1", O_RDONLY) = 4
open("/usr/lib/virtualbox/VBoxREM.so", O_RDONLY) = 4
open("/lib/i686/libm.so.6", O_RDONLY) = 4
set_thread_area({entry_number:-1 -> 6, base_addr:0xb61836d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb61aa000, 536576, PROT_READ|PROT_WRITE) = 0
mprotect(0xb61aa000, 536576, PROT_READ|PROT_EXEC) = 0
mprotect(0xb7b3a000, 12288, PROT_READ) = 0
mprotect(0xb7b46000, 155648, PROT_READ|PROT_WRITE) = 0
mprotect(0xb7b46000, 155648, PROT_READ|PROT_EXEC) = 0
mprotect(0xb7b6d000, 458752, PROT_READ|PROT_WRITE) = 0
mprotect(0xb7b6d000, 458752, PROT_READ|PROT_EXEC) = 0
mprotect(0xb7be1000, 1048576, PROT_READ|PROT_WRITE) = 0
mprotect(0xb7be1000, 1048576, PROT_READ|PROT_EXEC) = 0
mprotect(0xb7d04000, 147456, PROT_READ|PROT_WRITE) = 0
mprotect(0xb7d04000, 147456, PROT_READ|PROT_EXEC) = 0
mprotect(0xb7e50000, 4096, PROT_READ) = 0
mprotect(0xb7e56000, 503808, PROT_READ|PROT_WRITE) = 0
mprotect(0xb7e56000, 503808, PROT_READ|PROT_EXEC) = 0
mprotect(0xb7f21000, 4096, PROT_READ) = 0
munmap(0xb7ef1000, 89198) = 0
set_tid_address(0xb6183718) = 11970
sendto(-1239927008, umovestr: Input/output error
0xc, 3083808756, MSG_PROXY|MSG_EOR|MSG_ERRQUEUE|MSG_DONTWAIT|MSG_FIN|MSG_SYN|MSG_RST|0xb6180000, ptrace: umoven: Input/output error
{...}, 3212969224) = 0
rt_sigaction(SIGRTMIN, {0xb7ce76e0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb7ce75f0, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbf820260, 35, (nil), 0}) = 0
futex(0xb7b404dc, FUTEX_WAKE, 2147483647) = 0
brk(0) = 0x804d000
brk(0x806e000) = 0x806e000
open("/usr/share/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=2586, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f06000
read(4, "# Locale name alias data base.\n#"..., 4096) = 2586
read(4, "", 4096) = 0
close(4) = 0
munmap(0xb7f06000, 4096) = 0
open("/usr/share/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=243680, ...}) = 0
mmap2(NULL, 243680, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb6147000
close(4) = 0
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=26026, ...}) = 0
mmap2(NULL, 26026, PROT_READ, MAP_SHARED, 4, 0) = 0xb7f00000
close(4) = 0
futex(0xb7e52a4c, FUTEX_WAKE, 2147483647) = 0
access("WinXP2.vdi", R_OK|W_OK) = 0
open("WinXP2.vdi", O_RDONLY|O_LARGEFILE) = 4
read(4, "<<< inno", 8) = 8
open("WinXP2.vdi", O_RDWR|O_LARGEFILE) = 5
_llseek(5, 0, [0], SEEK_SET) = 0
read(5, "<<< innotek VirtualBox Disk Imag"..., 72) = 72
_llseek(5, 72, [72], SEEK_SET) = 0
read(5, "\220\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
_llseek(5, 72, [72], SEEK_SET) = 0
read(5, "\220\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 400) = 400
_llseek(5, 512, [512], SEEK_SET) = 0
read(5, "\0\0\0\0^\4\0\0\233\6\0\0\301\n\0\0\1\0\0\0\235\0\0\0_"..., 20164) = 20164
_llseek(5, 21502, [21502], SEEK_SET) = 0
read(5, "U\252", 2) = 2
_llseek(5, 21438, [21438], SEEK_SET) = 0
read(5, "\200\1\1\0\v\376\277\200?\0\0\0\2!\235\0", 16) = 16
_llseek(5, 21454, [21454], SEEK_SET) = 0
read(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 16
_llseek(5, 21470, [21470], SEEK_SET) = 0
read(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 16
_llseek(5, 21486, [21486], SEEK_SET) = 0
read(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 16
geteuid32() = 0
getegid32() = 0
getcwd("/home/fgleich/.VirtualBox/VDI", 4096) = 30
lstat64("/home/fgleich/.VirtualBox/VDI/vdi", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/dev/null", O_RDWR|O_LARGEFILE) = 6
close(6) = 0
lstat64("/home/fgleich/.VirtualBox/VDI/vdi", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/home/fgleich/.VirtualBox/VDI/vdi", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 6
fstat64(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
getdents64(6, /* 2 entries */, 4096) = 48
getdents64(6, /* 0 entries */, 4096) = 0
close(6) = 0
open("/dev/fuse", O_RDWR|O_LARGEFILE) = 6
getgid32() = 0
getuid32() = 0
mount("", "/home/fgleich/.VirtualBox/VDI/vdi", "fuse.", MS_NOSUID|MS_NODEV, "allow_other,fd=6,rootmode=40000,"...) = -1 EINVAL (Invalid argument)
write(2, "fuse: mount failed: Invalid argu"..., 37fuse: mount failed: Invalid argument
) = 37
close(6) = 0
exit_group(1)
mount("", "/home/fgleich/.VirtualBox/VDI/vdi", "fuse.", MS_NOSUID|MS_NODEV, "allow_other,fd=6,rootmode=40000,"...) = -1 EINVAL (Invalid argument)
write(2, "fuse: mount failed: Invalid argu"..., 37fuse: mount failed: Invalid argument
) = 37
$ ./vdfuse -f ~/.VirtualBox/HardDisks/Windows\ 95.vdi m
$ ls -l m
total 4193729
-rw------- 1 mike mike 2147483648 2009-02-28 18:35 EntireDisk
-rw------- 1 mike mike 1994162688 2009-02-28 18:35 Partition1
-rw------- 1 mike mike 152732160 2009-02-28 18:35 Partition5
$ file m/*
m/EntireDisk: x86 boot sector, mbr; partition 1: ID=0xb, starthead 1, startsector 63, 3894849 sectors; partition 2: ID=0x5, starthead 0, startsector 3894912, 298368 sectors
m/Partition1: writable, regular file, no read permission
m/Partition5: writable, regular file, no read permission
the debug messages on the console:
open: /Partition1, 0
unique: 146, error: -2 (No such file or directory), outsize: 16
unique: 147, opcode: LOOKUP (1), nodeid: 1, insize: 51
LOOKUP /Partition5
getattr: /Partition5
NODEID: 4
unique: 147, error: 0 (Success), outsize: 136
unique: 148, opcode: OPEN (14), nodeid: 4, insize: 48
open: /Partition5, 0
unique: 148, error: -2 (No such file or directory), outsize: 16
Return to VirtualBox on Linux Hosts
Users browsing this forum: Majestic-12 [Bot] and 17 guests