[Bug 1175406] [NEW] installer uses /dev/dm-* in /etc/cryptswap

GeorgeAllen glallen01 at gmail.com
Thu May 2 00:45:38 UTC 2013


Public bug reported:


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!

** Affects: ubiquity (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "/var/log/installer/syslog"
   https://bugs.launchpad.net/bugs/1175406/+attachment/3662003/+files/syslog

-- 
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 “ubiquity” 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/ubiquity/+bug/1175406/+subscriptions




More information about the foundations-bugs mailing list