[LBo] Swap partiton on kubuntu 6.10

Anita Lewis a.lewis at linuxbasics.org
Thu Nov 2 02:02:14 CET 2006


On 11/01/2006 06:41 PM Tim wrote:
>
> I was looking in the system settings - Disk and Filesystem and I noticed that 
> it says the swap file is disabled with a button that is not green (there is a 
> green button for the root partition which says enabled). If I highlight ithe 
> swap partition line in the window I get a button at the bottom of the page 
> that says "Enable" but when I click the button I get the following error 
> message:
>
> An error occurred enabling the swap partition
> UUID=37608db0-c0b0-4aa6-bc02-08228de3c238
>
> The system reported swapon
> UUID=37608db0-c0b0-4aa6-bc02-08228de3c238
> Device or resource busy
>
>   
<snip>
> # /dev/hda1
> UUID=6bd53da4-979d-499f-a637-f5d99304ee5a /               ext3    
> defaults,errors=remount-ro 0       1
> # /dev/hda5
> UUID=37608db0-c0b0-4aa6-bc02-08228de3c238 none            swap    sw              
> 0       0
>
>   

This is something that bit me when I upgraded to Ubuntu 6.10.  I don't 
know why it didn't work correctly, but here is what happened and how I 
fixed it.

Notice in /etc/fstab that it has UUID=...  for each of the partitions.  
This nomenclature for partion identification is supposed to be superior 
to the /dev/hda1 type of nomenclature that we are used to.  I found a 
notation about this in 'man fstab'.  For some reason, this naming did 
not work for my swap either.  I didn't use the GUI with the colored 
buttons, but I found after a while of very poor performance, that I had 
no swap.

I edited /etc/fstab and changed the UUID=... thing to the usual.  For 
example, your swap line would be:

# /dev/hda5
/dev/hda5  none         swap    sw         0       0

The line with "# /dev/hda5" above it is a comment.  

The problem that could happen is that upon an upgrade of some program relating to the filesystem, this might be written back to the old format again.  I found this happening with /boot/grub/menu.lst which also gave me trouble in that the system would not boot.  It seemed to be a problem for some partitions and not others, but most notable problems for me were in the swap line and in the 'menu.lst' file for grub.  I thought they had taken this out of the install process, but it seems that they did not.

If you edit /etc/fstab, make a backup of the file first and be sure not to make a blank line at the end of it.  That means do not hit Return at the end of the last line.  Be sure that each line is only on one line.  Your editor may wrap, and that is ok, but make sure that there is not a Return before the end of the line if it is long.

Anita





More information about the QnA mailing list