Page 1 of 1
mbr vs ebr how to tell the difference
Posted: Sun Dec 10, 2023 6:17 am
by ITchimp
I m studying the minix 3.1 book, how to tell the difference between mbr and ebr, they look pretty the same... how to tell them apart?
what is the point of having ebr in the first place?
Re: mbr vs ebr how to tell the difference
Posted: Sun Dec 10, 2023 7:01 am
by iansjack
Re: mbr vs ebr how to tell the difference
Posted: Sun Dec 10, 2023 4:33 pm
by ITchimp
i still don't understand how to distinguish between ebr and a normal partition entry?
can I say that ebr's entry has the sector length of 1, iow, if first sector and last sector has the same value in chs notion or lba notion
it must be an ebr entry, is this correct?
Re: mbr vs ebr how to tell the difference
Posted: Sun Dec 10, 2023 5:37 pm
by Octocontrabass
ITchimp wrote:how to tell them apart?
The first sector of the disk is the MBR. The first sector of the extended partition is the EBR.
ITchimp wrote:what is the point of having ebr in the first place?
It allows you to have more than four partitions.
Re: mbr vs ebr how to tell the difference
Posted: Sun Dec 10, 2023 6:19 pm
by ITchimp
how do you know a partition entry points to a normal partition or an extended partition?
how do you know an extended partition entry exist at all?
Re: mbr vs ebr how to tell the difference
Posted: Sun Dec 10, 2023 7:31 pm
by thewrongchristian
ITchimp wrote:how do you know a partition entry points to a normal partition or an extended partition?
how do you know an extended partition entry exist at all?
Ref:
https://wiki.osdev.org/Partition_Table# ... Partitions
The partition table may have one and only one entry that has the SystemID 0x5 (or 0xF). This describes an extended partition.
All the logical partitions are contained within a single MBR extended partition of type 0x5 (CHS) or 0xf (LBA).
So, you read the MBR, find one of the partitions is an extended partition by the partition type.
Then you process the logical partitions within that extended partition by walking the chain of the logical partitions, the extended boot record having the same format as a MBR, with two entries:
- The first entry describing the logical partition itself, with LBA relative to the start of the extended partition.
- The second entry pointing to the next EBR, so that EBR form a forward linked list.