Booting from flash - LBA Number Problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Masterkiller
Member
Member
Posts: 153
Joined: Sat May 05, 2007 6:20 pm

Booting from flash - LBA Number Problem

Post by Masterkiller »

I was trying to boot from flash, everything went OK and AH=42h/INT13h returns successfully, but after jumping to memory where the code should be loaded, it just stops. So I decided to display what information is stored at specified memory and it seems that is not information from the sector I load. On my 512MB flash I discover that the first sector e.g. the boot sector from where my code executes has LBA of 0x20 (32), not zero. I test it with a 2GB USB flash, and the boot sector code seems to be at 0x3F (63) LBA. The LBAs before these has some information, but seems to be not visible for OSes that uses a USB driver to load sectors from the flash.
What information is stored on these sector of the flash? How could I find which LBA is the boot sector?
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: Booting from flash - LBA Number Problem

Post by egos »

Use starting LBA stored in partition record of the flash MBR.
If you have seen bad English in my words, tell me what's wrong, please.
Post Reply