Neither url works for me. (Not that I intend to test at this point, though it looks interesting)
Neither url works for me. (Not that I intend to test at this point, though it looks interesting)
Hi,
I happened to tinkering with this idea today too as I had been wanting to try it for a while. I tried your solution (and thought of a similar idea the other way around by mounting the vdi in a native small Linux but had no idea how to make it work). I tried it with a 32bit Wubi install and had to run the virtual machine with Ubuntu 64bit as the OS choice to get it to boot at all but the mouse and keyboard don't work once booted - probably something to do with trying to run 32bit drivers on your 64bit kernel or something. I suspect it works on running your script from 32bit but I didn't try. Your solution is probably easier for the end user to set up as it is just click and go. Have you looked at the performance, I was under the impression shared folders were rather slow?
I continued with the another, much simpler method that I was trying to get working before finding this thread and managed to make it work :
It is possible to write a VMDK disk description file that references the raw Wubi image and make Virtualbox try to boot off it (why Virtualbox doesn't support booting off raw images by default I'll never understand). I pieced together instructions I found for making Ubuntu boot in virtualbox off a raw partition (http://cargowire.net/articles/seamlessubuntuwindows) and instructions I found to make the raw image work with a VMDK file (http://blogs.techrepublic.com.com/networking/?p=148).
To get the disk descriptor working you need to know the number of sectors, cylinders (seems to be 0), sectors per track (63 for me), heads (which seems to be 255 always for images) which can be found usingon a linux machine (I just used my old Ubuntu virtual machine - I doubt it works from within wubi since it is booting off that file). I'm not sure how to find out the number of sectors as I got it from when I tried the trial of a program called WinHex referenced in the disk descriptor instructions but it seems only the paid one provides all the information (though it did give sector count).Code:fdisk -l <imagefile>
VirtualBox seems to have modified the file and cleared it up with its own sector heads and cylinders and things and added various things so they may not be necessary (and hopefully I remembered correctly what the file was like originally).Code:# Disk DescriptorFile version=1 CID=fffffffe parentCID=ffffffff createType="monolithicFlat" # Extent description RW <sector count> FLAT "root.disk" # The Disk Data Base #DDB ddb.adapterType = "ide" ddb.geometry.sectors = "<sectors per track>" ddb.geometry.heads = "<heads>" ddb.geometry.cylinders = "<cylinders>"
I then used the latest version of Super Grub Disk and its auto option was able to boot into Wubi (I tried following instructions from the ubuntu inside windows post for getting a grub boot iso but I must have been doing something wrong like using too old a version of grub without ext4 support or something).
It should be possible to create a minimal Grub 2 iso which just tries to boot (hd0)/vmlinuz and (hd0)/initrd.img (note the lack of a partition number and that there are symlinks that presumably point to the current kernel) but I do not know how to do this and couldn't find any information how to do it. It might even be possible to fake bootsector grub 2 by using another image before the Wubi one in the disk descriptor as in the example disk descriptor in what seems to be the official file format documentation http://www.vmware.com/app/vmdk/?src=vmdk (I found it through web search).
The only problem I have is the swap file doesn't work since it is trying to load it from /ubuntu/disks - I haven't tried to fix that yet. Everything else seems to work (including Compiz, seamless mode, guest additions don't seem to conflict etc.) apart from some minor issues with VirtualBox starting with a huge window due to Ubuntu remembering the native screen resolution.
I'm fairly inexperienced with Linux so I don't think I will be able to help much with questions or maintain this (it seemed but I'll do my best and hopefully someone can pick up the idea and make it easier to use . It would be great to see something similar included in Wubi someday.
Using Windows 7 32bit, VirtualBox 3.1.6, Ubuntu 10.04 32bit
ps: the second drop.io link doesn't work because the URL still points to dropbox.io. The correct link is http://drop.io/vboxwubi
There are usually far more serious problems when mixing 32/64-bit... I had problems with AppArmor and the system failed to make to a graphical login console.
The performance was fine, although I haven't done any performance tests... Its probably about half the speed of native, I had originally put that down to it being a VM but it could well be the reduced disk I/O from using a loop onto of vfat onto of Shared Folders.
I tried this approach but again the system failed to boot because it couldn't find /ubuntu/disks/usr.disk. You could use two raw vmdk disk images, but then you would need to change the configuration in /etc/fstab and I don't want the VM version to have a different configuration than the real WUBI Ubuntu.
Take a look at the make.image script... one of the things it does is install GRUB to a virtual hard disk image.
The swap disk doesn't work using my method either because Shared Folders doesn't correctly report that the file is a single contiguous chunk which is needed. There's a number of problems with using a VDI / VMDK file which have caused no end of hassles, so I might change it to be ISO image based...!
You mean http://drop.io/vboxwubi
Any chance of a ovf/vmdk for Karmic ?
Last edited by Jose Catre-Vandis; May 4th, 2010 at 02:55 PM.
No longer participating......
Sure... I'm currently working on doing a 32-bit image for lucid... then I'll work on images for karmic...
Thanks horse_dung
No longer participating......
Hey horse_dung, thanks for sharing, what you are trying to do would be great for many windows users.
My results:
I followed your instructions but didn't work. I ran the VM but I only see a black screen. I am running windows 7 home premium, 64bits and I had installed wubi before on c://
I made a mistake, I didn't havve virtualization enables, that's why I got the black screen.
Now the VM tries to start, but I get an error. I took a screenshot.
I would not use Wubi even if you paid me.
Either dual boot or install Ubuntu and install Windows in the VM.
If at first you don't succeed - just buy the company and tell them to make the one you want.
Sorry, I just realized that my wubi installation included Ubuntu 9.4... I will see if I update it to 10.4.
Bookmarks