Ubuntu – Move existing Ubuntu 13.04 to a virtual machine on Windows 8


I currently have dual boot Windows 8 and Ubuntu 13.04 on a Dell XPS 13 laptop. Ubuntu has a major problem with display drivers (screen backlight) that I haven't been able to solve, so I'm looking for alternatives.

I would like to use some kind of virtual machine program on Windows that will boot up my existing Linux install into a fullscreen window. I am after one of two scenarios:

  1. Something that would mount and boot my existing Linux install from where it is, so I can still dual-boot if required. This seems like the cleanest option, and would make life very simple indeed.

  2. A way to make a copy of EVERYTHING from my existing Ubuntu install onto a virtual machine, leaving me free to delete the Linux partitions, and use Ubuntu via VM only.

Scenario 1 is preferred.

Thanks for your help.

Best Answer

  • For the first scenario:

    You can try to start Ubuntu in a chroot. For this you should install any Linux on your VM. Mount all your Ubuntu partitions there.

    Then mount your /proc /sys and /dev and startx as explained in How to start GNOME session from chainroot?

    mount -t proc none path_to_chroot/proc/
    mount -t sysfs none path_to_chroot/sys/
    mount -o bind /dev path_to_chroot/dev/

    Here is a bash script to run chrooted Ubuntu, which you can edit for your needs:

    mount --bind /dev /media/disk/dev
    mount --bind /proc /media/disk/proc
    mount --bind /sys /media/disk/sys
    mount --bind /dev/pts /media/disk/dev/pts
    cp /etc/resolv.conf /media/disk/etc/resolv.conf
    chroot /media/disk

    For the second scenario:

    Check out these questions on SuperUser

    Also using this tutorial you should do a remastersys backup, that means that you will do a full system backup including your home folder, all applications and all your data into .iso image. Put this image on USB hard drive, or just to Windows NTFS partition. Then you can install your Ubuntu in VirtualBox using this .iso file.