LUKS / dmcrypt / Instalation Issue

Kernels & Hardware, configuring network, installing services

LUKS / dmcrypt / Instalation Issue

Postby benji » 2017-03-07 14:02

Hoping someone can help out what I think should be straightforward (for someone more familiar with the subject than me).

I installed jessie and opted for an encrypted / partition (/dev/sda2), encrypted swap partition (/dev/sda3) and unencrypted /boot partition (/dev/sda1)
Single disk /dev/sda1
All fine so far and the system works fine

Then I installed 4 data disks (when powered down) and the origonal sda is now sde.
Upon boot up the new sda unfortunately has 3 partitions and 1.7TB of data disapeared as it now becomes an encrypted swap partition. However, the system still boots up using sde1 as /boot and sde2 as /

Looking at fstab it looks like / is referenced by UUID (so explains how the system still booted) but swap was referenced by /dev/sda3 (so explains how all the data got wiped from the "wrong" place).

Lesson learned but why is the swap not referenced by a permanent ID which would have prevented this. Why is it done differently to the / partition.

More significantly now my encrypted drive (/) (/dev/sde2) is referred to by device mapper as /dev/mapper/sda2_crypt which is really confusing.
How can I change this?
I updated fstab, crypttab removed the entry in the dmsetup --table and replaced with a renamed equivalent.
Now the system still boots but asks for the encryption key twice and the device names have not changed at all.
I spent hours online but cant see what I need to change, the best page I found was

Posts: 1
Joined: 2017-03-07 13:28

Return to System configuration

Who is online

Users browsing this forum: No registered users and 7 guests