View Full Version : [ubuntu] Gparted-swapon is not permanent

January 28th, 2009, 10:09 AM
I use ubuntu 8.04 hardy heron. I wanted to use oracle10g database. It needed 1024mb of swap space, i had only 450mb. I installed gparted & added about 2000mb to the swap.Then i initiated swapon & everything went smoothly. But when i restart the pc i have to manually initiate the swapon process & by that time i couldnt use oracle anymore.

What should i do to make the swapon process permanent?

January 28th, 2009, 10:16 AM
The UUID has changed - please open a terminal, run these

cat /etc/fstab

Backup and edit the swap line so the numbers match

sudo cp /etc/fstab /etc/fstab.2801
gksu gedit /etc/fstab

The number for the swap partition in fstab must match that which blkid reports eg

my swap line from fstab
UUID=469c6da1-f7b1-4f27-99ee-205ff0fc5165 none swap sw 0 0
my UUID from blkid
/dev/sda4: TYPE="swap" UUID="469c6da1-f7b1-4f27-99ee-205ff0fc5165"

Save the file and do

sudo swapoff -a
sudo swapon -a

Check it's recognised with

free -m


Also if you hibernate then that will fail as well unless the correct UUID is used.

gksu gedit /etc/initramfs-tools/conf.d/resume

If there is a RESUME=olduuidstring line ensure that the UUID is changed to the new one, if the file is empty - just close without saving and ignore the following

If you have to change this you need to also run the following, but only run the following if necessary

sudo update-initramfs -u

January 28th, 2009, 10:23 AM
/etc/fstab: static file system information.
# -- This file has been automaticly generated by ntfs-config --
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sda2 :
UUID=4d0afaa0-9bb7-431a-b94a-c845fd9a21a9 / ext3 relatime,errors=remount-ro 0 1
# Entry for /dev/ !! UNKNOW DEVICE !! :
UUID=fb10aed5-12fb-430a-b97f-8c8cd3326a79 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
/dev/sda8 /media/disk5 ntfs-3g defaults,locale=en_IN 0 0
/dev/sda7 /media/disk4 ntfs-3g defaults,locale=en_IN 0 0
/dev/sda6 /media/disk3 ntfs-3g defaults,locale=en_IN 0 0
/dev/sda5 /media/disk2 ntfs-3g defaults,locale=en_IN 0 0
/dev/sda1 /media/disk1 ntfs-3g defaults,locale=en_IN 0 0

This is what i get when i run the first command
I am confused I dont know what i am doing.
The command blkid doesnt seem to do anything
Could you clarify

January 28th, 2009, 11:01 AM
sudo blkid