Results 1 to 5 of 5

Thread: Mount partition as VirtualBox virtual hard disk

  1. #1
    Join Date
    Nov 2008
    Beans
    32
    Distro
    Ubuntu 10.04 Lucid Lynx

    Mount partition as VirtualBox virtual hard disk

    I have a same issue with a slight change in taste

    Mine is Pentium M laptop and the cd isn't working at all.

    Ubuntu is installed and working fine.

    I need to install Windows server 2003 in one of the empty partitions and my "old" laptop doesn't support booting from USB.


    What I thought i will install virtualbox and use one of my partitions as a virtual disk.

    I created the virtual disk of my partition with

    Code:
    VBoxManage internalcommands createrawvmdk -filename WinXP.vmdk  -rawdisk /dev/sda -partitions 1

    Now however once I boot from Win2K3 CD all things work fine till I select the partition where I have to install win2k3 (in that blue screen). After which it asks to format and doesn't format because of SCSI adapter issue (according to google).

    So is there some other way to inject Win2k3 into one of my partitions without USB boot and a working CD.

    I cant buy a USB CD-Rom because I am poor (no wonder why would I be using Pentium M still if i wasn't poor)

    I have tried changing LSIlogic and Buslogic and played around with no success

    Please help me,

    Thanks.

  2. #2
    Join Date
    Jan 2010
    Location
    Sydney, Australia
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Mount partition as VirtualBox virtual hard disk

    Moved to its own thread.

    cheers!!
    “Progress is made by lazy men looking for easier ways to do things”
    — Robert A. Heinlein

  3. #3
    Join Date
    Nov 2008
    Beans
    32
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Mount partition as VirtualBox virtual hard disk

    I did however get to work by
    Code:
    VBoxManage internalcommands createrawvmdk -filename WinXP.vmdk  -rawdisk /dev/sda -partitions 1,2,3,5,6,7
    4 was extended partition so there was no need to add it.

    However because of hardware differences between virtual and 'real' machine Win2k3 never booted.

    Now still thinking what to do

  4. #4
    Join Date
    Nov 2008
    Beans
    32
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Mount partition as VirtualBox virtual hard disk

    I did however get to work by
    Code:
    VBoxManage internalcommands createrawvmdk -filename WinXP.vmdk  -rawdisk /dev/sda -partitions 1,2,3,5,6,7
    4 was extended partition so there was no need to add it.

    However because of hardware differences between virtual and 'real' machine Win2k3 never booted.

    Now still thinking what to do

  5. #5
    Join Date
    Nov 2009
    Location
    Madrid, Spain
    Beans
    1,403
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Mount partition as VirtualBox virtual hard disk

    I think that you should use the option -mbr in the command createrawvmdk (http://www.virtualbox.org/manual/ch09.html#rawdisk).

    You can create a file named zero.mbr typing this command:

    Code:
    dd bs=446 count=1 if=/dev/zero of=zero.mbr
    Then you can create the virtual disk:

    Code:
    VBoxManage internalcommands createrawvmdk -filename WinXP.vmdk  -rawdisk /dev/sda -partitions 1 -mbr zero.mbr
    Define a virtual machine with that virtual disk attached as IDE device and boot that VM from a Ubuntu Live CD (really use the iso file).

    Open gparted and try to format to ntfs the partition /dev/sda1.

    Shutdown the VM.

    Then start the VM from the Win2k3 installation iso file and try to install Windows in the partition /dev/sda1 (really Windows will assign a different name to this partition; select only one partition for installation).

    Once Win2k3 is installed, shutdown the VM and close VirtualBox.

    Finally, open a terminal and type this Ubuntu command:

    Code:
    sudo update-grub
    If the VM installation was correct, the command update-grub should detect Win2k3 and add it to GRUB2 menu at startup.

    NOTE: I suppose you are trying to install Win2k3 in partition /dev/sda1.
    Last edited by lmarmisa; February 20th, 2013 at 11:56 AM. Reason: Added note

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
  •