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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-02-2006, 01:26 PM
|
#1
|
Member
Registered: Apr 2006
Location: England
Distribution: Debian Sidux - openSUSE
Posts: 261
Rep:
|
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 01:29 PM.
|
|
|
11-02-2006, 01:29 PM
|
#2
|
Senior Member
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507
Rep:
|
can you provide the output of `fdisk -l` ? Have a look at the start/end figures.
|
|
|
11-02-2006, 03:24 PM
|
#3
|
Member
Registered: Apr 2006
Location: England
Distribution: Debian Sidux - openSUSE
Posts: 261
Original Poster
Rep:
|
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.
|
|
|
11-02-2006, 03:36 PM
|
#4
|
Senior Member
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507
Rep:
|
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.
|
|
|
11-02-2006, 04:20 PM
|
#5
|
Member
Registered: Apr 2006
Location: England
Distribution: Debian Sidux - openSUSE
Posts: 261
Original Poster
Rep:
|
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?
|
|
|
11-02-2006, 05:30 PM
|
#6
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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.... 
|
|
|
11-02-2006, 06:21 PM
|
#7
|
LQ Guru
Registered: Jan 2002
Posts: 6,042
Rep: 
|
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.
|
|
|
11-02-2006, 07:27 PM
|
#8
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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.
|
|
|
11-02-2006, 09:59 PM
|
#9
|
Member
Registered: Apr 2006
Location: England
Distribution: Debian Sidux - openSUSE
Posts: 261
Original Poster
Rep:
|
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 10:01 PM.
|
|
|
11-02-2006, 11:26 PM
|
#10
|
LQ Guru
Registered: Jan 2002
Posts: 6,042
Rep: 
|
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.
|
|
|
11-03-2006, 12:37 AM
|
#11
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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........
|
|
|
All times are GMT -5. The time now is 04:40 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|