2

After increasing the Swap area and RAM size, the /dev/sda2 has become the Swap area and there is change in the UUID of swap. When the Ubuntu icon appears first after booting, a long line shows some UUID number for half a second and disappears as if there is some error. But I can access the OS. How can I verify if there is error or the File system has accepted the new Swap area? I have noted the UUID of old Swap area. See also:

Increasing of RAM size & Swap area

madhu@madhu-desktop:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=   (Is same)                 ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID= (Starts in 7 and ends in 5)        none            swap    sw              0       0

madhu@madhu-desktop:~$ swapon -s
Filename                Type        Size    Used    Priority
Pabi
  • 7,401
  • 3
  • 40
  • 49
A.G.
  • 310
  • 3
  • 15
  • Once you login after restart, you can use our very own top cmd to check if new swap has been set and displayed! – BDRSuite Oct 31 '14 at 08:44
  • Related: http://askubuntu.com/questions/159783/how-do-i-find-out-if-i-have-a-swap-partition-on-my-hard-drive – NGRhodes Oct 31 '14 at 09:05

3 Answers3

2

You can use the following commands from a terminal:

swapon -s displays swap devices and sizes
cat /proc/meminfo displays the total swap, and the free swap space
cat /proc/swaps displays which swap devices are in use

Pabi
  • 7,401
  • 3
  • 40
  • 49
  • A good answer. First and the Third command showed the same head only -- Type Size Used Priority. cat /proc/meminfo showed the three items as 0kB viz., SwapCached, SwapTotal, SwapFree. How can I fix the error? – A.G. Oct 31 '14 at 09:16
  • Could you please edit your question with the output of. cat /etc/fstab and swapon -s? – Pabi Oct 31 '14 at 09:21
  • This space doesn't allow me to use more letters. (So some lines only) UUID= same ext4 errors=remount-ro 0 1

    swap was on /dev/sda5 during installation

    UUID=Starts with 7 and ends with 5 none swap sw 0 0 madhu@madhu-desktop:~$ swapon -s Filename Type Size Used Priority

    – A.G. Oct 31 '14 at 09:42
  • There was no data under the last one. – A.G. Oct 31 '14 at 09:43
  • Click the edit button under your question post and add the requested information there please. – Pabi Oct 31 '14 at 09:47
  • Change the UUID in the last line of the /etc/fstab to the one of your current swap partition then restart or execute mount -a. – Pabi Oct 31 '14 at 13:36
1

Once the system has booted use the command:

swapon --show

This will display which partitions have swap enabled.

If you want to find the UUID of a partition of swap type:

sudo blkid | grep swap  
NGRhodes
  • 9,490
0

Verify the Swap area data using the following Terminal commands one by one.

swapon -s 
cat /proc/meminfo 
cat /proc/swaps 

Then use the following commands one by one.

sudo blkid -c /dev/null -o list
gksudo gedit /etc/fstab

The UUID of Swap area may be different. Edit the UUID of the Swap area in gedit so that the UUID when installed should match the new Swap area. Save it.

This fixes the error.

A.G.
  • 310
  • 3
  • 15
  • The Swap area was /dev/sda5. But after deleting sda2 Extended & sda5 Linux swap, the Swap area became sda2. Is it good? If not, how can I change it? – A.G. Nov 01 '14 at 03:50