OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Apr 28, 2024 1:39 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: mbr vs ebr how to tell the difference
PostPosted: Sun Dec 10, 2023 6:17 am 
Offline
Member
Member

Joined: Sat Aug 18, 2018 8:44 pm
Posts: 127
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?


Top
 Profile  
 
 Post subject: Re: mbr vs ebr how to tell the difference
PostPosted: Sun Dec 10, 2023 7:01 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4597
Location: Chichester, UK
https://dbpedia.org/page/Extended_boot_record


Top
 Profile  
 
 Post subject: Re: mbr vs ebr how to tell the difference
PostPosted: Sun Dec 10, 2023 4:33 pm 
Offline
Member
Member

Joined: Sat Aug 18, 2018 8:44 pm
Posts: 127
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?


Top
 Profile  
 
 Post subject: Re: mbr vs ebr how to tell the difference
PostPosted: Sun Dec 10, 2023 5:37 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
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.


Top
 Profile  
 
 Post subject: Re: mbr vs ebr how to tell the difference
PostPosted: Sun Dec 10, 2023 6:19 pm 
Offline
Member
Member

Joined: Sat Aug 18, 2018 8:44 pm
Posts: 127
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?


Top
 Profile  
 
 Post subject: Re: mbr vs ebr how to tell the difference
PostPosted: Sun Dec 10, 2023 7:31 pm 
Offline
Member
Member

Joined: Tue Apr 03, 2018 2:44 am
Posts: 403
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

Quote:
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group