Buy me a beer

I really appreciate your gesture.

Wizgamer

Voor de wizgamer die op zoek is naar een echt goed online casino is er nu goed nieuws. Casino Bellini is een casino dat voor iedere computerliefhebber een breed scala aan prachtige graphics biedt voor hun casino spellen. Van de traditionele spellen tot de nieuwere en meer modernere spellen. Casino Bellini, de plaats om te gokken.

Ubuntu, swap, hibernate PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Bart Dorlandt   
Sunday, 09 December 2007 12:46

Just a couple of days ago I wanted to increase my swap space to 1 GB instead of 512 MB. This way I could finally do an hibernate. Most of the time I wasn't able to because I have 1 GB of RAM and with firefox and thunderbird running it uses a lot.

So what did I do. I installed Gparted to adjust my disks. As you can see further below my swap partition is for my biggest partition. So I had to resize and move my data a bit to the right so I could grew my swap partition. Make sure do this when you have enough time. I took me around 3 hours. The following commands where used. 

apt-get install gparted

Make sure you have unmounted the partition you want to edit, you are also able to do it with Gparted, but it crashed on my machine. So I did it by hand. NOTE: remember the partition you are using.

System > Administration > Partition Editor

Now we are going to create the swap partition.

mkswap /dev/sda5

After this we will use the UUID in the /etc/fstab and in /etc/initramfs-tools/conf.d/resume. Now we are going to reinitialize the ramfs by using this command:

update-initramfs -u

After this has finished you may reboot normally.

Extra information 

The following commands may help you during the way. 

 # fdisk -l

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8f8002b1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          12       96358+  de  Dell Utility
/dev/sda2   *          13        1290    10265535    7  HPFS/NTFS
/dev/sda3            1291        2197     7285477+  83  Linux
/dev/sda4            2198        7296    40957717+   5  Extended
/dev/sda5            2198        2327     1044193+  82  Linux swap / Solaris
/dev/sda6            2328        7296    39913461   83  Linux

# blkid
/dev/sda1: SEC_TYPE="msdos" LABEL="DellUtility" UUID="07D5-081A" TYPE="vfat"
/dev/sda2: UUID="66DC7E18DC7DE2AB" TYPE="ntfs"
/dev/sda3: UUID="51853ab8-929e-4c6e-ada7-f8da01e2d18a" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="34c13693-7a5d-4274-a002-623cc82b062d"
/dev/sda6: UUID="1452744c-4c0e-4da5-a30b-39549a44de83" SEC_TYPE="ext2" TYPE="ext3"

# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/sda5                               partition       1044184 0       -1 

Error section 

These could be found/seen during booting or in dmesg.

Unable to find swap-space signature

activating swap                       [fail]

Trackback(0)
Comments (2)Add Comment
0
You forgot step 1
written by afriend, February 17, 2009
Always backup everything before you get started just in case something should go wrong...
62
Backup
written by Bart Dorlandt, February 17, 2009
Hey,
That is for every step you take. It doesn't need to be documented smilies/tongue.gif

Write comment - Name & Email obligated

busy
Last Updated on Thursday, 31 January 2008 16:53
 


Related items: