Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 390  / 2 Years ago, mon, august 22, 2022, 3:06:28

I recently increased space and swap space for ubuntu on my laptop. Even though the space got increased, my swap is not being recognized. It is showing as 0 bytes of space. However, interestingly, when I boot from live cd and click try ubuntu, space for swap is being recognized.



What can be causing this weird problem?



Normal Boot:
enter image description here



bhaarat@bhaarat-laptop ~ % free
total used free shared buffers cached
Mem: 1015780 954008 61772 0 49836 449444
-/+ buffers/cache: 454728 561052
Swap: 0 0 0


Live CD Boot
enter image description here



ubuntu@ubuntu:~$ free
total used free shared buffers cached
Mem: 1015780 983500 32280 0 87408 558984
-/+ buffers/cache: 337108 678672
Swap: 13590952 384 13590568


Outputs in Live CD Boot



Output of grep swap /etc/fstab



/dev/sda6 swap swap defaults 0 0


Output of sudo fdisk -l



Disk /dev/sda: 80.0 GB, 80026361856 bytes
240 heads, 63 sectors/track, 10337 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2bd2c32a

Device Boot Start End Blocks Id System
/dev/sda2 1 10338 78149632 5 Extended
/dev/sda5 * 1 8539 64551936 83 Linux
/dev/sda6 8540 10338 13590958+ 82 Linux swap / Solaris


Output of sudo swapon -a
No output



Gparted Screenshot:
enter image description here



Update
contents of cat /proc/swaps after the fix are:



 Filename Type Size Used Priority 
/dev/sda6 partition 13590952 0 -1

More From » 11.04

 Answers
0

Is the swap enabled? swapon <device>



See cat /proc/swaps



If it's listed, then it's enabled. If not, then the system isn't using it as swap.



blkid | grep swap



It appears your fstab entry looks incorrect.



Try using the line:



/dev/sda6 none swap sw 0 0



Then sudo swapon -a



You can try using UUID you get from blkid command above and using that in place of /dev/sda6


[#38963] Wednesday, August 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
looweets

Total Points: 52
Total Questions: 114
Total Answers: 111

Location: Turkmenistan
Member since Sat, Apr 16, 2022
2 Years ago
;