MBR signature invalid

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
WinExperements
Member
Member
Posts: 97
Joined: Thu Jul 14, 2022 9:45 am
Contact:

MBR signature invalid

Post by WinExperements »

So i am trying to read the MBR partition table from hard drive via ATA PIO, and my mbr structure goes wrong(always zero).
Maybe i am incorrectly reading it? Or something else?
mbr.png
Here the output of readed data and the mbr structure signature
Octocontrabass
Member
Member
Posts: 5563
Joined: Mon Mar 25, 2013 7:01 pm

Re: MBR signature invalid

Post by Octocontrabass »

That looks like half of a normal Windows MBR. Where's the other half?
WinExperements
Member
Member
Posts: 97
Joined: Thu Jul 14, 2022 9:45 am
Contact:

Re: MBR signature invalid

Post by WinExperements »

Octocontrabass wrote:Where's the other half?
Okay I am read 256 words as sector, if I set it to 512 nothing changes, so what I am doing wrong with reading?
Octocontrabass
Member
Member
Posts: 5563
Joined: Mon Mar 25, 2013 7:01 pm

Re: MBR signature invalid

Post by Octocontrabass »

You're reading 256 words, but you're displaying 256 bytes. You lost half of each word somewhere.
Post Reply