LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
fdisk - issue


Hi,

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:
Code:
# 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.

Regards,

Kurian.
 
Old 06-30-2008, 02:10 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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

http://tldp.org/HOWTO/html_single/Partition/#primary
Quote:
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
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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
Ajax4Hire
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
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

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
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
Quote:
Ajax4Hire

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
kurianthayil
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Hi,

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?

--Kurian.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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
Open Source Consulting | Domain Registration