Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So for a long time now, I've been running Linux on a dual boot system with Windows 7. I don't run Windows very often, however it happens enough now that I started looking at alternatives to reboots. A friend showed me Parallels on his Mac, and I fell in love with the concept of Virtual machines. Since Sun has been in the Unix space since the beginning of time, they likely have the best solution for Linux (big assumption I know). Anyway, to avoid re-installing windows, as I have it set up the way I like it now, I was wondering if there was a way to point to the existing install and boot from that point.

Linux is installed on /dev/sda

Windows is on /dev/sdb

Having never done this before a little handholding would be great as to what step I should take.

Thanks for any help in advance!

share|improve this question
I would make sure you have everything backed up first but check out: I'm sure Google has more info about vbox rawdisk setup. – OzzieOrca Oct 31 '12 at 4:45
up vote 1 down vote accepted

The edit by @ozzieorca basically answers the question. But since you asked for a little handholding, I will describe the steps as I remember. (WARNING: make a backup of the disk. Nothing is guranteeed. I tried this when the partition was not mounted within linux)

  1. Make sure /dev/sdb is readable and writable from your account.

    sudo chmod 777 /dev/sdb

  2. Create an image that represents an entire physical hard disk /dev/sdb. (I keep my virtual box VMs in the directory vBoxVMs in my home folder, change it accordingly.)

    $ cd ~/vBoxVMs

    $ VBoxManage internalcommands createrawvmdk -filename Win7/Win7.vmdk -rawdisk /dev/sdb

  3. Create a Virtual machine with the created harddisk. Follow the steps for creating new VM, selecting "Existing Hard-Disk" and the one you just created. and finish the steps.

  4. Now open settings of the newly created VM and go to the storage tab. In case the hard-disk is placed under "SATA controller", remove it from there and place it under "IDE-Controller" and change the type of "IDE-controller" to ICH6

share|improve this answer
Getting an error, but I think I can figure this one out... The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing '/etc/init.d/vboxdrv setup' as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary. – Richard Nov 1 '12 at 15:24
Nothing is ever easy.... [root@chromium VirtualBox VMs]# /etc/init.d/vboxdrv setup WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/. Stopping VirtualBox kernel modules[OK] Uninstalling old VirtualBox DKMS kernel modules[OK] Trying to register the VirtualBox kernel modules using DKMS[FAILED] Recompiling VirtualBox kernel modules[FAILED] [root@chromium VirtualBox VMs]# cat /var/log/vbox-install.log Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop. – Richard Nov 1 '12 at 15:30
So, I'm not sure if I can Export this value, but more importantly, I don't generally muck with the kernal, so I'm not sure where to point it. I'll go dig on the www and see if something pops up – Richard Nov 1 '12 at 15:33
Ok, so a re-install of VB, yumming dkms and following the error info, changing the BIOS to allow virtual machines, and last a rebooting seem to work now. The only crummy thing is that windows boots kinda but with all the normal issues one should and would expect:) Now I've got to decide if I will ever dual boot again... decisions – Richard Nov 1 '12 at 20:37
chmod 777: nonononono! Never ever run chmod 777. It is practically never required! Not even for "testing purposes". If the file is readable, then it's readable. If it's writable by the user or group that need to write to it, then it's writable. There is absolutely zero need to give everyone write permissions, and forgetting to chmod it back to something sane is exactly how multinationals get hacked. Just don't do it. Ever. I wrote an introduction of Unix permissions. Please read it! – Carpetsmoker Mar 13 at 6:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.