encrypting swap partitions leaves behind a line in fstab for unencrypted swap
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
user-setup (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: cryptsetup
After a routine software update, I get this message when booting:
"One or more of the mounts listed in /etc/fstab cannot yet be mounted:"
"swap: waiting for UUID=4dcb..."
"Press ESC to enter a recovery shell"
Pressing ESC takes me to gdb where I can login and work somewhat normally for some arbitrary period of time. Initially there is one problem: switching to a VT gives me a corrupt, useless display. Usually while playing a game or working on an application using OpenGL, but sometimes when not doing anything like that, my display becomes completely black for about 1-2 seconds, and then returns. After returning, Xorg is pegging one of my CPU cores for 100% of its processing power, and applications randomly give me errors.
I was able to solve these problems by disabling swap, but this solution is really only temporary. I disabled swap by commenting out these lines from my fstab:
# swap was on /dev/sda2 during installation
#UUID=4dcb7a74-
#/dev/mapper/
I discovered also that /dev/sda2 was no longer assigned the "4dcb.." UUID:
donny@donny-
total 0
lrwxrwxrwx 1 root root 10 2010-01-21 03:09 2c20b79b-
lrwxrwxrwx 1 root root 10 2010-01-21 03:09 46ad1127-
lrwxrwxrwx 1 root root 23 2010-01-21 03:09 c0bb7577-
So I suspect that somehow cryptsetup ends up blowing away my swap partition so that it can no longer be identified by UUID. It should probably be removing or commenting out the line about the old unencrypted swap mount. Here is the output of mount, followed by the contents of my /etc/crypttab:
donny@donny-
/dev/sda1 on / type ext3 (rw,errors=
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,
none on /sys/fs/
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/
udev on /dev type tmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,
none on /var/lock type tmpfs (rw,noexec,
none on /lib/init/rw type tmpfs (rw,nosuid,
/dev/sda3 on /home type ext3 (rw)
binfmt_misc on /proc/sys/
/home/donny/
gvfs-fuse-daemon on /home/donny/.gvfs type fuse.gvfs-
donny@donny-
# <target name> <source device> <key file> <options>
cryptswap1 /dev/sda2 /dev/urandom swap,cipher=
I suppose next I'll try to uncomment the fstab entry for the cryptswap1 system, but first I'll submit this bug report...
ProblemType: Bug
Architecture: amd64
CheckboxSubmission: f46ebfb233fc249
CheckboxSystem: daed2f3d6643b4a
Date: Fri Jan 22 06:08:05 2010
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
NonfreeKernelMo
Package: cryptsetup 2:1.0.6+
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: cryptsetup
Uname: Linux 2.6.31-17-generic x86_64
Hi Donny,
# swap was on /dev/sda2 during installation 0f73-4f1f- 9215-a1dcef2954 9e none swap sw 0 0 # /dev/sda2 cryptswap1 none swap sw 0 0
#UUID=4dcb7a74-
#/dev/mapper/
What precisely did this look like before you commented it out? Where both the 'UUID' and '/dev/mapper/ cryptswap1' lines uncommented?
The /etc/crypttab, paired with the latter line from /etc/fstab, look correct to me; but if you had both of these 'swap' lines enabled before, then it's no surprise this would not work as expected. The question is, what created these lines in /etc/fstab? This looks like an installer problem, not a cryptsetup bug.
However, I'm not sure how to attribute most of the other problems you describe (video corruption, CPU usage, etc) to the fstab issue, either. Have you tested with uncommentin the cryptswap1 fstab line yet? What was the esult?