LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices



Reply
 
Search this Thread
Old 12-15-2005, 11:31 PM   #1
canaan
LQ Newbie
 
Registered: Dec 2005
Posts: 6

Rep: Reputation: 0
Question boot sector of extended partition


Since the partition table of extended partition is different with the partition table of MBR. So where is the boot sector of extended partition? Is it the same boot sector of the first logical partition?

Look the example below:
/dev/hda1 primary partition
/dev/hda2 extended partition
/dev/hda5 logical partition
/dev/hda6 logical partition

Is the boot sector of /dev/hda2 the same boot sector of /dev/hda5?
 
Old 12-16-2005, 12:11 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
I hope I have this right.....

A hard drive has the boot sector as the first sector--it is not associated with any particular partition. The last entries in the boot sector are the partition table for 4 primary or extended partitions. If there are more partitions, they appear in the SECOND sector of the drive.
In my system, the real data starts in sector 63---ie 0-62 are used for the boot sector, partition tables and ??.
Google for a reference on partition table format, boot record format, etc. Then use dd to explore your drives
For example: dd if=/dev/hda of=filename bs=512 count=1 will put the first 512byte sector into a file named "filename". Then run this thru hexdump to see the data. (in place of hda, put your drive number---which you can find by looking at mtab, fstab, or by using fdisk.)
 
Old 12-16-2005, 03:43 AM   #3
canaan
LQ Newbie
 
Registered: Dec 2005
Posts: 6

Original Poster
Rep: Reputation: 0
I think you are correct about the MBR, the boot sector of whole disk(at the very first sector).

But there are still partition boot sectors, which seem to be located at the first sector of each partition.

my question is still not answered.
 
Old 12-16-2005, 10:13 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
See the post I just made to another current thread:

http://www.linuxquestions.org/questi...d.php?t=393047

Do you have any examples of finding boot code in the first sector of a partition, as opposed to the first sector of the disk?

Last edited by pixellany; 12-16-2005 at 10:15 AM.
 
Old 12-16-2005, 12:55 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,152

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Each partition has a boot sector which is different then the MBR.
http://www.microsoft.com/resources/d...b_dis_qxql.asp

The extended partition boot sector is really the extended boot record so /hda2 would be different the /hda5
 
Old 12-19-2005, 10:25 PM   #6
canaan
LQ Newbie
 
Registered: Dec 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks michaelk for providing a link to the matertial about the the boot sector.

But I am still confused, where is the sector of "extended partition boot sector" of /dev/hda2? Since from that link, only logical partition has boot sector. and there is no sectors that not belong to any logical partition, right?
 
Old 12-20-2005, 01:03 AM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Moved: This thread is more suitable in <General> and has been moved accordingly to help your thread/question get the exposure it deserves.

And that's despite the fact that it's very closely related to
http://www.linuxquestions.org/questi...d.php?t=393047

However, this one clearly isn't a Linux question
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a linux OS boot from a extended partition? rrfish72 Linux - General 8 12-14-2004 02:56 AM
Boot off of extended partition? oasisbhrnw99 Linux - Newbie 2 10-25-2004 12:49 PM
MBR and First Sector of Boot Partition. mrpc_cambodia Red Hat 1 08-25-2004 02:58 AM
Install Grub/Lilo at the First Sector of the Boot Partition?? ckamheng Linux - General 2 08-21-2004 10:35 AM
Booting from an extended partition - need a partition table editor Ouch_Taser Linux - General 2 02-10-2004 07:22 PM


All times are GMT -5. The time now is 01:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration