Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I have Windows XP and Ubuntu installed on separate partitions.

Is it possible to "boot" my Ubuntu install from within Windows? What I am looking for is something similar to a Virtual Machine, but that will run the copy of Ubuntu already installed on my hard drive. I'd like to be able to dualboot Ubuntu and Windows, but also have the ability to access my Ubuntu install from within Windows without having to reboot.

share|improve this question
Do you mean run your Ubuntu installation (Like Ubuntu itself) from within windows - or access the files from the Ubuntu partition in Windows? – Marco Ceppi Aug 11 '10 at 21:05
@txwikinger thanks! – myusuf3 Aug 11 '10 at 21:07
@marco I think he means boot the actual install. – myusuf3 Aug 11 '10 at 21:09
up vote 10 down vote accepted

You can use coLinux and run your Ubuntu kernel with colinux:

  1. I installed Ubuntu as normal on a separate partition and configured the computer to dualboot between Ubuntu/XP.

  2. I installed coLinux with the Debian with backports image that is available on the coLinux website.

  3. Configured coLinux so it could mount the Ubuntu partition, the trick here is to figure out the correct partition number. The partition number in coLinux seems to be lower that the partition number used when booting the computer with Ubuntu. In my case I had to setup:

    <block_device index="1" path="\Device\Harddisk0\Partition5" enabled="true" alias="hda7"/>
  4. Boot coLinux with the Debian with backports image and after boot mount the ubuntu partition in my case /dev/hda7

  5. To make it possible to boot ubuntu inside coLinux you need to turn of some services autostarted at boot, most of them har hardware related in some way and is not supported inside coLinux. You still want to run these services when not running ubuntu inside colinux. I did this by first creating a /etc/inid.d/colinux script according to
    This script should of course be created in the /etc/init.d directory on the ubuntu partition and not on the "debian with backports" image.
    When this script has been created you also need to edit the default.colinux.xml file so it contains a COLINUX=1 boot-parameter, in my case:

    <bootparams>root=/dev/hda8 COLINUX=1</bootparams>

    This script now makes it possible to turn of some autostarted services when starting inside coLinux but still run these services when dualbooting the computer with ubuntu. You also has to make sure to run this script at boot time by inserting links in the /etc/rcS.d directory.

  6. The next step is to turn of services by inserting if-statements inside the service scripts in /etc/init.d (on the ubuntu partition).

    if [ -f /var/local/colinux ] ; then
    exit 0

    I had to turn off the following services when booting inside coLinux to make it boot, coLinux crashed during boot when any of these services were running:

  7. Create colinux customized versons of some other files, the colinux script in init.d mentioned above makes it possible to have a colinux-version and a non-colinux version of some different files. In my case I have special versions of the following files:

    /etc/fstab (coLinux mounts the ntfs partitions using smbfs instead of ntfs read-only mounting)
    /etc/network/interfaces (I didn't get colinux to work using DHCP so it has hardcoded IP numbers instead)
    /etc/gdm/gdm.conf (I am not really sure this is used since gdm can't be started at boot, but I have a special version for coLinux with all [servers] disabled. It may be used when using vnc but I am not sure if it is needed)

    It is important to remember to edit correct file when setting up these files this way because the normal files will be overwritten with *-colinux or *-non-colinux versions at each boot. It might be possible to setup symbolic links instead of overwriting the files but I have not tested this.

  8. Finally you will have to setup coLinux so it boots using the Ubuntu partition instead of the "debian with backports" image, this is done by setting a boot partition in the default.colinux.xml file, in my case it pointed to /dev/hda8
    <bootparams>root=/dev/hda8 COLINUX=1< /bootparams>

  9. It should now be possible to either start Ubuntu by selecting it in the dualboot(grub) menu when booting the computer or by starting XP and startup coLinux. Observe that when running inside coLinux the Ubuntu kernel is actually not used instead the coLinux kernel is used. This is important to think about for example if you need to recompiling kernels and kernel modules.

Finally, don't do the same mistake as I did. As described in this thread, I put XP/coLinux into sleep in hibernate mode and then dualbooted into Ubuntu. My Ubuntu file system got corrupt at next boot of XP and I decided to do a total reinstallation of Ubuntu.

share|improve this answer
It's great Idea, I think My friend also do this because I heard Colinux from him too. – Am1rr3zA Aug 12 '10 at 20:18
fantastic answer :-) – SjB Aug 12 '10 at 20:22
Great Answer. Very detailed and informative.. – User Aug 12 '10 at 20:42
If you're just going to copy and paste someone else's work, you should give them the credit. – Dori Oct 16 '10 at 1:24

If Ubuntu is on a separate partition you can create a *.vmdk file that virtualizes a physical partition and you should then be able to boot from this vmdk file inside virtualbox.

I think the command you look for to create a vmdk file is like this:

VBoxManage internalcommands createrawvmdk -filename <Absolute Path to output File> -rawdisk /dev/sda -register

I have never done this myself though so I can't really help you any further

share|improve this answer

andLinux is a complete Ubuntu Linux system running seamlessly in Windows 2000 based systems (2000, XP, 2003, Vista, 7; 32-bit versions only). This project was started for Dynamism for the GP2X community, but its userbase far exceeds its original design. andLinux is free and will remain so, but donations are greatly needed.

andLinux uses coLinux as its core which is confusing for many people. coLinux is a port of the Linux kernel to Windows. Although this technology is a bit like running Linux in a virtual machine, coLinux differs itself by being more of a merger of Windows and the Linux kernel and not an emulated PC, making it more efficient. Xming is used as X server and PulseAudio as sound server.

share|improve this answer
andlinux prepare absolute Ubuntu in windows and not related to Ubuntu that install in other partition and access with boot you can use colinux that embed in andlinux too inside boot. – SjB Aug 12 '10 at 20:57
@sjb: that is right. – SjB Aug 12 '10 at 20:58

I dont think you can boot your Ubuntu install from your windows machine without a virtual machine. If there is way, outside of that it would be cool. How is it different from VM?

share|improve this answer
I see some of my friend do this!!! – Am1rr3zA Aug 12 '10 at 13:43
its mostly likely a VM.:) – myusuf3 Aug 12 '10 at 13:53
colinux it would be cool :D – SjB Aug 12 '10 at 20:34

If you've got the Windows boot loader NTLDR chaining in to grub, rather than the other way around, then I think you can use bcdedit to change the default boot option, then reboot and you'll come in to Ubuntu. I'm not sure this works but I think I've seen it done. To make this work you probably need to install grub only into a partition boot sector (or the boot sector of a second drive) and then add that as an NTLDR start up option. hth.

share|improve this answer

Wubi, found at: might get you exactly what you want?

From the website: "Wubi is an officially supported Ubuntu installer for Windows users that can bring you to the Linux world with a single click. Wubi allows you to install and uninstall Ubuntu as any other Windows application, in a simple and safe way. Are you curious about Linux and Ubuntu? Trying them out has never been easier!"

share|improve this answer
You still need to reboot to start a Ubuntu with Wubi AFAIK. – Javier Rivera Aug 12 '10 at 7:08
the question not about dual boot – SjB Aug 12 '10 at 20:22

You can follow this, worked for me :

share|improve this answer
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Anwar Shah Aug 2 '12 at 11:01

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.