How can I increase ubuntu swap space

2

Can you please how can I increase swap space in ubuntu 9.10? I go to 'Palimpsest Disk Utility' click '724 MB Extended' but I cant' increase the size.

Thank you.

hap497

Posted 2009-12-20T06:25:57.523

Reputation: 2 519

Answers

3

If you don't want to/can't create a new or larger swap partition, you can use a swap file.

  1. Create a file of the size you need: "dd if=/dev/zero of=/root/tmpfile bs=1m count=1024" would create a 1 gigabyte file.
  2. Define the file as swap: "mkswap /root/tmpfile".
  3. Activate with "swapon /root/tmpfile".

I'm assuming you need the new swap only temporarily. If you want to make it permanent, you'll need to add an entry to /etc/fstab:

/root/tmpfile none swap sw 0 0

CarlF

Posted 2009-12-20T06:25:57.523

Reputation: 8 576

2

Boot from the Ubuntu install CD, use the partition editor included, then resize the swap partition. If there's no free unallocated space available, you can resize other partition to make space.

mashwell

Posted 2009-12-20T06:25:57.523

Reputation: 144