|
Site highlights
LUKS - Linux Unified Key Setup
New Methods In Hard Disk Encryption - Close encounter with storage encryption
Ego - introducing myself
Recent Blog Lines
|
Removing CHS based access from windows boot loaders Sat Dec 22 12:22:48 CET 2007
Recently, I had troubles to migrate my Windows installation from
VMWare to VirtualBox. When booting
the vmware created partition in virtualbox, I got "NTLDR not found".
So I sharpened the knives and got down to business with vmware's gdb
interface and virtualbox's internal debugger. Tracing the execution
showed that the BIOSes of the two products reported different
geometries on the INT 13h interface. The generic method contained in
the boot loader to read a sector from disk is "clever" as it checks
whether the sector is below the maximum sector index that is reachable
with the CHS geometry reported by the BIOS. If not, it uses the LBA
interface of the BIOS. If yes, the cleverness of the boot loader
suddenly vanishes. Instead of using the BIOS reported geometry to
break the absolute sector down into its CHS components, the boot
loader uses a geometry stored in the so called BIOS parameter
block. That's a section of the first sector embedded into the boot
loader that hard codes such values as head per cylinder and sectors
per heads into the boot loader. If the hard coded values are different
from the ones used by the BIOS, the calculation produces wrong values.
So, if you move your partition to a BIOS that exposes a different
geometry to the boot loader than is hard coded in the boot loader the
whole thing blows up. Brilliant Microsoft design, as ever.
|