← Back to team overview

touch-packages team mailing list archive

[Bug 1506139] Re: 15.10beta crashes encrypted swap partition

 

I tried to reproduce this on today's ubuntu desktop amd64 image
(20151014). I think I set up partitions like you described: 1 GB /boot
on partition 1, 1 GB LUKS on partition 2 (and put swap on vda2_crypt), 8
GB LUKS on partition 3 (and put btrfs / on vda3_crypt).

Both during install and after a few reboots I see correct partition/file system types in "blkid":
$ blkid
/dev/mapper/vda3_crypt: UUID="5d281986-88e6-4a51-97a3-72f7af49792a" UUID_SUB="f31e41da-5fb9-401e-82c6-c8ba0fc031a6" TYPE="btrfs"
/dev/mapper/vda2_crypt: UUID="1fda8cc2-08b8-4c2c-820a-7ac07014ab3b" TYPE="swap"
/dev/vda1: UUID="947e51a6-196c-40f9-a9fe-9a53429bbaaa" TYPE="ext4" PARTUUID="1d8c299a-01"
/dev/vda2: UUID="7a5a8534-53ca-4cf9-ae69-3d164c9d7ab6" TYPE="crypto_LUKS" PARTUUID="1d8c299a-02"
/dev/vda3: UUID="aa700da9-6f7e-4de9-ae1d-3db0988dd0fe" TYPE="crypto_LUKS" PARTUUID="1d8c299a-03"

The only change was in the UUID of vda2_crypt as that gets re-mkswap-ed
every time due to the "swap" option in crypttab. If that's undesired,
this needs to be fixed in partman -- however, it doesn't sound like
that's the actual issue you see.

My /etc/crypttab looks pretty much like your's:
vda2_crypt UUID=7a5a8534-53ca-4cf9-ae69-3d164c9d7ab6 none luks,swap,discard
vda3_crypt UUID=aa700da9-6f7e-4de9-ae1d-3db0988dd0fe none luks,discard

and /etc/fstab isn't surprising either:
dev/mapper/vda3_crypt /               btrfs   defaults,subvol=@ 0       1
# /boot was on /dev/vda1 during installation
UUID=947e51a6-196c-40f9-a9fe-9a53429bbaaa /boot           ext4    defaults        0       2
/dev/mapper/vda3_crypt /home           btrfs   defaults,subvol=@home 0       2
/dev/mapper/vda2_crypt none            swap    sw              0       0

So I can't reproduce "destroys swap partition" just yet. From your
description it sounds like something is destroying sda3 itself (i. e.
the outer encrypted LUKS partition), *not* the unencrypted sda3_crypt,
right?

Can you please give me some details:

 - What do you precisely do to "repair the swap manually"?
 - After that, please copy&paste the output of "sudo blkid", "sudo swapon -s", "cat /etc/crypttab", and "cat /etc/fstab".
 - Reboot
 - After that, please copy&paste all of the above commands again, so that we can compare.
 - Run "sudo journalctl -b > /tmp/journal.txt" and attach /tmp/journal.txt as well.

Thanks!

** Attachment added: "ubiquity partitioning layout"
   https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1506139/+attachment/4495449/+files/crypt-partitioning.png

** Changed in: systemd (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1506139

Title:
  15.10beta crashes encrypted swap partition

Status in systemd package in Ubuntu:
  Incomplete

Bug description:
  Hi,

  I'm usually using a setup with three partitions on a disk

  Partition 1:  plain ext4 boot partition mounted on  /boot
  Partition 2:  luks-encrypted swap
  Partition 3: luks-encrypted btrfs for /  /home ...

  both mentioned in /etc/crypttab like

  sda2_crypt UUID=a7976d5c-6191-436d-9cf9-2cedf17d0893 none luks,swap,discard
  sda3_crypt UUID=339b9a90-8292-422d-a3cf-eeb0317e9f84 none luks,discard

  
  With several machines I have installed 15.10 beta on and in several cases I experienced the problem that the swap is not activated at boot time and that /dev/disks/by-uuid does not contain a link to the swap partition, and the previously created luks-encrypted swap is destroyed after boot: It is not a luks partition anymore and filled with random (presumably encrypted) bytes without structure. 

  I first thought that this is a problem of the setup process, and
  repaired the swap manually. But then I found the partition destroyed
  again. This happend several times on several machines.

  I am not sure yet what exactly would destroy the partition.

  ProblemType: Bug
  DistroRelease: Ubuntu 15.10
  Package: cryptsetup 2:1.6.6-5ubuntu2
  ProcVersionSignature: Ubuntu 4.2.0-16.19-generic 4.2.3
  Uname: Linux 4.2.0-16-generic x86_64
  ApportVersion: 2.19.1-0ubuntu2
  Architecture: amd64
  CurrentDesktop: XFCE
  Date: Wed Oct 14 18:12:58 2015
  InstallationDate: Installed on 2015-10-08 (5 days ago)
  InstallationMedia: Xubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150924)
  SourcePackage: cryptsetup
  UpgradeStatus: No upgrade log present (probably fresh install)
  crypttab:
   sda2_crypt UUID=a7976d5c-6191-436d-9cf9-2cedf17d0893 none luks,swap,discard
   sda3_crypt UUID=339b9a90-8292-422d-a3cf-eeb0317e9f84 none luks,discard

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1506139/+subscriptions