Re: MBR
- From: Sc0rpi0 <sc0rpi0@xxxxxxxxxxxxxx>
- Date: Tue, 29 Nov 2005 02:13:56 +0100
Bill Cunningham:
> How to I read the Master Boot Record? Is there a certain format to
> read
> MBRs I'm sure there must be? I would like to access it and write something
> that I could change partition types and sizes. If I need to write it in C.
Then you have to find how to read/write your HDD's first physical sector
(if you using (C)ylinder (H)ead (S)ector then it will be C=0 H=0 S=1).
You did not said which OS you are writing for, so it depends on it.
Last 4*16+2 bytes is 4 partitions descriptors plus 2byte marker. Other
content (from 0 byte to first part. desc.) is just boot loader code.
And single partition descriptior draft is easy to find with Google.
Just it says if part. is bootable, where it begins, type and where it ends.
--
Sc0rpi0
I hated going to weddings.
All the grandmas would poke me saying "You're next".
They stopped that when I started doing it to them at funerals.
.
- References:
- MBR
- From: Bill Cunningham
- MBR