Guys? I got it working!
The issue was that I pushed Hidden Sectors value without incrementing it first, so that would load the bootsector all over again... And I've triple-checked all the values there, so it's working allright now. On my real machine.
The curious thing is that it still didn't work under QEMU when I go:
So I made an image file of the starting sectors of the harddisk (the NTFS partition is the first, so that image spans MBR and the first 2 sectors of NTFS partition).
Ran with
Code: Select all
qemu -L <whatever> -hdb <imagefile>
and it worked!
Love4Boobies wrote:In case you did that (to the right offset) outside of the assembly file (which is sort of weird) then nevermind.
Yep, I did that outside of the assembly file. The JMP instruction was down there all the time, actually. On NTFS, it always jumps to the offset 0x54.
Well, how could I change this so it wouldn't look weird to you? If I made the file from the origin 7C00h and replaced the whole partition bootsector with it, it would erase all the whatever structures it had. So I wrote an installer that uses Win32 API to paste the bootloader binary file at the exact offset (and it also checks the 55h, 0AAh signature to make sure the length is allright).
btw, I love your nickname
Don't get too angry with me.