Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 36

Thread: Virtualbox to Boot Wubi inside Windows

  1. #11
    Join Date
    Oct 2007
    Beans
    Hidden!

    Re: Virtualbox to Boot Wubi inside Windows

    Neither url works for me. (Not that I intend to test at this point, though it looks interesting)

  2. #12
    Join Date
    May 2005
    Beans
    5

    Re: Virtualbox to Boot Wubi inside Windows

    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 using
    Code:
    fdisk -l <imagefile>
    on 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:
    # 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>"
    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).

    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

  3. #13
    Join Date
    Apr 2010
    Beans
    10

    Re: Virtualbox to Boot Wubi inside Windows

    Quote Originally Posted by antcodd View Post
    Hi,

    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.
    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.

    Quote Originally Posted by antcodd View Post
    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?
    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.

    Quote Originally Posted by antcodd View Post
    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).
    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.

    Quote Originally Posted by antcodd View Post
    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).
    Take a look at the make.image script... one of the things it does is install GRUB to a virtual hard disk image.

    Quote Originally Posted by antcodd View Post
    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.
    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...!

  4. #14
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Virtualbox to Boot Wubi inside Windows

    Quote Originally Posted by horse_dung View Post
    Sorry, that URL should have read: http://drop.io/vboxwubi
    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......

  5. #15
    Join Date
    Apr 2010
    Beans
    10

    Re: Virtualbox to Boot Wubi inside Windows

    Sure... I'm currently working on doing a 32-bit image for lucid... then I'll work on images for karmic...

  6. #16
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Virtualbox to Boot Wubi inside Windows

    Thanks horse_dung
    No longer participating......

  7. #17
    Join Date
    May 2010
    Beans
    3

    Re: Virtualbox to Boot Wubi inside Windows

    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://

  8. #18
    Join Date
    May 2010
    Beans
    3

    Re: Virtualbox to Boot Wubi inside Windows

    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.
    Attached Images Attached Images

  9. #19
    Join Date
    Dec 2005
    Location
    What a weird trip.....
    Beans
    4,676
    Distro
    Ubuntu 12.04 Precise Pangolin

    Cool Re: Virtualbox to Boot Wubi inside Windows

    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.

  10. #20
    Join Date
    May 2010
    Beans
    3

    Re: Virtualbox to Boot Wubi inside Windows

    Sorry, I just realized that my wubi installation included Ubuntu 9.4... I will see if I update it to 10.4.

Page 2 of 4 FirstFirst 1234 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •