Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jul 2011 23:18:39 -0700 (PDT)
From:      Joe Sciulli <jsciulli2003@yahoo.com>
To:        freebsd-emulation@freebsd.org
Subject:   mount vdi
Message-ID:  <1311574719.49706.YahooMailClassic@web122313.mail.ne1.yahoo.com>
In-Reply-To: <20110721081726.GR17489@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Is it possible to mount virtualbox vdi file on the FreeBSD host?=A0 This ap=
pears to be doable on windows and linux hosts, which basically is done in t=
wo steps: 1. find offset in the image. 2. mount the image with that offset.

I'm trying to do the same thing on FreeBSD, and found the undocumented and =
deprecated command still works:

VBoxManage internalcommands dumphdinfo freebsd_home.vdi

I got the following for the virtual disk image holding the /home (no root h=
ence no MBR) disk for a FreeBSD guest:

Header: offBlocks=3D4096 offData=3D28672

But since the mount command in FreeBSD doesn't support "offset", I have to =
dd the image into another file.=A0 I believe the default "block" size in dd=
 is 512 bytes, so the offset 28672 (bytes?) is 56 blocks.=A0 So I used the =
command:

dd skip=3D56 if=3Dfreebsd_home.vdi of=3Dfreebsd_home_56.vdi

Then attempt to mount it:

mdconfig -a -t vnode -f /tmp/freebsd_home_56.vdi -u 0
mount /dev/md0 /tmp/aaa/
mount -t cd9660 /dev/md0 /tmp/aaa/

unfortunately both the above two mount commands failed with "Invalid argume=
nt".=A0 I tried skip=3D28672 to no avail as well.=A0 Anything did I do wron=
g?

Or is there any other solution in FreeBSD host to mount virtualbox vdi file=
?=A0 There appears to be a "vdfuse" but is not ported yet, and the attempt =
to port appears to be not for VirtualBox 4.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1311574719.49706.YahooMailClassic>