Running Kubuntu 17.10 I have an external hard disk of 500GB split into two partitions of equal sizes. One partition is an NTFS partition and the other is an encrypted partition. When I connect the disk to my laptop, Device Notifier shows entries for both partitions separately.
Output of sudo cryptsetup luksDump /dev/sdd1
is:
LUKS header information for /dev/sdd1
Version: 1
Cipher name: aes
Cipher mode: xts-plain64
Hash spec: sha1
Payload offset: 4096
MK bits: 256
MK digest: 40 50 .. ..
MK salt: b4 cb .. ..
MK iterations: 16500
UUID: 3a2bf693-..
Key Slot 0: ENABLED
Iterations: 66251
Salt: 42 ba .. ..
Key material offset: 8
AF stripes: 4000
Key Slot 1: DISABLED
When I try mounting the partition with sudo cryptsetup luksOpen /dev/sdd1 lukslvm
, it asks for a password. When I enter a correct password, it produces no error.
After this, ls -lA /dev/mapper
shows:
crw------- 1 root root 10, 236 Feb 11 09:52 control
lrwxrwxrwx 1 root root 7 Feb 11 09:52 cryptswap1 -> ../dm-3
lrwxrwxrwx 1 root root 7 Feb 11 09:52 kubuntu--vg-root -> ../dm-1
lrwxrwxrwx 1 root root 7 Feb 11 09:52 kubuntu--vg-swap_1 -> ../dm-2
lrwxrwxrwx 1 root root 7 Feb 13 16:32 lukslvm -> ../dm-4
lrwxrwxrwx 1 root root 7 Feb 11 09:52 sda3_crypt -> ../dm-0
Output of sudo lsblk -f
is:
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 vfat E551-A70F /boot/efi
├─sda2 ext4 4b.. /boot
└─sda3 crypto_LUKS 9f..
└─sda3_crypt LVM2_member 6d..
├─kubuntu--vg-root
│ ext4 29.. /
└─kubuntu--vg-swap_1
swap 6f..
└─cryptswap1
swap 01.. [SWAP]
sdb
├─sdd1 crypto_LUKS 3a..
│ └─lukslvm ext4 efinso-X53U-back 6a..
└─sdd2 ntfs backup 64..
sr0
Output of cryptsetup status lukslvm
is:
/dev/mapper/lukslvm is active.
type: LUKS1
cipher: aes-xts-plain64
keysize: 256 bits
device: /dev/sdd1
offset: 4096 sectors
size: 586078488 sectors
mode: read/write
The device notifier still shows the volume as not mounted.
When I try to mount it using the device notifier, it produces an error informing me that it can not be mounted.
In Dolphin, when I try to mount it, it produces an error:
An error occurred while accessing 'efinso-X53U-back', the system responded: The requested operation has failed:
Error mounting /dev/dm-4 at /media/sandip/efinso-X53U-back: Command-line mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/dm-4" "/media/sandip/efinso-X53U-back"' exited with non-zero exit status 32: mount: /media/sandip/efinso-X53U-back: can't read superblock on /dev/mapper/lukslvm.
I am able to mount NTFS partition without difficulty.
Also, external hard disks with only one encrypted partition on them load without any error.
What could have gone wrong? How do I set it right?
FWIW, there is a chance that last time I used the encrypted partition, I forgot to eject it.
Thanks to user @ukos, in comments the following solution was mentioned and it fixed the issue for me. I'm posting here as possible solution. Pay attention
sudo
in command, without it, it gives error:After I entered correct answer, it opened this disk in file manager too.