Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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
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.
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.
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.
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.
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?