thinkpad-ec/fix-hdd-image.patch

17 lines
983 B
Diff

Qemu does not support disk images with more than 16 heads, but the lenovo
disk image is created with 64 heads. Since the MBR they used does not use
LBA to access the disk, this confuses it and causes it to fail.
This patch changes the partition end head/cylinder, which is all that is
needed to make the MBR happy
@@ fix partition table @@
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01 |................|
-000001c0 01 00 04 3f 20 1f 20 00 00 00 e0 ff 00 00 00 00 |...? . .........|
+000001c0 01 00 04 0f 20 7f 20 00 00 00 e0 ff 00 00 00 00 |.... . .........|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|