How to create swap partition

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

How to create swap partition

Postby arjot on Mon Oct 31, 2011 11:05 pm

Hey guys
I just installed linux mint 11 yesterday to solve my graphics chipset problem.
But I forgot to create a swap partition. So my question is how can I create swap partition without reinstalling linux mint?
Also I have 4GB ram on my laptop and I don't use hibernation function on my laptop so do I really need swap?
The space I reserved for swap partition is 4GB & it is shown as unusable space in partition s/w.
Thanks in advance.
arjot
Level 1
Level 1
 
Posts: 42
Joined: Mon Jun 07, 2010 7:09 am

Linux Mint is funded by ads and donations.
 

Re: How to create swap partition

Postby minitrucker on Mon Oct 31, 2011 11:49 pm

I'm fairly new, but if I understand right you can live boot and unmount the OS off the hard drive if it comes to that. Do you have gParted? That should make it easy to do anything with unused space on your HDD. As far as if you actually need or not.... no idea sorry
I like everything custom. My vehicles, my Operating Systems, my bank accounts....... I guess I'm just spoiled........maybe

Am I Anonymous?
Am I Legion?
Can I Forgive?
I Forget What Happened 15min ago......
Should I expect myself?
minitrucker
Level 3
Level 3
 
Posts: 138
Joined: Thu Oct 20, 2011 12:32 am
Location: Alabama

Re: How to create swap partition

Postby remoulder on Tue Nov 01, 2011 5:20 am

arjot wrote:I have 4GB ram on my laptop and I don't use hibernation function on my laptop so do I really need swap?

If your system runs ok then no you don't need swap. Unless you do very memory intensive stuff such as video, your system will likely never need it. In any case 4GB would be far too much unless you wanted to hibernate, in which case it might be slightly too little. If you are sure you aren't going to hibernate then I would create a swap of say 512MB as a precaution and re-use the remainder by re-sizing the adjacent partition. To create and resize the partitions you will need to boot from the live disc and run gparted from the menu there. See http://ubuntuforums.org/showthread.php?t=1262862 for basic instructions.
[Edit] your original post and add [SOLVED] once your question is resolved.

“The people are my God” stressing the factor determining man’s destiny lies within man not in anything outside man, and thereby defining man as the dominator and remoulder of the world.
User avatar
remoulder
Level 17
Level 17
 
Posts: 7667
Joined: Fri May 09, 2008 1:14 pm

Re: How to create swap partition

Postby arjot on Tue Nov 01, 2011 7:10 am

Thanks guys.
arjot
Level 1
Level 1
 
Posts: 42
Joined: Mon Jun 07, 2010 7:09 am

Re: How to create swap partition

Postby proxima_centauri on Tue Nov 01, 2011 8:05 am

I would just use this guide to create a SWAP file instead of a partition.
Much easier.
User avatar
proxima_centauri
Level 11
Level 11
 
Posts: 3976
Joined: Tue Dec 25, 2007 3:24 pm
Location: NB, Canada

Re: How to create swap partition

Postby wyrdoak on Tue Nov 01, 2011 9:06 am

proxima_centauri wrote:I would just use this guide to create a SWAP file instead of a partition.
Much easier.


Swap file works. Another way to create a swap file would be:

sudo apt-get install dphys-swapfile
The installation process with automatically create the swap file. Then just enable it with:
sudo swapon -a
Viola, a fully function swap file that is not on a separate partition.
-Dell Mini Netbook-Atom CPU-N270-1.60ghz; 16gbs mini ePCI PATA SSD
RAM- 1gbs-(Maya-Xfce) LInux 3.2.0.57-generic(i686)
SolydX (32bit)
User avatar
wyrdoak
Level 6
Level 6
 
Posts: 1313
Joined: Thu May 19, 2011 1:32 pm
Location: USA

Re: How to create swap partition

Postby proxima_centauri on Tue Nov 01, 2011 10:31 am

I guess I didn't read the OP's question very carefully.

arjot wrote:The space I reserved for swap partition is 4GB & it is shown as unusable space in partition s/w.

If you have 4GB unused SPACE already partitioned, but not used as SWAP; install (if not already available) gparted and run it. Format the space to SWAP.
Edit /etc/fstab and add
Code: Select all
/dev/sda*/  swap    swap    defaults   0  0

/dev/sda* refers to the correct partition SWAP is, for example, /dev/sda2
User avatar
proxima_centauri
Level 11
Level 11
 
Posts: 3976
Joined: Tue Dec 25, 2007 3:24 pm
Location: NB, Canada

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: gold_finger, nerdtron and 23 guests