I have created two dm-crypt partitions during Debian install:
sda2 sda2_crypt swap sda3 sda3_crypt /
I used 7.8.1 netinstall ISO. Later I have added additional dm-crypted drive sdb:
# cryptsetup -h=sha256 -c=aes-xts-plain64:sha1 -s=256 luksFormat /dev/sdb # cryptsetup luksOpen /dev/sdb drive2 # mkfs.ext4 /dev/mapper/drive2 # mkdir /mnt/drive2 && mount /dev/mapper/drive2 /mnt/drive2 # echo "/dev/mapper/drive2 /mnt/drive2 ext4 errors=remount-ro 0 2" >> /etc/fstab # ls -l /dev/disk/by-uuid | grep sdb
Then add the result into crypttab. So my crypttab and fstab becomes:
# cat /etc/crypttab sda2_crypt UUID=<some_sda2_uuid> none luks,swap sda3_crypt UUID=<some_sda3_uuid> none luks drive2 UUID=<some_sdb_uuid> none luks # cat /etc/fstab /dev/mapper/sda3_crypt / ext4 errors=remount-ro 0 1 UUID=<some_sda1_uid> /boot ext2 defaults 0 2 /dev/mapper/sda2_crypt none swap sw 0 0 /dev/mapper/drive2 /mnt/drive2 ext4 errors=remount-ro 0 2 /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
apt-get update && apt-get dist-upgrade && reboot. I got the first error:
After some normal reboots, I can get an unloadable system with message:
Reading all physical volumes. This may take a while
Both disks are RAID mirror volumes on Adaptec controller, but I have turned off all write-cahces.
What's wrong with mount/other configs? Thanks for the all advices in advance.
After repeating error I got the message that my swap partition is lost. Everytime the same error:
gparted shows now my swap as unknown partition (that was also 'crypt-luks' before):
Why this crypted swap is crashing? Other partitions are fine, but fsck from live CD shows me that sda2_crypt is lost.
May be I need to mount my swap as:
/dev/mapper/sda2_crypt none swap sw 0 1?