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
2

3 Answers 3

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

6
  • 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, 2014 at 9:16
  • Could you please edit your question with the output of. cat /etc/fstab and swapon -s?
    – Pabi
    Oct 31, 2014 at 9: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, 2014 at 9:42
  • There was no data under the last one.
    – A.G.
    Oct 31, 2014 at 9:43
  • Click the edit button under your question post and add the requested information there please.
    – Pabi
    Oct 31, 2014 at 9:47
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  
1
  • The word 'swap' is written in red letters (for the second command)
    – A.G.
    Oct 31, 2014 at 9:25
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.

1
  • 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 1, 2014 at 3:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .