My swap partition does not seem to be operating properly. It worked fine yesterday, but seems to be inactive today. Per lsb_release -a, running Ubuntu 14.04 LTS trusty on a Compaq CQ62, dual booting Windows 7. I was going to post some images, but the site would not let me without 10 reputation. Nice. That makes things complicated.
So instead, here is what I did:
- I ran
swapon -aandswapon -sfirst. - I then ran GParted to see what was going on with my swap partition.
- I dug around this site and figured out that I should look at
fstaband compare it toblkid.
Here are the details on what I found on each of these steps:
Did swapon -a with no error returned.
swapon -s shows:
Filename Type Size Used Priority
/dev/mapper/cryptswap1 partition 2025468 56 -1
GParted showed unknown for the swap partition and would not let me format as swap (launched it using sudo, password). Since I cannot just show you a screen cap of gparted, here is what parted print shows:
Model: ATA WDC WD2500BEVT-6 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 210MB 73.2GB 73.0GB primary ntfs boot
2 73.2GB 250GB 177GB extended
5 73.2GB 248GB 175GB logical ext4
6 248GB 250GB 2074MB logical
That last one, number 6, is supposed to be a swap partition. Linux lives on 5, of course, which is part of the same extended partition 2 that the swap partition is also on. Windows lives on 1. Grub does work and dual boots defaulting to Linux.
In blkid, it shows a different ID from fstab and calls it cryptswap instead of just swap.
root@darkstar1:/home/darkstar# blkid
/dev/sda1: UUID="A84E02644E022C1E" TYPE="ntfs"
/dev/sda5: UUID="c8635db4-5951-47fc-8f84-19b706a2e9ec" TYPE="ext4"
/dev/mapper/cryptswap1: UUID="9b77fefd-115c-4bf2-8e17-52d1bcf58fee" TYPE="swap"
fstab looks like this:
# /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>
# / was on /dev/sda5 during installation
UUID=c8635db4-5951-47fc-8f84-19b706a2e9ec / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
#UUID=c44f68cd-e433-462f-81dc-16b8e52c7abb none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0
Is cryptswap1 the same as my swap partition? Do I need to change my fstab to show the same ID the blkid is showing for the cryptswap1? I need swap, as my computer only has 2 GB of ram and easily locks up when playing video online. When the swap was running yesterday, it ran smoothly with no problems whatsoever. I had just replaced my older Ubuntu install with a Xubuntu install. Windows is on the first partition, Linux and the swap are supposed to be on the second extended partition.
I would rather have my home drive encrypted. Xubuntu did not give me a choice to NOT have it encrypted when I installed it (the boxes were prechecked in the installer and I could not uncheck them). So it should be encrypted.
I think this might have something to do with my old install of Ubuntu (I was testing KDE, XFCE and Gnome and decided to just reinstall with Xubuntu since the swap NEVER worked on the original install and I had numerous issues with the other window managers - XFCE really is the best).