LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GPARTED help (https://www.linuxquestions.org/questions/linux-newbie-8/gparted-help-4175425178/)

cjones903 09-01-2012 04:09 PM

GPARTED help
 
I have been browsing this site for hours and while I can find plenty of threads on the subject, I cannot seem to find one that matches my situation... or at least that I can get their solution to work. I have read in several places that if unallocated space is next to a partition, I should be able to extend the partition to consume the unallocated space. I understand the concepts of unmounting and running from a livecd, and have used parted magic to no avail. When I click my sda4 and try to resize it, it is showing no avaialable space at the end, and saying that it is already at its maximum size. I am including a screenshot of GPARTED and my fdisk -l output. Thanks.

cjones903 09-01-2012 04:16 PM

http://www.flickr.com/photos/86335928@N05/

pixellany 09-01-2012 04:19 PM

Nothing attached---perhaps because you are new.

I assume you are using GParted from a live CD----and also running fdisk from live CD?

Just tell us the essence of how the disk is partitioned----eg the number and size of the partitions and are they all primary---or is there an "extended" partition, plus one or more "logical".

pixellany 09-01-2012 04:20 PM

You were posting your screen shots while I was typing----Stand By....

pixellany 09-01-2012 04:24 PM

OK---You have an extended partition** (sda3) taking all the space not used by sda1 or sda2. You can create new partitions inside sda3, but you cannot grow sda1 or sda2 into that space.

All you need to do is to first shrink sda3---then you can increase or move sda2.


**Think of extended partitions as "containers" for logical partitions.

cjones903 09-01-2012 04:34 PM

Thanks for such a quick response. As i understand it, I could shrink sda3 and then move sda4 to take that space? I have tried shrinking the large unallocated space, but GPARTED will not let me. I appreciate the explanation of partitions. I forgot to mention, I would like for sda4 to occupy, additionally, the unallocated space

SecretCode 09-01-2012 04:47 PM

Yes, it looks like sda3 (the extended partition) contains only unallocated space and the swap partition.

In principle you could delete the swap partition sda5 and then delete the extended partition sda3 completed - and recreate them afterwards. Swap areas don't contain anything you need to save between reboots.

However it may be that the Live CD has found the swap partition and is using it (though I don't see a lock on it in your gparted screenshot).

Try deleting the swap partition sda5, and if you can do that, delete sda3 - or resize it if you prefer.

(You can't resize an unallocated space ... because this doesn’t really mean anything.)

cjones903 09-01-2012 04:53 PM

I have deleted sda5, but I do not understand what you mean by "then delete the extended partition sda3 completed". I'm sorry, this is my first experience repartitioning in Linux.

EDDY1 09-01-2012 04:55 PM

You cant shrink the unallocated space you have to shrink the container(extended partition) which is sda3 then you can grow sda4.
Using gparted shrink sda3 from left.

cjones903 09-01-2012 04:59 PM

AHA! The eureka moment was "from left". I had always assumed it just shrank as a whole instead of actually considering the borders as movable things. Thank you so much!

EDDY1 09-01-2012 05:10 PM

You're welcome!

SecretCode 09-01-2012 05:24 PM

Quote:

Originally Posted by cjones903 (Post 4770205)
I have deleted sda5, but I do not understand what you mean by "then delete the extended partition sda3 completed". I'm sorry, this is my first experience repartitioning in Linux.

Sorry, that was a typo for "completely" :redface:

Anyway, glad to see you have fixed it.

EDDY1 09-01-2012 07:16 PM

As SecretCode explained you could've remove sda5 & sda3 especially since the only thing that resides in sda3 so it wouldn't have change your /etc/fstab so there would be no real editing. But by doing so, depending on how much ram your system has, you could possibly run short of memory.

Knightron 09-01-2012 08:00 PM

Quote:

Originally Posted by cjones903 (Post 4770205)
I have deleted sda5, but I do not understand what you mean by "then delete the extended partition sda3 completed". I'm sorry, this is my first experience repartitioning in Linux.

Hello cjones. I'm glad to hear your issue is now resolved. I just thought i'd explain a couple things for your benefit.
There are three types of partitions; Primary, Extended, and Logical. Because of old technical limitations, the maximum amount of primary partitions you can have is four. A primary partition can be bootable and often has an operating system on it. Due to the four partition limitations, Extended partitions were invented. You may have up to only three primary partitions with the extended partition: and only ever one extended partition regardless of what else is there. An extended partition work like a container. On my computer and likely other peoples too, it is the biggest partition. It is often the biggest partition, because an extended partition is then separated into x amount of logical partitions, the user deems appropriate. A logical partition works much like a primary partition and often also contains an operating system.

Gnu/Linux is bootable off both primary and logical partitions. It's important though to realise that not all operating systems are bootable off logical partitions. FreeBSD for example needs to be on a primary partition, (FreeBSD also uses different jargon to describe partitions, but i'm not going to get into that here). I'm unsure on Windows, but i think it needs a primary partition too.

I hope that has helped your understanding of partitioning. :-)


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