[Solved] Can you make a Swap Partition?

Problems with hardware & laptops not being detected or supported during or after install.
Locked
M_Mynaardt
Posts: 72
Joined: Wed Dec 15, 2010 9:37 pm
Location: Victoria, BC, Canada

[Solved] Can you make a Swap Partition?

Post by M_Mynaardt »

Hi!

I have three live/persistent installs of LXDE systems on USB-HDDs: one apiece for Lubuntu, Peppermint OS and Mint 9 LXDE. They're all on 320 GB portable drives. I've partitioned them so that 80 GB is for the LXDE OS live install and the remaining 240 GB is another partition dedicated to storing stuff. So these USB-HDDs are doing double duty.

The thing is, I was paying so much attention to making the persistent installs work without making a mess of the boot loader (I just might have done that in the past; twice!) that I had overlooked the fact my live installs do not have a swap partition on them. I just assumed (incorrectly) that the swap partition on would just be part and parcel of the installation. Can anyone tell me of a way to add a swap partition to each of my live installs? Without losing any data or anything like that.

It's probably not doing any harm not having a swap partition, but I'm assuming that my live install would be that much more efficient with it.

Thanks!
Last edited by M_Mynaardt on Thu Feb 03, 2011 11:48 pm, edited 1 time in total.
~*~ M_Mynaardt ~*~

LXDE is your computer's Friend!
Always trust LXDE!
maces
Posts: 503
Joined: Sat Oct 25, 2008 6:04 pm
Contact:

Re: Can you make a Swap Partition?

Post by maces »

Hi,

deepening on how much RAM the computers, you use the LIVE-USB with, have. Keep in mind that SWAP is much slower than RAM, as it is on HDD. USB-drives are even slower than normal HDD's, due USB2.0. This means when your system begins to swap, or access data from swap, it's getting slow.

maces
M_Mynaardt
Posts: 72
Joined: Wed Dec 15, 2010 9:37 pm
Location: Victoria, BC, Canada

Re: Can you make a Swap Partition?

Post by M_Mynaardt »

maces wrote:Hi,

deepening on how much RAM the computers, you use the LIVE-USB with, have. Keep in mind that SWAP is much slower than RAM, as it is on HDD. USB-drives are even slower than normal HDD's, due USB2.0. This means when your system begins to swap, or access data from swap, it's getting slow.
maces
Hi there!

Someone on Ubuntu Forums gave me the following solution that seems to work quite well. So, what I did to make 3 GB of swap space (swap file) was:

Code: Select all

~$ sudo dd if=/dev/zero of=/swapfile bs=1M count=3072
~$ sudo mkswap /swapfile
~$ sudo swapon /swapfile
~$ free -m
The use of free was just to see if the other commands worked properly, and they did. It seems to be working well enough now!
:D
~*~ M_Mynaardt ~*~

LXDE is your computer's Friend!
Always trust LXDE!
Locked