Following my previous escapades with WinXP and VirtualBox, I simply had to get my live-HDD running under VirtualBox...
The first step was to create a disk image that actually points to the raw disk (see section 9.9 in the VirtualBox User Manual):
VBoxManage internalcommands createrawvmdk -filename live-hdd.vmdk -rawdisk /dev/sda -registerThe next step was to create a virtual PC in VirtualBox that's based on this image. And that was basically it. There's really nothing more to it.
Well, I've also installed the VirtualBox Guest Additions on the live HDD, and that wasn't as neat.
The X server on my live HDD is configured to auto-detect the video adapter, and it works just fine, allowing easy resizing of the virtual PC display. The mouse, however, is not auto-detected. I've added the following bit of shell-script at the end of do_start in /etc/init.d/bootmisc.sh, to fix this (note the use of lspci to figure out if this is a real or virtual session):
# Setup displayThe other issue is accessing the VirtualBox shared folder. It's done like this (as root):
rm -f /etc/X11/xorg.conf.200*
# are we running inside VirtualBox ?
if [ -z "$(lspci -d 80ee:beef)" ]; then
dpkg-reconfigure -fnoninteractive xserver-xorg
modprobe vboxvfs(replace the colored parts with the your own stuff).
mount -t vboxsf -o uid=zungbang,gid=zungbang,rw /vboxsvr/tmp /mnt/vbox
It seems that mount.vboxsf doesn't grok the noauto flag, so there's no way to add entries for shared folders in /etc/fstab, if, like me, you need these to not be mounted at startup.
I'm virtually happy now.