LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-09-2006, 03:29 AM   #16
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113

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.

Last edited by saikee; 10-09-2006 at 04:50 AM.
 
Old 10-09-2006, 05:03 AM   #17
(G)
LQ Newbie
 
Registered: Oct 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for your help haertig and saikee. I'll try and comprehend the details in those references.
 
Old 10-09-2006, 01:36 PM   #18
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
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.
 
Old 10-09-2006, 05:32 PM   #19
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
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.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File recovery after partition table damage - XFS file system gracecourt Linux - General 4 09-28-2017 05:29 PM
File System / Partition Setup wasabi Linux - General 12 10-08-2006 11:21 AM
Tried to create a partition on my harddrive and boots with a system restore BWhere Linux - Newbie 1 01-23-2006 12:44 AM
How can i backup whole linux partition and file system ?? my-unix-dream Linux - Newbie 3 04-19-2005 09:11 PM
Dual boot/Partition file system Gryphix Linux - Newbie 2 09-18-2003 05:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:15 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration