"Error loading operating system" after host reinstall

Discussions about using Windows guests in VirtualBox.
Post Reply
leptogenesis
Posts: 2
Joined: 18. Oct 2010, 15:17
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: windows

"Error loading operating system" after host reinstall

Post by leptogenesis »

I'm in the sad state where I try to boot a Windows XP guest inside an Ubuntu 10.10 host, and the guest machine only shows a black screen and the words "Error loading operating system_"

I got to this point by reinstalling my guest operating system. Windows is using raw disk access on a partition that (I think) wasn't altered during the reinstall. However, after installing virtualbox 3.2.10 fresh from the ubuntu repo, I fond that my old .vmdk files don't work. I re-created them, re-created the guest and tried booting, but I then got errors with grub saying it didn't understand the filesystem--I'd forgotten that the mbr was maintained by virtualbox, and went away when the virtualbox was reinstalled. I tried using fixmbr using a windows disk, and that resulted in the "Error loading operating system".

The files are all still there. Ubuntu can mount the (NTFS) partition just fine and read/write files. I've also tried starting ubuntu in the virtual machine using a livecd, and it can read/write files on the partition also. There must still be some problem with the mbr, but I'm at a loss for how to fix it.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: "Error loading operating system" after host reinstall

Post by Perryg »

Thus the warning in the manual
Warning
Raw hard disk access is for expert users only. Incorrect use or use of an outdated configuration can lead to total loss of data on the physical disk. Most importantly, do not attempt to boot the partition with the currently running host operating system in a guest. This will lead to severe data corruption
It might be easier to backup the important data from the XP install (if you can still read it) and then install it again since fixmbr is having problems. Just in case though here are http://www.microsoft.com/resources/docu ... x?mfr=true the instructions
leptogenesis
Posts: 2
Joined: 18. Oct 2010, 15:17
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: windows

Re: "Error loading operating system" after host reinstall

Post by leptogenesis »

Perryg wrote:Thus the warning in the manual
Warning
Raw hard disk access is for expert users only. Incorrect use or use of an outdated configuration can lead to total loss of data on the physical disk. Most importantly, do not attempt to boot the partition with the currently running host operating system in a guest. This will lead to severe data corruption
It might be easier to backup the important data from the XP install (if you can still read it) and then install it again since fixmbr is having problems. Just in case though here are http://www.microsoft.com/resources/docu ... x?mfr=true the instructions
I realize that it's for expert users only, but how do you expect me to become an expert if I never play around? :D In reality I only have a handful of things set up on this OS that I'd rather not re-configure, but more importantly I'd like to know how to avoid this happening again, since I do need to have windows available occasionally. Considering that, as far as I can tell, the data is all there, it seems absurd that it should be completely impossible to boot it.

Anyway, map lists the four partitions as \Device\Harddisk0\PartitionX, where X ranges from 1-4. when I do fixmbr \Device\Harddisk0, I get an interesting output:

Code: Select all

** CAUTION**

This computer appears to have a non-standard or invalid master boot record.

FIXMBR may damage your partition tables if you proceed.

This could cause all the partitions on the current hard disk to become inaccessible.

If you are not having problems accessing your drive, do not continue.
Of course, I am having problems accessing my drive, so I continue anyway, but it seems to have no effect.
Post Reply