LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-02-2006, 02:26 PM   #1
shame
Member
 
Registered: Apr 2006
Location: England
Distribution: Debian Sidux - openSUSE
Posts: 261

Rep: Reputation: 30
Loads of disk space but can't use it.


My main drive is a 300GB SATA drive.
By default it had 1 recovery partition and the rest of the drive was taken up with WinXP on another partition, filling the rest of the drive.
So I left the recovery partition as is and shrunk the winxp one.
I the created 2 primary partitions, one for swap and the other one to be used as an extended partition, using the rest of the disk, ready for me to split into logical partitions for my distros and stuff.
So basically, at the moment, my disk is set out like this -
Code:
sda1 - WinXP            15GB
sda3 - swap            512MB
sda4 - Extended
     - sda5 - shared    25GB
     - sda6 - kanotix   20GB
     - sda7 - openSUSE  20GB
     - Free Space      210GB
sda2 - Recovery          6GB - at the end of the disk
I have been trying to create more logical drives in the extended but both suse and gparted will only let me create 1 partiton of 15GB and no bigger and if I do that and try to create another, they say I have the maximum amount of primary partitions (which I do, 4) and the I need to create an extended partition. But I have one, with lots of free space.

Last edited by shame; 11-02-2006 at 02:29 PM.
 
Old 11-02-2006, 02:29 PM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
can you provide the output of `fdisk -l` ? Have a look at the start/end figures.
 
Old 11-02-2006, 04:24 PM   #3
shame
Member
 
Registered: Apr 2006
Location: England
Distribution: Debian Sidux - openSUSE
Posts: 261

Original Poster
Rep: Reputation: 30
I tried deleting the swap partition and recreating it to use as another extended partition but it didnt work, won't let me add another extended partition or any logical ones.
So at the moment things look like this -
Code:
sda1 - WinXP            15GB
sda4 - Extended
     - sda5 - shared    25GB
     - sda6 - kanotix   20GB
     - sda7 - openSUSE  20GB
     - unallocated      14.77GB
sda3 -                  177.17MB
sda2 - Recovery          6GB - at the end of the disk
I feel like I've really messed something up here (or suse did, which I used for the initial partitioning).

Output of fdisk -l
Code:
Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2115    16988706    7  HPFS/NTFS
/dev/sda2           35695       36481     6321577+   c  W95 FAT32 (LBA)
/dev/sda3           12566       35694   185783692+  83  Linux
/dev/sda4            2116       12565    83939625    f  W95 Ext'd (LBA)
/dev/sda5            2116        5381    26226112    c  W95 FAT32 (LBA)
/dev/sda6            5381        8027    21253995   83  Linux
/dev/sda7            8027       10637    20972794+  83  Linux
/dev/sda8           10638       11943    10490413+  83  Linux

Partition table entries are not in disk order
It's getting pretty confusing.
 
Old 11-02-2006, 04:36 PM   #4
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
Yes, it looks messy. 5 and 6 overlap, 6 and 7 also.
Is it possible to backup the whole thing and repartition from scratch? That is what I would do.
 
Old 11-02-2006, 05:20 PM   #5
shame
Member
 
Registered: Apr 2006
Location: England
Distribution: Debian Sidux - openSUSE
Posts: 261

Original Poster
Rep: Reputation: 30
Ideally that is exactly what I would like to do but it's not gonna be easy.
I really don't understand how thinigs got so messed up to start with. I have used many different partitioning tools with no problems (other than accidentally deleting the wrong partition a couple of times).
At the moment, my kanotix partition contains kanotix, (suprisingly) which I've just got working pretty much perfectly, plus all my backups and important stuff from my old drive.
My second "proper" backup drive failed on me yesterday, just after copying all the backups from the kanotix partition.
So now I have nothing to copy all the stuff to.
On top of this, the comp came with windows installed but no install disc, just the recovery partition so they must stay choose what (and luckily, they both seem unaffected by the messy partitions).
I did experiment with using partimage on the winxp partition but 3 images and restorations on a different (bigger) partition failed.
It looks like I may have no choice though, I did find a way to get all that space back and allow me to make more partitions but with all the messed up ordering and everything I can only imagine it's gonna give me some problems at some point.
So assuming I delete all the partitions and just keep the xp and recovery partitions.
This leaves me with a 15GB ntfs partition (sda1) at the start of the disk and a 6 or 7GB recovery partition (sda2) at the very end of the disk.
Is it a good idea to try to move the recovery partition to follow on from the windows one? At least the partitions will be in a proper order (sda1, sda2, sda3 etc) instead of mixed up if I leave the recovery partition at the end (sda1, sda3, sda2 etc).

When I orignally made the extended partition I did direct it to use the whole of the remaining disk so I wonder if sda2 at the end of the disk screwed up it's calculations?
 
Old 11-02-2006, 06:30 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
The biggest issue I see here is that the extended partition stops at 12565. This means that the space from 12565 to 35695 is inaccessible--ie fdisk will not let you make any more partitions. I don't know for sure how this happens---it happened to me the other day, but I fixed it.....fdisk will not change the size of the extended partition directly--in fact, it does not even show it. You CAN change it using QTParted or (I think) GParted.

Note that in normal mode, fdisk counts in units of 8225280 bytes--thus the apparent overlap my not be real. In fdisk, use the "u" command to change the units to sectors. If there is overlap in the SECTOR count, that would not be good....
 
Old 11-02-2006, 07:21 PM   #7
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Like uselpa have said. I suggest using Norton Ghost and do a partition to image of each partition, but do not do a disk copy. Then create partitions with the desire size. Use DVD instead of CD if you do not have enough hard drives laying around to shuffle your data around.

Yes, four primary partitions is the max, but there is a catch. If you want to put more than 4 partitions, one of the primary partitions have to be extended to fill the whole entire unused space. This means an extended partition is actually a primary partition that contains logical partitions which are real partitions contained in extended partition.

Use cfdisk instead of fdisk. The fdisk manual recommends using cfdisk anyways.
 
Old 11-02-2006, 08:27 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Electro
Yes, four primary partitions is the max, but there is a catch. If you want to put more than 4 partitions, one of the primary partitions have to be extended to fill the whole entire unused space. This means an extended partition is actually a primary partition that contains logical partitions which are real partitions contained in extended partition.
Actually, it's more like this: The first sector has space for four partition entries. If you want more partitions, one of these is a POINTER to another sector which contains two entries: a partition and another pointer. One poster observed that the whole thing is really more like a linked list. If you were to look at a map of the disk you would never see logical partitions contained in extended partitions.
It is a shortcoming in some partitioning programs that won't let you see whe is really going on--and which allows the first extended partition to have a bad end value such that you can't make more logical partitions.
QTParted does not have these issues.
 
Old 11-02-2006, 10:59 PM   #9
shame
Member
 
Registered: Apr 2006
Location: England
Distribution: Debian Sidux - openSUSE
Posts: 261

Original Poster
Rep: Reputation: 30
Well thanks for all the responses.
I been very busy since my last post and just got back online so I have already been messing around before I saw the suggestions.
So here's what I've been up to.
I had a rummage around amongst some old stuff and managed to find an old 10GB hard drive.
I copied over all my important stuff and used partimage to make images of both the recovery partition and my kanotix install, I didn't bother with win xp since I wasn't touching that partition in any way. Somehow it all managed to fit on the disk.
I used gparted on the kanotix cd to delete all partitions except the winxp one and the recovery one.
I then moved the recovery partition from the end of the disk to follow on from winxp.
Next I created an extended partition and a few logical partitions for my distros and swap and stuff.
I then used partimage to restore the kanotix image to the new partition and copied over all my important stuff on to the new shared partition and reinstalled suse.
As far as I can tell everything seems to be in order now. I am writing this from the restored kanotix install, it booted up fine though there was some error on boot but I didn't catch it. I'll look into it but everything seems to be working.
All other partitions, including the recovery one seem to be fine as well.
The partition table is now much tidier and I did a few dry runs in gparted and the suse
partitioner without applying and they were both letting me use up all the remaining disk space, but I'm leaving it empty for the time being.
Code:
sda1 - WinXP            15GB
sda2 - Recovery        6.03GB
sda3 - Extended
     - sda5 - swap       1GB
     - sda6 - shared    25GB
     - sda7 - kanotix   21GB
     - sda8 - suse      20GB
     - sda9 - dunno yet 20GB
Rest of the disk unallocated.
And everything looks fine with fdisk -l
Code:
Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2115    16988706    7  HPFS/NTFS
/dev/sda2            2116        2902     6321577+   c  W95 FAT32 (LBA)
/dev/sda3            2903       29900   216861435    5  Extended
/dev/sda5            2903        3033     1052226   82  Linux swap / Solaris
/dev/sda6            3034        6311    26330503+   b  W95 FAT32
/dev/sda7            6312        9189    23117503+  83  Linux
/dev/sda8            9190       11840    21294126   83  Linux
/dev/sda9           11841       14477    21181671   83  Linux

Last edited by shame; 11-02-2006 at 11:01 PM.
 
Old 11-03-2006, 12:26 AM   #10
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
Originally Posted by pixellany
Actually, it's more like this: The first sector has space for four partition entries. If you want more partitions, one of these is a POINTER to another sector which contains two entries: a partition and another pointer. One poster observed that the whole thing is really more like a linked list. If you were to look at a map of the disk you would never see logical partitions contained in extended partitions.
It is a shortcoming in some partitioning programs that won't let you see whe is really going on--and which allows the first extended partition to have a bad end value such that you can't make more logical partitions.
QTParted does not have these issues.
Sure do it your way. There is a very high chance that data loss will occur. If do it my way, data loss is little to none and new partition table will be better than before.

What I am saying in my previous post, if there are 4 primary partitions listed and want to add more partitions. You have to delete one of the primary partitions to create multiple partitions because an extended partition is stated as an primary partition. My previous post has nothing to do with sector linking or the nitty gritty specs of partitions.
 
Old 11-03-2006, 01:37 AM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Electro
Sure do it your way. There is a very high chance that data loss will occur. If do it my way, data loss is little to none and new partition table will be better than before.

What I am saying in my previous post, if there are 4 primary partitions listed and want to add more partitions. You have to delete one of the primary partitions to create multiple partitions because an extended partition is stated as an primary partition. My previous post has nothing to do with sector linking or the nitty gritty specs of partitions.
I do not recommend getting upset about this---and I did not question the wisdom of your method. I was only clarifying how extended partitions actually work........
 
  


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
Cedega "Disk space required for the installation exceeds available disk space" Solved Spewdemon LinuxQuestions.org Member Success Stories 1 10-18-2007 07:19 PM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 04:58 PM
linux loads winxp(second disk), it says "ntldr is missing" alexko Linux - Newbie 1 11-15-2004 06:55 AM
installed dropline, root loads kde3.2, user loads drop pgrimes Linux - Software 7 06-28-2004 07:11 PM
Disk space wastage 73 GB Hard disk rajgopalhg Linux - Hardware 2 10-18-2002 04:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:08 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