Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an existing installation with a swap partition, and I want to boot a Ubuntu 10.04 Desktop LiveCD without using the swap partition. I want to avoid using the swap partition so that I can resize it and other partitions.

share|improve this question
up vote 5 down vote accepted

If you're using an Ubuntu Live CD, you can disable the use of the swap partition trough the Partition Editor (GParted) by right-clicking the swap partition, and selecting swapoff.

This should allow to to resize the partition.

share|improve this answer
I thought there would be a boot option, but this is certainly good enough for what I need. – Liam Oct 22 '10 at 12:26

You can add noswap to the grub parameters to achieve this.

But it's usually easier to let the Live CD boot normally and then in a console type:

sudo swapoff device

Where device is the file or partition of the swap.

share|improve this answer
I tried adding noswap and --noswap to the boot options (accessed by pressing F6 at the livecd menu). Neither worked, System Monitor still shows the swap as enabled. – Liam Oct 21 '10 at 10:38
Have you tried the swapoff method? – Javier Rivera Oct 21 '10 at 11:40
swapoff worked, thanks. – Liam Oct 22 '10 at 12:26

If the live CD uses swap you can disable it with swapoff command. Swap is also not required to install Ubuntu, but recommended.

share|improve this answer

I was wrong, and the Live CD does use an existing swap partition. There is no noswap cheat code listed (I tried the noswap cheat code anyway, but the swap was still used).

I'm stumped on how to prevent using swap at boot time, but for repartitioning purposes the other posters suggested how to turn the swap off.

ubuntu@ubuntu:~$ swapon -s
Filename    Type        Size     Used   Priority
/dev/sda5   partition   225272   0      -1
share|improve this answer
The Live CD does use available swap partitions, but your swap is on an encrypted partition, and it's impossible to recognize it as a swap partition before initializing the encrypted partition, which doesn't happen by default. – JanC Oct 21 '10 at 16:35
@JanC point noted, thanks. I'll need to setup an unencrypted VM to test this again. – invert Oct 22 '10 at 7:37
I think support for the noswap option is turned on or off at the kernel compile time (I can't remember where I read that), so it may be available in some Linux distros and not others. – Liam Oct 22 '10 at 12:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.