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!
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.
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.
You want to grow sda5 using space that is after sda6?
Hopefully, the liveCD doesn't have the swap space (sda6) mounted. If it does have the swap space mounted, you need to give the following command as root before gparted can change sda6.
Code:
swapoff -a
Then you need to either move sda6 or delete it and later recreate it. I think delete/recreate is easier for swap space.
1) Delete sda6.
2) Decide on a new size for swap.
3) Increase the size of sda5 but leave enough unused to allow for the swap you want.
You want to grow sda5 using space that is after sda6?
Hopefully, the liveCD doesn't have the swap space (sda6) mounted. If it does have the swap space mounted, you need to give the following command as root before gparted can change sda6.
Code:
swapoff -a
Then you need to either move sda6 or delete it and later recreate it. I think delete/recreate is easier for swap space.
1) Delete sda6.
2) Decide on a new size for swap.
3) Increase the size of sda5 but leave enough unused to allow for the swap you want.
4) Recreate the swap partition.
How would I create the swap partition again? I read that it isn't even necessary. Would you agree with that?
You will need a swap disk if you have little ram, and use memory intensive programs such as games. You can delete swap and or move it. However, regardless what you do, you will need to edit your /etc/fstab and tell linux weather you have a swap disk and where it is located. If not, you will probably get an error at boot.
You can delete swap, expand your /dev/sda5 and add swap. You probably do not need 3+ gigs for swap. I partitioned only 1 gig.
You will need a swap disk if you have little ram, and use memory intensive programs such as games. You can delete swap and or move it. However, regardless what you do, you will need to edit your /etc/fstab and tell linux weather you have a swap disk and where it is located. If not, you will probably get an error at boot.
You can delete swap, expand your /dev/sda5 and add swap. You probably do not need 3+ gigs for swap. I partitioned only 1 gig.
I don't care about the size of the swap unless its over 10 gb. How would I add the swap after expanding the sda5 partition? Do I do this in Gparted.
QUOTE=magic8ball88;3977167]
Do I do this in Gparted.[/QUOTE]
Yes.
1. Delete swap
2. Expand /dev/sda5 (ext4) leaving 1 gb or so left.
3. Create another partition linux swap.
It might or might not be labeled /dev/sda6
If it still is /dev/sda6, leave /etc/fstab alone. If not, edit edit fstab to correct device label.
Having some swap is a good idea and probably 2GB is the best guess at an appropriate size. You have enough disk space you probably don't care much about the last 2GB.
In gparted, you can right click on the remaining unallocated space (after expanding sda5) and select new and change the Filesystem field to linux-swap, then adjust the size/position if you don't want to use all the unallocated space, then click Add
With a family using a computer, you might switch user a lot leaving open programs in each account. For that reason or some entirely different reason, you might have a lot of open but idle programs.
Having a lot of open but idle programs is one reason you might need more than 2GB of swap. Other reasons are even less likely. If your active programs were too big for 1GB physical plus 2GB swap then they would be too slow to run even with more swap. So more swap only makes sense for idle programs. 2GB is enough swap space for an ordinary number of idle programs plus occasional swapping by some non idle large program (video editor, etc.) plus a fair margin for error.
Okay thanks guys that worked but now since I have the extra space I would like to add some to the Windows partition. Same story but the unallocated space is inside of sda3 and the Windows partition is sda 2.
now since I have the extra space I would like to add some to the Windows partition. Same story but the unallocated space is inside of sda3 and the Windows partition is sda 2.
That's a bit harder. Without trying it, I never remember what gparted lets you do for resizing and moving extended partitions.
You want to move and shrink the extended partition (sda3) so there is free space before it. For that to work at all you would need free space at the beginning or end of sda3.
If the design made sense (I don't know if it does) the move/shrink of sda3 would be easiest if the free space were before sda5, requiring that you first move sda5 within sda3 before moving sda3.
But maybe the design works the other way, so you would need free space at the end of sda3 to move/shrink it.
That's a bit harder. Without trying it, I never remember what gparted lets you do for resizing and moving extended partitions.
You want to move and shrink the extended partition (sda3) so there is free space before it. For that to work at all you would need free space at the beginning or end of sda3.
If the design made sense (I don't know if it does) the move/shrink of sda3 would be easiest if the free space were before sda5, requiring that you first move sda5 within sda3 before moving sda3.
But maybe the design works the other way, so you would need free space at the end of sda3 to move/shrink it.
I do understand what you're saying, and I did it earlier but I can't seem to do it right now.
Okay thank you for your help all. I got everything the way I want it now. The problem is that if you want to extend a partition using unallocated space it must be above the partition you want to resize. So right click on the partition you want to grow and change the values so that the space preceding has all the unallocated space not the space following. Then after that you can grow the partition. Using that on the Windows partition was a little more tricky. I had to do the following steps and I also had to shrink the entire sda3 partition then I could grow my windows partition.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.