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?
mbr vs ebr how to tell the difference
Re: mbr vs ebr how to tell the difference
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?
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?
-
- Member
- Posts: 5501
- Joined: Mon Mar 25, 2013 7:01 pm
Re: mbr vs ebr how to tell the difference
The first sector of the disk is the MBR. The first sector of the extended partition is the EBR.ITchimp wrote:how to tell them apart?
It allows you to have more than four partitions.ITchimp wrote:what is the point of having ebr in the first place?
Re: mbr vs ebr how to tell the difference
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?
how do you know an extended partition entry exist at all?
-
- Member
- Posts: 422
- Joined: Tue Apr 03, 2018 2:44 am
Re: mbr vs ebr how to tell the difference
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
All the logical partitions are contained within a single MBR extended partition of type 0x5 (CHS) or 0xf (LBA).The partition table may have one and only one entry that has the SystemID 0x5 (or 0xF). This describes an extended partition.
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.