Skip to content

Commit f9f8cf8

Browse files
committed
fix loader trying to boot from active partition missing valid signature
1 parent 12633be commit f9f8cf8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

source/fdisk/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ utf8tocp/utf8tocp.exe : utf8tocp/utf8tocp.obj
209209
# --- CLEANUP ---------------------------------------------------------------
210210

211211
clean : .SYMBOLIC
212+
rm -f bootnorm.c
212213
rm -f *.obj
213214
rm -f fdisk.lnk
214215

source/fdisk/bootnorm.asm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
RELOCATED_OFFSET equ 0x0600
1717
PARTTBL_SIZE equ 64
1818
PARTTBL_OFFSET equ 0x1be
19+
MAGIC_OFFSET equ 0x1fe
1920
CODE_SIZE equ 440
2021

2122
org RELOCATED_OFFSET
@@ -67,7 +68,7 @@ chainload_bootsect:
6768
call fatal ; does not return
6869
db 'read error while reading drive', 0
6970
.check_signature:
70-
cmp word [signature], 0xaa55
71+
cmp word [BOOTSECT_OFFSET+MAGIC_OFFSET], 0xaa55
7172
je handoff_to_volume_bootrecord
7273
call fatal ; does not return
7374
db 'partition signature != 55AA', 0

0 commit comments

Comments
 (0)