LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Partition Harddrive and File System (https://www.linuxquestions.org/questions/linux-general-1/partition-harddrive-and-file-system-489303/)

saikee 10-09-2006 03:29 AM

haertig has given some good references on the hard disk inner working. The following is a quick response. You need to read up the references (especially the first one) provided by haertig in order to understand more.

Answers to your questions.
(1) yes
(2) Yes, I believe 63 plus the disk itself make up a total of 64 devices
(3) Yes
(4) Yes but No to the advisible part. ( see also (7))
(5) Yes but not the extension of an extended partition. Logical partitions are form the extended partition except they cannot be located within the partition table inside MBR. They have to be searched like from moving from a continuous link of a chain. The ith logical partition carries the address of the i+1th logical partition.
(6) In a PC standard a hard disk is brokem down to sectors of 512 byes each. When powered up and the Bios is instructed to boot from a hard disk it always loads the first sector into memory and then from it to decide what to do next. It is dated back from Dos era and is the PC standard for all Bios.
(7) Linux boot loaders differ from others by requiring information of the partition to be booted to be decalred up front. In Grub there is always a "root" statement stating the partition to be booted. Lilo does this by the "image=" or "other=" statements (the latter for non-Linux partition but can be used just the same). Using the bootable flag actually causes confusion to the user so Linux never uses it. Systems based ob MS's convention of using the bootable flag are Solaris, Darwin, most of the BSD.

(G) 10-09-2006 05:03 AM

Thanks for your help haertig and saikee. I'll try and comprehend the details in those references.

pixellany 10-09-2006 01:36 PM

Quote:

haertig, saikee and pixellany,

Thanks for your in-depth answers. It certainly helped me understand partitions better but also confused me a wee bit.

To clarify what has been posted:

1) There can only ever been 4 primary and extended partitions
In the 1st sector (or any sector), there are only 4 entires allowed. Extended partitions are pointers, and I am not sure there is a limit.
Quote:

2) There can be a maximum of 63 partitions
Not sure about this. There are normally 63 sectors of space reserved for things like partition tables and boot code, but this can be changed. Within the 63 sectors, you have 4 entries in #0--eg 3 primary + 1 extended. That leaves 62 places to put logical partitions. Total=66 usable partitions. (Don't take my word for any of this.....;)

Quote:

3) There can be a maximum of 59 logical partitions
See above

Quote:

4) Linux does not require a primary partition but it is advisable (is this true and if so why?)
Does not require and is not even advisable/recommended--I think it simply does not care. What counts is that the boot code is able to point to the partition and directory where the kernel is.

Quote:

5) A logical partition is an extension of an extended partition to help overcome the barrier/limitation of 4 partitions
No---An extended partition is a pointer to a logical partition. (The last part is correct)


Quote:

6) What is the "First Sector of Track Zero" and I assume the 'Partition table' portion of the MBR is an index of all the partitions?
I think "1st sector of track 0" is synomous with "sector 0" This is where the mbr goes. Partition table in sector 0 is NOT a list of all the partition--see other notes for the details.

Quote:

7) If Linux does not require an 'active' flag to denote which partition to boot from, how does it know which partition to mount and boot from or does it simply look for the /boot partition under /?
The boot code tells the system where to look for the kernel. For example, look at the structure of a GRUB config file.

saikee 10-09-2006 05:32 PM

There is a limit on the number partitions supported by Linux.

For an IDE disk there are 63 partitions and these together with the disk itself make up 64 devices

A Sata is a SCSI disk and can only have 15 partitions, plus the disk itself give a total of 16 devices.

I think a number of Internet posts mentioned these limits before but every Linux user can verify them with a partitioning program like cfdisk, which actually informs us when these limits are reached.

Do take my word for it, just keep creating the number of partitions in an IDE and cfdisk will stop you at the number 63, even if you have loads of unallocated space remaining. Try to have the maximum number of primary partitions and see how many partitions you can get out from a Sata. There are all there to be found out by you.

The cfdisk program is the best teacher in partitioning. It is a pity most users prefer graphic desktop and miss the opportunity of being taught by this master. If there is something cfdisk cannot do it always is for a good reason.


All times are GMT -5. The time now is 03:51 PM.