Maverick alternate installer corrupts existing data partitions when more than one cryptswap volume is enabled (/etc/crypttab should NOT refer to /dev/dm-*)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
debian-installer (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: debian-installer
Installed Maverick on a system with LVM that had 2 swap volumes and 3 volume groups. Volume groups get detected in different order by installer and the installed system, and /etc/crypttab refers to them by sequential number.
Resulting /etc/fstab has
/dev/mapper/
/dev/mapper/
/dev/mapper/
/dev/mapper/
while /etc/crypttab has
# <target name> <source device> <key file> <options>
cryptswap1 /dev/dm-24 /dev/urandom swap,cipher=
cryptswap2 /dev/dm-11 /dev/urandom swap,cipher=
and after boot, one of the devices no longer refers to same partition, thus potentially causing severe data loss:
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/foo -> ../dm-23
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/int_home -> ../dm-17
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/int_opt -> ../dm-16
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/int_root -> ../dm-14
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/int_usr -> ../dm-13
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/int_var -> ../dm-15
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/jau_home -> ../dm-21
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/jau_opt -> ../dm-19
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/jau_root -> ../dm-18
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/jau_usr -> ../dm-20
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/jau_var -> ../dm-22
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/luc_home -> ../dm-29
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/luc_opt -> ../dm-26
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/luc_root -> ../dm-25
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/luc_usr -> ../dm-28
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/luc_var -> ../dm-27
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/mav_home -> ../dm-30
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/mav_opt -> ../dm-32
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/mav_root -> ../dm-31
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/mav_usr -> ../dm-34
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/mav_var -> ../dm-33
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/int/swap_2 -> ../dm-24
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/kar/backup1u -> ../dm-12
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/kar/kar_home -> ../dm-11
lrwxrwxrwx 1 root root 7 2011-01-30 20:18 /dev/kar/kar_opt -> ../dm-8
lrwxrwxrwx 1 root root 7 2011-01-30 20:18 /dev/kar/kar_root -> ../dm-7
lrwxrwxrwx 1 root root 8 2011-01-30 20:18 /dev/kar/kar_usr -> ../dm-10
lrwxrwxrwx 1 root root 7 2011-01-30 20:18 /dev/kar/kar_var -> ../dm-9
lrwxrwxrwx 1 root root 7 2011-01-30 20:18 /dev/ub3/apt_mir -> ../dm-6
lrwxrwxrwx 1 root root 7 2011-01-30 20:18 /dev/ub3/swap_1 -> ../dm-5
lrwxrwxrwx 1 root root 7 2011-01-30 20:18 /dev/ub3/ub3_home -> ../dm-4
lrwxrwxrwx 1 root root 7 2011-01-30 20:18 /dev/ub3/ub3_opt -> ../dm-1
lrwxrwxrwx 1 root root 7 2011-01-30 20:18 /dev/ub3/ub3_root -> ../dm-0
lrwxrwxrwx 1 root root 7 2011-01-30 20:18 /dev/ub3/ub3_usr -> ../dm-3
lrwxrwxrwx 1 root root 7 2011-01-30 20:18 /dev/ub3/ub3_var -> ../dm-2
So instead of dm-5 for swap_1, it is using dm-11 which happens to be one of the data volumes.
To avoid corrupting data, cryptswap should refer to LVM volumes by name (or UUID, if applicable).
During creation of lvm volumes for Maverick 2 volumes were first created & deleted and then all the *mav* ones above were created. Did not take notes on whether swap devices were selected before or after LVM changes.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: debian-installer (not installed)
ProcVersionSign
Uname: Linux 2.6.35-25-generic x86_64
NonfreeKernelMo
Architecture: amd64
CheckboxSubmission: 7b44b94229fa777
CheckboxSystem: edda5d4f616ca79
Date: Sun Jan 30 22:12:17 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
MachineType: System manufacturer P5K Premium
MemoryUsage:
total used free shared buffers cached
Mem: 8193700 2042008 6151692 0 62340 1300300
-/+ buffers/cache: 679368 7514332
Swap: 0 0 0
ProcCmdLine: BOOT_IMAGE=
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: debian-installer
dmi.bios.date: 12/10/2007
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0504
dmi.board.
dmi.board.name: P5K Premium
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: P5K Premium
dmi.product.
dmi.sys.vendor: System manufacturer
Status changed to 'Confirmed' because the bug affects multiple users.