Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-30-2008, 01:44 PM   #1
LQ Newbie
Registered: Mar 2008
Posts: 11

Rep: Reputation: 0
fdisk - issue


I use Debian Etch in my Acer Aspire 5583 NWXMi laptop. It has a HDD capacity of 120 GB. My current fdisk -l output is given below:
# fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1020     8193118+   7  HPFS/NTFS
/dev/sda2            1021        1033      104422+  83  Linux
/dev/sda3            1034        3583    20482875   83  Linux
/dev/sda4            3584        9657    48789405    5  Extended
/dev/sda5            3584        4888    10482381   83  Linux
/dev/sda6            5999        6129     1052226   82  Linux swap / Solaris
/dev/sda7            6130        8562    19543041   83  Linux
/dev/sda8            5285        5998     5735173+  83  Linux
/dev/sda9            4889        5284     3180838+  83  Linux
/dev/sda10           8563        8988     3421813+  83  Linux
/dev/sda11           8989        9657     5373711   83  Linux

Partition table entries are not in disk order
As you can see in the first part immediatly after the command, it says I have 14593 cylinders. I created partitions in such a way that, till sda3 was made primary and then rest extended - logical. I still remember fdisk -l showing output with End as 14593 as Extended. Now its showing only 9657. Why is this? Any suggestions? Thank you in advance.


Old 06-30-2008, 02:10 PM   #2
LQ Guru
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
Looks like you haven't used the entire drive.. your extended partition does not go to the last cylinder

With 3 primary partitions and one Logical partition you have hit the limit on Intel hardware of 4 Primary partitions.. but since your logical partition doesn't reach the last cylinder of the drive the rest of the drive space is essentially un-accessible
3.3. Primary Partitions

The number of partitions on an Intel-based system was limited from the very beginning: The original partition table was installed as part of the boot sector and held space for only four partition entries. These partitions are now called primary partitions.

3.4. Logical Partitions

One primary partition of a hard drive may be subpartitioned. These are logical partitions. This effectively allows us to skirt the historical four partition limitation.

The primary partition used to house the logical partitions is called an extended partition and it has its own file system type (0x05). Unlike primary partitions, logical partitions must be contiguous. Each logical partition contains a pointer to the next logical partition, which implies that the number of logical partitions is unlimited. However, linux imposes limits on the total number of any type of partition on a drive, so this effectively limits the number of logical partitions. This is at most 15 partitions total on an SCSI disk and 63 total on an IDE disk.
Old 06-30-2008, 02:41 PM   #3
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Some partitioning programs will set the extended partition only to match the last logical---ie they will not let you make the extended arbitrarily large. My extended partition goes all the way to end of the disk. (I think) I did this with fdisk---first created the extended, then the logicals.
Old 06-30-2008, 03:09 PM   #4
LQ Newbie
Registered: May 2004
Location: sol 3 (3rd planet from sun)
Distribution: Redhat 9.0
Posts: 8

Rep: Reputation: 0
Not to be nosy but why so many...

Not to be nosy but why so many partitions?

I can understand
/dev/sda2 100MB /boot
/dev/sda3 20GB /(root)
/dev/sda6 1GB (swap)

but do you really need a separate /var /tmp /var/www /boot2 /(root2)?
I use to fine partition drive but it winds up a bureaucracy nightmare.
Trying to manage and duplicate across multiple system.

I settled on a simple /boot=100MB (swap)=2GB and /(root)=remainder.
Easy to remember, easy to configure, easy to script when I build a
duplicate system and leaves me a free partition to either logical sub-divide or leave to the Microsoft Windows HPFS world.

So what is with eleven-11 partitions?
Old 06-30-2008, 10:52 PM   #5
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,726
Blog Entries: 27

Rep: Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058Reputation: 2058

Partition schemes are dependent on how you use the system. If just a desktop then schemes can be simple. But if the system is a server then the partition scheme can really make or break the system. Especially if your logs are not rotated properly. Your '/home' outgrows the system. Your users can cause a lot of issues.
If your '/tmp' fills then problems are probable.

There are a lot of possible 'ifs'. Google/linux will get you loads of information relative to partition schemes or arguments.
Old 07-01-2008, 11:35 AM   #6
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50

I settled on a simple /boot=100MB (swap)=2GB and /(root)=remainder.
I would ask you why such a large swap? The "old" rule was 1 1/2 to 2 times ram size, but that was when systems had very little ram to start with. If your system has 1G ram swap need not be over 512mb.
Old 07-01-2008, 01:54 PM   #7
LQ Newbie
Registered: Mar 2008
Posts: 11

Original Poster
Rep: Reputation: 0

No offense.. but we are deviating from the topic. As pixellany has said, it was the same way I partitioned the disk - and that too using fdisk. I created 3 primary partitions and then made rest to be extended. And then logical drives. Hence I got the end cylinder as 14593 it remained the same. But now, one fine day, its showing just 9657. Any reason why this has happened? I was able to recover the the rest of the cylinder using a tool, PartedMagic LiveCD. But I need to know the reason why it has happened. Any suggestions?



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
weird fdisk problem (Fdisk unable to see winxp partitions) khidot Slackware - Installation 5 04-07-2007 09:26 PM
Fdisk issue with 250GB HD bluedevlx Linux - General 6 05-03-2005 09:11 AM
using fdisk jonn Linux - Newbie 2 08-03-2004 03:10 PM
Fdisk rstmn957 Slackware 2 12-23-2003 07:15 PM
can't fdisk tweak13 Linux - Newbie 4 04-02-2003 01:02 AM

All times are GMT -5. The time now is 08:09 AM.

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