Physische Windows-Partition in VBox (Fehler beim Lesen)

Discussions about using Windows guests in VirtualBox.
Post Reply
hohwille
Posts: 8
Joined: 6. Nov 2009, 15:51
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP

Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by hohwille »

Hallo allerseits,

ich bin neu bei VirtualBox und habe den Wunsch, dass ich primär unter Linux arbeiten kann und für ein paar spezielle Programme Windows in VirtualBox laufen lassen kann.
Aktuell habe ich ein Dual-Boot-System auf einem Lenovo T61.
1. Partition ist WinXP
2. Partition ist Kubuntu 9.10

VirtualBox ist sofort installiert und lässt sich sehr komfortabel bedienen.
Das booten eine Knoppix lief auf Anhieb.
Ich habe für die interne Platte per
"VBoxManage internalcommands createrawvmdk ..."
eine VMDK-Datei erzeugt. Anfangs hatte ich Probleme,
dass der Grub gleich abstürzt, das habe ich aber nach ein
paar Recherchen im Web gelöst.
Das eigene Kubuntus kann ich (im read-only-mode) in VBox booten.
Das Windows will aber einfach nicht starten.

Es kommt immer:
Fehler beim Lesen des Datenträgers
Neustart mit Strg+Alt+Entf
(A disk read error occurred Press Ctrl+Alt+Del to restart)

Leider kann ich damit nicht viel anfangen. Ich weiss nur, dass der Windows-Bootloader
nicht funktioniert und diese Meldung produziert.

Ich habe auch einen Original MBR für XP rekonstruiert und das probiert:

VBoxManage internalcommands createrawvmdk -filename .VirtualBox/windows.vmdk -rawdisk /dev/sda -mbr windows.mbr -partitions 1 -relative -register

Auch das hier habe ich versucht (zylinder und heads in vmdk editieren):
http://brionetka.com/linux/?p=82

Alle möglichen Einstellungen in VBox helfen auch nicht weiter.

Würde auch das Windows in eine Container-Datei packen, wenn das weiterhilft.
Aber nach Anleitung geht das nur für die ganze Disk und die passt leider auf sich selbst nicht drauf.
http://www.virtualbox.org/wiki/Migrate_Windows

Eine komplette Neuinstallation von Windows mit allen Programmen ist für nicht akzeptabel.

Eigentlich erscheint mir das nicht ausergewöhnlich, was ich vorhabe sondern eher der
Standard-Use-Case zu sein.

Ist das evtl. ein Problem, dass ich 64 Bit Linux+VirtualBox habe aber 32 Bit WinXP?
Ich habe mir jetzt schon viele Nächte um die Ohren geschlagen
und bin völlig hilflos - kann mir jemand weiterhelfen?

Vielen Dank schon mal vorab
Jörg
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by Sasquatch »

If you're going to post in the general forum, we expect the general language of the internet here, which is English. Even though I can read a bit of German, I didn't even bother to read it. Have you read the sticky here about using RAW Disk? Also read the manual, as there is some risk to it.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
hohwille
Posts: 8
Joined: 6. Nov 2009, 15:51
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP

Re: Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by hohwille »

Thanks so far for your response. I was mislead when I changed language to German during registration process.
I will write a summary in English:
I have a dualboot system with WinXP and Kubuntu 9.10 on a levenovo T61.
Both boot fine physically.
I installed virtal box on kubuntu and it works in general so I can boot CDs, etc.
However I can not boot into my physical WinXP parition. All I ever get is:

A disk read error occurred
Press Ctrl+Alt+Del to restart

That means that the windows bootloader fails. But I do not know why.
I already searched this forum and the entire web and found many people having the same problem.
The I also found some "solutions" that however did not help me:
http://ubuntuforums.org/showthread.php?t=769883
http://brionetka.com/linux/?p=82
http://www.virtualbox.org/wiki/Migrate_Windows

I need to run the existing Windows installation rather than creating a new one.
IMHO this should be a common use-case for virtual box, so I wonder if it can not be done.

I created the restored MBR and did this:
VBoxManage internalcommands createrawvmdk -filename .VirtualBox/windows.vmdk -rawdisk /dev/sda -mbr windows.mbr -partitions 1 -relative -register

I also tried to "fix" the cylinders and heads in the vmdk file according to the fdisk output.

Nothing helps - grub works fine and I can boot linux or memtest68 but no windows.

Any problem with 64 bit linux and 32 bit windows? Any Ideas?
Thanks a lot.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by Sasquatch »

If you can boot Linux with it, it means you used the wrong partition. The -partition parameter is used to define which partition you want to access through RAW Disk, not how many.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by MarkCranness »

If you run fdisk inside the VM (using a Live CD) does it report a different geometry than when run on the host?

There is a known raw disk access regression in 3.0.10: http://www.virtualbox.org/ticket/5355

If that's not the cause, then please see this topic: http://forums.virtualbox.org/viewtopic. ... 09#p107580
(I would NOT recommend my possible solution @ http://forums.virtualbox.org/viewtopic. ... 09#p107595, because you are dual booting.)
Getting the drive geometry using Windows: Run Easeus Partition Manager as described in my 'possible solution' link below on the dual boot host XP and also inside the VM to get the geometry of the disk in each case (real and VM).

Attaching a VBox.log might help (Machine>Show Log...>Save).
hohwille
Posts: 8
Joined: 6. Nov 2009, 15:51
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP

Re: Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by hohwille »

> If you can boot Linux with it, it means you used the wrong partition.
> The -partition parameter is used to define which partition you want to access through RAW Disk, not how many.

I made various tries. One of them was to use the entire disk. then I could boot grub and every entry worked except for windows.
Later I tried the partitions and mbr option.
hohwille
Posts: 8
Joined: 6. Nov 2009, 15:51
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP

Re: Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by hohwille »

Thanks to MarkCranness - your suggestions sound promising. I will give it a try.
hohwille
Posts: 8
Joined: 6. Nov 2009, 15:51
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP

Re: Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by hohwille »

If i boot knoppix and run fdisk the only difference is that the device is /dev/hda while it is /dev/sda in ubuntu.
I also uninstalled vbox 3.0.10 and installed 3.0.8 (53138_Ubuntu_jaunty_am64) but still have the same problem.
hohwille
Posts: 8
Joined: 6. Nov 2009, 15:51
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP

Re: Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by hohwille »

I do not know what part of the log file could be helpful for you.
I can see the booting of devices ends with
00:00:04.419 Guest Log: BIOS: Booting from Hard Disk...
then nothing until I had shutdown the VM...

00:00:01.794 Changing the VM state from 'CREATING' to 'CREATED'.
00:00:01.795 Changing the VM state from 'CREATED' to 'RUNNING'.
00:00:01.799 Guest Log: BIOS: VirtualBox 3.0.8
00:00:01.799 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:01.915 PIIX3 ATA: Ctl#0: RESET, DevSel=0 AIOIf=0 CmdIf0=0x00 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:01.916 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:01.917 Guest Log: BIOS: ata0-0: PCHS=16383/16/63 LCHS=1024/255/63
00:00:01.917 PIIX3 ATA: Ctl#1: RESET, DevSel=0 AIOIf=0 CmdIf0=0x00 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:01.919 PIIX3 ATA: Ctl#1: finished processing RESET
00:00:01.919 PIT: mode=2 count=0x48d3 (18643) - 64.00 Hz (ch=0)
00:00:01.929 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=00007fc2aa609000 w=640 h=480 bpp=32 cbLine=0xA00
00:00:04.415 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0
00:00:04.417 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:04.418 Guest Log: BIOS: Boot from Floppy 0 failed
00:00:04.419 Guest Log: BIOS: CDROM boot failure code : 0003
00:00:04.419 Guest Log: BIOS: Boot from CD-ROM failed
00:00:04.419 Guest Log: BIOS: Booting from Hard Disk...
00:00:13.080 Changing the VM state from 'RUNNING' to 'SUSPENDED'.
00:00:14.459 Console::powerDown(): A request to power off the VM has been issued (mMachineState=8, InUninit=0)
hohwille
Posts: 8
Joined: 6. Nov 2009, 15:51
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP

Re: Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by hohwille »

I also recreated the vmdk with 3.0.8.
Seems to be identical:

ddb.virtualHWVersion = "4"
ddb.adapterType="ide"
ddb.geometry.cylinders="16383"
ddb.geometry.heads="16"
ddb.geometry.sectors="63"
ddb.uuid.image="f5e052b9-1198-490c-baac-ec3fc7cd2ad4"
ddb.uuid.parent="00000000-0000-0000-0000-000000000000"
ddb.uuid.modification="00000000-0000-0000-0000-000000000000"
ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000"
ddb.geometry.biosCylinders="1024"
ddb.geometry.biosHeads="255"
ddb.geometry.biosSectors="63"

# fdisk /dev/sda

The number of cylinders for this disk is set to 12161.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x99a699a6

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3040 24414062+ 7 HPFS/NTFS
/dev/sda2 3041 5471 19527007+ 83 Linux
/dev/sda3 5472 6079 4883760 82 Linux swap / Solaris
/dev/sda4 6080 12161 48853665 7 HPFS/NTFS
hohwille
Posts: 8
Joined: 6. Nov 2009, 15:51
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows XP

Re: Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by hohwille »

changing bios and/or non-bios geometry of the disc according to fdisk does not make any difference in my case.
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: Physische Windows-Partition in VBox (Fehler beim Lesen)

Post by MarkCranness »

Sorry, I have only one thing left to suggest, which is:
Look at the NTFS VBR and see what the offset 0x1C 'Number of Heads' says there.
If that is not 255 (FF), then changing it to 255 (using my 'possible solution'/BuildBoot method) may help your XP VM boot, but may also prevent your dualboot XP from booting...
(My Linux-foo is increasing!) Run this on the host (should be the same as running it in the guest with /dev/hda...) and please post the results here:

Code: Select all

dd if=/dev/sda1 count=1 | hexdump -C
dd if=/dev/sda4 count=1 | hexdump -C
(Which was the XP partition, sda1 or sda4?)
If I have my syntax right, this should be the NTFS VBR and start with ???NTFS

And just to be very safe and sure: does fdisk give the same geometry as Easeus Partition Manager does?
Post Reply