[Bug 1175406] Re: installer uses /dev/dm-* in /etc/cryptswap
GeorgeAllen
glallen01 at gmail.com
Thu May 2 02:06:17 UTC 2013
Maybe this will help stabilize the device names in /etc/crypttab
--- /tmp/ecryptfs-setup-swap 2013-05-01 21:06:55.750474891 -0400
+++ /usr/bin/ecryptfs-setup-swap 2013-05-01 21:58:43.249884148 -0400
@@ -161,7 +161,7 @@
[ -e "/dev/mapper/cryptswap$i" ] || break
done
# Add crypttab entry
- echo "cryptswap$i $swap /dev/urandom swap,cipher=aes-cbc-essiv:sha256" >> /etc/crypttab
+ echo "cryptswap$i $(findfs UUID=$uuid) /dev/urandom swap,cipher=aes-cbc-essiv:sha256" >> /etc/crypttab
# Add fstab entry
echo "/dev/mapper/cryptswap$i none swap sw 0 0" >> /etc/fstab
** Package changed: ubiquity (Ubuntu) => ecryptfs-utils (Ubuntu)
** Patch added: "fix-dm-reference.patch"
https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/1175406/+attachment/3662076/+files/fix-dm-reference.patch
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1175406
Title:
installer uses /dev/dm-* in /etc/cryptswap
Status in “ecryptfs-utils” package in Ubuntu:
New
Bug description:
The /dev/dm-* names can get re-numbered when adding/removing changing LVM logical volumes and adding/removing USB drives containing LVM volumes. I performed a fresh install on a new hard drive, connected my old drive via USB, then ran into errors late in a 100G rsync copy. I traced the problem down to: my /dev/dm-* drives had been renumbered, and when cryptswap touched what it thought was the swap volume, it destroyed at data volume instead.
Cryptswap should reference volumes by /dev/disk/by-*/ or
/dev/volumegroup/* rather than /dev/dm-*
Steps to recreate: (using Kubuntu 13.04 in a vm)
- Disk Setup
- Switch to console.
sudo -i
parted
mktable gpt
mkpart primary ext4 2048s 200M
mkpart primary 200M -1s
toggle 2 lvm
reboot
sudo -i
pvcreate /dev/sda2
vgcreate vg /dev/sda2
lvcreate -L 5G -n root vg
lvcreate -L 2G -n home vg
lvcreate -L 1G -n swap vg
- switch to installer
- Custom Disk setup
- assign disks as listed:
vg-home /home
vg-root /
vg-swap swap
- start installer
- switch to console
sudo -i
cat /target/etc/crypttab
cryptswap1 /dev/dm-2 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
from /var/log/installer/syslog
Apr 30 01:30:35 kubuntu ubiquity: INFO: Setting up swap: [/dev/dm-3]
Apr 30 01:30:35 kubuntu ubiquity: INFO: Successfully setup encrypted swap!
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/1175406/+subscriptions
More information about the foundations-bugs
mailing list