Page 1 of 1

help with swap partition [solved]

Posted: Sat Nov 14, 2015 1:08 pm
by cpowell1164
hello all, so i installed mint a while back on my laptop, during said installation a friend helped me partition it manually, now i didnt create a swap partition, so i was wondering, do i need one with 4gb of ram and how can i create one when i only have one hard drive on my system , thanks in advance

edit: cheers for all the help folks :D

Re: help with swap partition

Posted: Sat Nov 14, 2015 1:52 pm
by j03k3rr
cpowell1164 wrote:hello all, so i installed mint a while back on my laptop, during said installation a friend helped me partition it manually, now i didnt create a swap partition, so i was wondering, do i need one with 4gb of ram and how can i create one when i only have one hard drive on my system , thanks in advance
Swap partition is not crucial but it is necessary. I think you can't hibernate your computer without it. Install or launch the program named "Gparted" it can let you shrink/resize and create partitions. But be very careful, if you're asking this in forum chances you may make a mistake and lose data is very high.
Try to get help from that friend of yours.

Technically you don't need another physical drive in order to create a swap partition. All partitions can be on same drive, like slices of a cake.

Re: help with swap partition

Posted: Sat Nov 14, 2015 1:59 pm
by tolkien
You can also create a swap file. See here:
http://askubuntu.com/questions/327186/c ... ive#327194

Re: help with swap partition

Posted: Sat Nov 14, 2015 2:07 pm
by austin.texas
cpowell1164 wrote:so i was wondering, do i need one with 4gb of ram
A good rule is to make your swap partition slightly bigger than your installed ram.
If you have 4 GB of ram, make the swap partition slightly bigger than 4 GB.
You can chose the normal procedure of re-sizing one of your partitions on your hard drive to make room for a swap partition.
Alternatively, you can create a swap file, as a substitute for a swap partition - as noted by tolkien .
You can do that manually, or install a package called swapspace

Code: Select all

sudo apt-get install swapspace
(auto-generates swap files when needed, and removes them when no longer needed).
I have no idea if swapspace allows hybernation, however...

Re: help with swap partition

Posted: Sat Nov 14, 2015 2:23 pm
by cpowell1164
i appreciate the help guys <3

Re: help with swap partition

Posted: Sat Nov 14, 2015 2:27 pm
by Reorx
Just out of curiosity, could you please post the output of this terminal command >>>

Code: Select all

inxi -p

Re: help with swap partition

Posted: Sat Nov 14, 2015 2:32 pm
by austin.texas
Reorx wrote:Just out of curiosity, could you please post the output of this terminal command >>>

Code: Select all

inxi -p
Now I feel dumb, Reorx. I should have thought of that myself...

Re: help with swap partition

Posted: Sat Nov 14, 2015 2:58 pm
by cpowell1164
austin.texas wrote:
Reorx wrote:Just out of curiosity, could you please post the output of this terminal command >>>

Code: Select all

inxi -p
Now I feel dumb, Reorx. I should have thought of that myself...
cpowell1164@cpowell1164-Lenovo-G50-30:~ > inxi -p
Partition: ID: / size: 30G used: 7.4G (27%) fs: ext4 ID: /boot size: 479M used: 46M (11%) fs: ext4
ID: /home size: 200G used: 37G (20%) fs: ext4
cpowell1164@cpowell1164-Lenovo-G50-30:~ >

ere ya go

Re: help with swap partition

Posted: Sat Nov 14, 2015 5:21 pm
by Reorx
austin.texas wrote:
Reorx wrote:Just out of curiosity, could you please post the output of this terminal command >>>

Code: Select all

inxi -p
Now I feel dumb, Reorx. I should have thought of that myself...
No need to feel dumb austin... the are many paths to the same destination... I should have asked for a Gparted screen shot! :lol: If there is unallocated space on the disk, creating a swap partition would (probably) be relatively easy... :mrgreen:

Re: help with swap partition

Posted: Sat Nov 14, 2015 6:15 pm
by kukamuumuka
You can make a swapfile. An example: about 4,5 GB swapfile

Code: Select all

sudo dd if=/dev/zero of=/swap bs=1024 count=4621440
sudo mkswap /swap
sudo swapon /swap
Add the swapfile to the /etc/fstab

Code: Select all

sudo nano /etc/fstab
.. add the line

Code: Select all

/swap swap swap defaults 0 0
... save and quit
Ctrl o
Ctrl x