System not mounting swap partition

Thank you for your question. As I was looking at it, I discovered that my system had the same problem as yours after upgrading to Natty, yesterday. I believe the problem is that the UUID of the swap partition changed during the upgrade. Here is how I fixed it.

  1. Run sudo blkid. This will show the current UUID's of all partitions on the disk. I suspect you will see that the UUID of your swap partition now differs from the value in /etc/fstab.

  2. If it is different, run some text editor under sudo to edit /etc/fstab. Replace the value of the UUID with the current actual value as shown by the blkid command, above. Do not include the quotation marks.

  3. Save the file and reboot your system. Run free -m to make sure the change fixed the problem:

    $ free -m
                 total       used       free     shared    buffers     cached
    Mem:          1001        604        396          0        123        199
    -/+ buffers/cache:        281        719
    Swap:         1953          0       1953
    

This is going to sound stupid, but try it: reorder /etc/fstab to put the swap partition last.

It seems that mountall -v fails harmlessly when run as NON-root user, and its output can be used to diagnose why mountall doesn't work right at boot. Your last line of output from mountall -v includes the critical clue:

local 4/4 remote 0/0 virtual 12/12 swap 0/0

In other words, 0 swap drives mounted, 0 swap drives found in /etc/fstab.

Now why didn't mountall find your swap drive listed in /etc/fstab? Good question. This should probably be a bug against mountall. To diagnose it, I copied your /etc/fstab and ran mountall -v as non-root user. By editing /etc/fstab randomly and continuing to test mountall -v, I found how to change mountall's reported "swap 0/0". Just reordering the lines of /etc/fstab was enough to make it change to "swap 0/1", in other words, 1 swap drive found in /etc/fstab. With that, it may be enough to boot properly. If not, please post new result of mountall -v.

Tags:

Mount

Swap

Fstab