LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   boot sector of extended partition (https://www.linuxquestions.org/questions/general-10/boot-sector-of-extended-partition-393401/)

canaan 12-15-2005 10:31 PM

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?

pixellany 12-15-2005 11:11 PM

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.)

canaan 12-16-2005 02:43 AM

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

pixellany 12-16-2005 09:13 AM

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?

michaelk 12-16-2005 11:55 AM

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

canaan 12-19-2005 09:25 PM

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?

Tinkster 12-20-2005 12:03 AM

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


All times are GMT -5. The time now is 07:06 PM.