Results 1 to 10 of 28

Thread: Trouble running VirtualBox with "real" partition

Threaded View

  1. #1
    Join Date
    Jan 2006
    Location
    Vancouver, Canada
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Trouble running VirtualBox with "real" partition

    My laptop is set up with Windows Vista on one smallish partition, and Ubuntu on the rest of the (single) hard drive. While I do use Windows mostly for just running Windows-based games easily, there are a few tools on it that I still like to use. I decided to look at virtualization again, since that allows me to use those tools without straying too far away from Linux's comforting presence.

    First, the good news: I have it working!

    I set up a virtual disk that points to the real hard drive as follows:

    VBoxManage internalcommands createrawvmdk -filename /home/dmccall/Documents/VirtualBox/WindowsVista_PhysicalPartition/sda.vdmk -rawdisk /dev/sda -register

    The problem here is that this makes the entire hard drive be accessed by the virtual machine! Clearly, I now run the risk of the universe imploding and it being my fault.
    Indeed, I have 3 critical seconds every time I boot that virtual machine in which to press Escape to open the GRUB menu, scroll down and choose Windows, or else Ubuntu will meet its duplicate self, creating a giant rift in time ultimately destroying us all!
    Obviously, being a kind and forgiving person, I do not want this to happen, so I hope to repair this doomsday machine before it is too late.

    That actual working solution was actually the last thing I tried, but I am sure many people here understand this stuff way better than I do. Initially, I had hoped to use the "-partition 1" argument to restrict access to just that one partition Windows lives on. This led to Error 17 in GRUB (and I do not want to kill GRUB). Changed the MBR using "dd" (note: I have no idea how this command works. Just copied "dd if=/dev/sda1 of=windowsvista.mbr bs=512 count=1" from a forum post and it seemed to do, err, something).
    Changing the MBR got me to Windows, but it gave an error immediately that \Windows\System32\winload.exe was corrupted or missing, thus could not boot. This is not the case. I had unmounted /media/sda1, so it was not because the partition was already in use, unless Ubuntu mounts it elsewhere, too.

    I get the following output from VBoxManage internalcommands listpartitions -rawdisk /dev/sda
    Code:
    VirtualBox Command Line Management Interface Version 1.5.4
    (C) 2005-2007 innotek GmbH
    All rights reserved.
    
    Number  Type   StartCHS       EndCHS      Size (MiB)  Start (Sect)
    1       0x07  0   /32 /33  1023/254/63         76368         2048
    2       0x83  1023/254/63  1023/254/63         14300    156408840
    5       0x83  1023/254/63  1023/254/63         61318    185695398
    6       0x82  1023/254/63  1023/254/63           635    311275503
    As you can see, Windows resides on number 1, the others are all Linuxy partitions.

    Any help in getting this working with virtualized Windows restricted to just its partition would be much appreciated. Remember: It is for the good of us all. Otherwise, we're all doomed!
    Last edited by Mr. Picklesworth; January 11th, 2008 at 07:37 PM.

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
  •