VBox 6.1.34 and Windows XP

Discussions related to using VirtualBox on Windows hosts.
MietekN
Posts: 7
Joined: 6. May 2022, 11:02

Re: VBox 6.1.34 and Windows XP

Post by MietekN »

"geometry" tries to change the parameters but makes no changes:

Code: Select all

vbox-img info --filename "d:\VPC\Windows XP\Windows XP.vhd"
--- Dumping VD Disk, Images=1
Dumping VD image "d:\VPC\Windows XP\Windows XP.vhd" (Backend=VHD)
Header: Geometry PCHS=33288/16/63 LCHS=0/0/0 cbSector=512
Header: uuidCreation={4ce9fbcd-96d4-4a67-a2b6-ef9b4e051622}
Header: uuidParent={00000000-0000-0000-0000-000000000000}

vbox-img geometry --filename "d:\VPC\Windows XP\Windows XP.vhd"  --cylinders 1024 --heads 255 --sectors 63
Old image LCHS: 0/0/0
New image LCHS: 1024/255/63

vbox-img info --filename "d:\VPC\Windows XP\Windows XP.vhd"
--- Dumping VD Disk, Images=1
Dumping VD image "d:\VPC\Windows XP\Windows XP.vhd" (Backend=VHD)
Header: Geometry PCHS=33288/16/63 LCHS=0/0/0 cbSector=512
Header: uuidCreation={4ce9fbcd-96d4-4a67-a2b6-ef9b4e051622}
Header: uuidParent={00000000-0000-0000-0000-000000000000}
Last edited by MietekN on 12. May 2022, 11:10, edited 1 time in total.
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VBox 6.1.34 and Windows XP

Post by fth0 »

MietekN wrote:"geometry" tries to change the parameters but makes no changes
I tried it myself and got the same result. It doesn't persist on VHD images, but it does persist on VDI images. So, if you have no special reason to use the VHD format, you could convert the virtual hard disk image:

Code: Select all

cd "C:\Program Files\Oracle\VirtualBox"
vbox-img convert --srcfilename "VHD file" --dstfilename "VDI file"
vbox-img geometry --filename "VDI file" --cylinders 1024 --heads 255 --sectors 63
vbox-img info --filename "VDI file"
Note that you'll need additional host disk space for the converted image (at least temporarily). Afterwards, replace the virtual hard disk in the VM configuration.

Please let us know if this works for you. If not, I'll suggest another possible solution.
MietekN
Posts: 7
Joined: 6. May 2022, 11:02

Re: VBox 6.1.34 and Windows XP

Post by MietekN »

I solved the problem by creating a new VHD of the same size and copying all the content with gparted. After creating the MBR on the new disk (fixmbr), the system works correctly.

Code: Select all

vbox-img info --filename "d:\VPC\Windows XP\Windows XP.vhd"
--- Dumping VD Disk, Images=1
Dumping VD image "d:\VPC\Windows XP\Windows XP.vhd" (Backend=VHD)
Header: Geometry PCHS=33288/16/63 LCHS=0/0/0 cbSector=512
Header: uuidCreation={74ade3e7-2f3c-499d-ab42-a01242ca249e}
Header: uuidParent={00000000-0000-0000-0000-000000000000}
Values are the same but works.
Attachments
NewMBR.zip
New MBR
(494 Bytes) Downloaded 7 times
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VBox 6.1.34 and Windows XP

Post by fth0 »

Thanks for sharing the info. The new MBR now has the expected End-CHS values 1023/254/63, so that the VirtualBox auto-detection (triggered by LCHS=0/0/0) works correctly. This is a viable alternative to disabling the auto-detection as suggested by me. Kudos for finding the solution. :)
klaus
Oracle Corporation
Posts: 1133
Joined: 10. May 2007, 14:57

Re: VBox 6.1.34 and Windows XP

Post by klaus »

Just investigated... the LCHS change with VHD images gets lost because the VHD format has no place for storing LCHS geometry. Just the PCHS geometry which is mostly useless.
Post Reply