How To : Ubuntu + WinXP + DualBoot + VirtualBox

Discussions related to using VirtualBox on Linux hosts.

Postby eiffel56 » 23. Mar 2008, 10:33

Hello,

it is possible to install Windows on a real partition, an then boot it with VirtualBox. But Windows really does not like if you change important hardware without reinstalling it.
So, if you install Windows on your real machine to a real partition, everything is fine. But if you boot the same Windows using VirtualBox, you "change" some hardware, especially the IDE Controller. In the most cases, Windows will just give you a bluescreen and halt. This is a bug in Windows, and can not be fixed in VirtualBox. Also, if you get Windows booting in VirtualBox, you will have do reactivate it in the most cases. And it will not run without VirtualBox furthermore.

Besides, VirtualBox does not support any 3D stuff at the moment. Even if you get Windows working in both VirtualBox and on your real machine, everything that does anything with 3D will simply not work inside of VirtualBox.
eiffel56
Volunteer
 
Posts: 100
Joined: 10. Oct 2007, 21:53

Postby jprobichaud » 26. Mar 2008, 05:46

Ok, i think i have some "solutions" for various issues on this thread.

Regarding Windows Activation: After fighting a lot with VMWare to "virtually boot" my physical partition, i end up 'cracking' my legitimate windows installation. I know it's ugly and looks illegal, but it is not: I really own a real license and windows WPA was just putting itself in my way. I understand that MS wants to protect his IP (and I completely respect that) but in my case, that feature is just preventing me from using 'my' software.

Regarding automatically and safely booting in windows from Grub or Lilo without risking to boot the already running linux setup. The simplest approach is to create a 'boot floppy':
1) in your vm config, create an empty floppy image (and don't attach it when the vm boot)
2) boot your windows vm
3) once windows is loaded, attach the empty floppy image
4) in windows, do a format a: (not a quick format)
5) now copy c:\boot.ini c:\NTDETECT.COM c:\ntldr to a: (the easiest way it do to this on the command line (cmd.exe) and type all the filenames explicitly as some of theses files are hidden
6) shutdown windows
7) change the vm config to attach the floppy at vm startup and make sure that the boot order starts with 'floppy'

This is how I did for VMWare (under which i created the floppy image) and i've just tested it (the same floppy image) with VirtualBox without trouble.


Now regarding AGP440.sys... I find it sad that this PCI vs AGP thing is putting us down... Now i manage to boot within windows with VirtualBox. In the early stages where the VM is booting, i press furiously F8 to get the 'boot' menu and select 'Enable VGA' this allowed me to actually boot into windows without trouble. Of course, make sure you are booting the good hardware profile... Now once windows finishes to load, tons of new hardware devices (including base system) are being discovered. I skipped any installation as i want to have more control over what's happening.

Stay tuned, i'll report my progress as i have more time to invest on this...

EDIT: sadly, the agp stuff is back when i rebooted. This means that until further analysis, one would have to always boot the vm image with 'enable vga mode' ... snif....
jprobichaud
 
Posts: 3
Joined: 23. Mar 2008, 08:08

Postby vkov_tinsky » 6. Apr 2008, 02:13

Edit: Method summarised in this article.

After reading this thread and several others on this topic I decided to try this myself...except I installed WinXP on an NTFS partition through VirtualBox.
I then created a 2nd hardware profile, also a second user account and moved HKLM\Software\Microsoft\Windows\CurrentVersion\Run\VirtualBox to HKCU. I then rebooted the VM with the 2nd hardware profile, uninstalled all VirtualBox specific drivers (from Device manager without rebooting) and then ran MergeIDE (as per http://www.virtualbox.org/wiki/Migrate_WindowsAfter).
After shutting down, rebooting natively with the 2nd H/W profile and installing chipset, graphics & other drivers I moved all of HKLM\Software\Microsoft\Windows\CurrentVersion\Run into HKCU for my 2nd account.

So now as long as I use the right H/W profile and user account everything works fine on both sides.

Regards,
VT
Last edited by vkov_tinsky on 20. Sep 2008, 11:32, edited 1 time in total.
vkov_tinsky
Volunteer
 
Posts: 218
Joined: 5. Apr 2008, 20:18

Postby mongolito404 » 1. May 2008, 11:39

I did get my Windows XP to work from physical drive on VirtualBox. It was previously configured to work with VMWare (MergeIDE, etc.) so it was pretty easy to get it working in VirtualBox.

The trickiest part was deactivating the AGP440.sys since I don't have a recovery disk and don't want to learn how to get one. With some googling I found a blog post talking about migrating from VMWare to VirtualBox giving a simple solution: AGP440 can be disabled by setting the HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\agp440\Start registry key to "4". You have plenty solution to edit this registry key, in my case the simple way was to boot in VMWare and use regedit.

With AGP440 disabled, my Win XP works in VirtualBox with two small problems: As soon as VirtualBox use the raw disk, I get a 100% CPU load on one of my cores. When booting, just as the Win XP splash screen begins to fade-in, it freeze for ~30 seconds.
mongolito404
 
Posts: 3
Joined: 1. May 2008, 11:12

Postby jprobichaud » 2. May 2008, 14:57

Wow, that's pretty good, I'll try that when I'll have some extra time.

I have a couple of question for both of you (mongolito404 andvkov_tinsky)
Any clues why the CPU jumps on disk access?
Is it on every disk access?
andvkov: are you seeing the same hd 'issues'?
How is the overall performance of the virtual machine? How does it compare with the VMWare one?

Many thanks!

Jp
jprobichaud
 
Posts: 3
Joined: 23. Mar 2008, 08:08

Postby mongolito404 » 4. May 2008, 18:06

Any clues why the CPU jumps on disk access? Is it on every disk access?

No clue. It happens as soon as the RAW disk is accessed. The processor jump to 100% and stay there.
How is the overall performance of the virtual machine? How does it compare with the VMWare one?

I didn't do any benchmark and I mostly use the VM to access some loosy IE only WebApp on the corporate intranet. I did not run any "intensive" application.
mongolito404
 
Posts: 3
Joined: 1. May 2008, 11:12

Postby vkov_tinsky » 16. May 2008, 00:11

On my PC (P4 HT @ 3.06GHz) processor usage (as reported by task manager) while copying a large (1GB) file from one raw partition to another (on same physical disk) fluctuates between 50 and 75% (Linux reports a constant 67% CPU usage). In comparison the same operation when I boot natively shows up between 10 and 20% in task manager.
While the CPU usage might seem quite high in comparison, the time it took to copy the file did not increase significantly.

I have only tried VMWare Player (and not with raw disk access) but I remember correctly it seemed slightly slower (but that's a subjective observation). All I can say is Diablo II loads and plays as smoothly (in windowed mode) as when booted natively :)

Also just wanted to re-iterate: If you install Windows under VBox first and boot natively afterwards then there won't be any problems with e.g. agp440.sys (Still need to use MergeIDE though)

Regards,
VT
vkov_tinsky
Volunteer
 
Posts: 218
Joined: 5. Apr 2008, 20:18

Previous

Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: Google [Bot] and 24 guests