The t430 ISO images are slightly larger than all the other ones, so the hdd image fix does not apply. Fix this by selecting the patch to use based on the size of the hdd image

asm
Hamish Coleman 8 years ago
parent 282d7b1a90
commit 53df7d5a8e

@ -207,7 +207,7 @@ GETELTORITO := ./geteltorito
# extract the DOS boot image from an iso (and fix it up so qemu can boot it)
%.img: %.iso
$(GETELTORITO) -o $@ $<
./hexpatch.pl $@ fix-hdd-image.patch
./hexpatch.pl $@ fix-hdd-image-$(shell stat -c %s $@).patch
$(call build_info,$<.bat)
# $1 is the lenovo named iso

@ -5,6 +5,8 @@ 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
This patch is for disk images with 65536 sectors (33554432 bytes)
@@ 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 |................|

@ -0,0 +1,18 @@
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
This patch is for disk images with 75776 sectors (38797312 bytes)
@@ 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 24 20 00 00 00 e0 27 01 00 00 00 |...? . .........|
+000001c0 01 00 04 0f 20 90 20 00 00 00 e0 27 01 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.|
Loading…
Cancel
Save