LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-21-2010, 07:46 PM   #1
magic8ball88
LQ Newbie
 
Registered: Nov 2009
Distribution: Linux Mint 8
Posts: 21

Rep: Reputation: 15
Unallocated Space in Gparted?


Sorry if this has been posted before but I'm a newb and I'm having a difficult time finding what I need.

Here's the problem (I'll give you a basic timeline of whats happened)

1) Installed Windows 7

2) Installed Ubuntu 10.4

3) Installed Linux Mint 9 Beta

4) Updated Linux Mint 9 Beta to RC and no longer had a need for Ubuntu 10.4

5) Booted into live cd and using Gparted, erased Ubuntu 10.4

6) Re-installed Grub

7) ATTEMPTED to resize Linux Mint 9 partition to use newly unallocated space

But whenever I try to regain that space it will only let it grow this much

Hopefully you can see that (took it with my iPhone 3gs, 3mp camera.)
Attached Thumbnails
Click image for larger version

Name:	photo.jpg
Views:	174
Size:	133.6 KB
ID:	3623  

Last edited by magic8ball88; 05-21-2010 at 07:49 PM.
 
Old 05-21-2010, 08:00 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
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.

Last edited by johnsfine; 05-21-2010 at 08:02 PM.
 
1 members found this post helpful.
Old 05-21-2010, 08:12 PM   #3
magic8ball88
LQ Newbie
 
Registered: Nov 2009
Distribution: Linux Mint 8
Posts: 21

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by johnsfine View Post
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?
 
Old 05-21-2010, 08:27 PM   #4
Bratmon
Member
 
Registered: Jul 2009
Location: 75.126.162.205:80
Distribution: Arch / Mint 17
Posts: 297
Blog Entries: 3

Rep: Reputation: 50
Quote:
Originally Posted by magic8ball88 View Post
How would I create the swap partition again? I read that it isn't even necessary. Would you agree with that?
How much RAM do you have?
 
Old 05-21-2010, 08:29 PM   #5
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Rep: Reputation: 38
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.

Last edited by okos; 05-21-2010 at 08:30 PM.
 
Old 05-21-2010, 08:36 PM   #6
magic8ball88
LQ Newbie
 
Registered: Nov 2009
Distribution: Linux Mint 8
Posts: 21

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Bratmon View Post
How much RAM do you have?
One gigabyte.

Quote:
Originally Posted by okos View Post
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.
 
Old 05-21-2010, 09:29 PM   #7
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Rep: Reputation: 38
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.

Creating a 10gb swap would be a waste of space.

Last edited by okos; 05-21-2010 at 09:32 PM.
 
1 members found this post helpful.
Old 05-21-2010, 09:35 PM   #8
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
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.

Last edited by johnsfine; 05-21-2010 at 09:47 PM.
 
1 members found this post helpful.
Old 05-21-2010, 09:53 PM   #9
magic8ball88
LQ Newbie
 
Registered: Nov 2009
Distribution: Linux Mint 8
Posts: 21

Original Poster
Rep: Reputation: 15
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.
 
Old 05-21-2010, 10:00 PM   #10
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by magic8ball88 View Post
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.
 
1 members found this post helpful.
Old 05-21-2010, 10:55 PM   #11
magic8ball88
LQ Newbie
 
Registered: Nov 2009
Distribution: Linux Mint 8
Posts: 21

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by johnsfine View Post
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.
 
Old 05-22-2010, 01:53 AM   #12
magic8ball88
LQ Newbie
 
Registered: Nov 2009
Distribution: Linux Mint 8
Posts: 21

Original Poster
Rep: Reputation: 15
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.
 
  


Reply



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
Array unallocated space in c Cyhaxor Programming 14 12-02-2009 02:36 PM
Giving Unallocated space to /home mickeyboa Fedora 3 06-30-2009 02:36 PM
Creating and formatting a partion from unallocated space. Lassenc Linux - Newbie 4 03-20-2008 05:09 PM
partioning unallocated space Ledft Linux - Newbie 4 05-30-2006 11:23 PM
Format ext3 ONLY on unallocated space X-Crawler Linux - General 3 03-16-2004 11:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:34 PM.

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