Mounting of opened LUKS Partition doesn't work on ODroid-C1

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

Mounting of opened LUKS Partition doesn't work on ODroid-C1

Postby HotAndSpicy » Fri Apr 23, 2021 9:43 am

Hi guys,
first of all thank you for the great image to install Arch on my brandnew (but used) ODroid-C1.
I attached my external HDD and I wanted to encrypt it with LUKS.
System is up to date:
$this->bbcode_second_pass_code('', '[root@alarm ~]# uname -a
Linux alarm 3.10.107-5-ARCH #1 SMP PREEMPT Fri Mar 26 23:32:03 UTC 2021 armv7l GNU/Linux')
$this->bbcode_second_pass_code('', '[root@alarm ~]# cryptsetup --version
cryptsetup 2.3.5')
So I created a new encrypted device, entered my password and opened the encrypted device and created the file system:
$this->bbcode_second_pass_code('', 'cryptsetup luksFormat --type luks2 /dev/sda
cryptsetup luksOpen /dev/sda backup
mkfs.ext4 /dev/mapper/backup
')

Looked good:
$this->bbcode_second_pass_code('', '[root@alarm ~]# cryptsetup -v luksDump /dev/sda
LUKS header information
Version: 2
Epoch: 3
Metadata area: 16384 [bytes]
Keyslots area: 16744448 [bytes]
UUID: 272f5d42-104d-4a42-b12e-6c41cccb3930
Label: (no label)
Subsystem: (no subsystem)
Flags: (no flags)

Data segments:
0: crypt
offset: 16777216 [bytes]
length: (whole device)
cipher: aes-xts-plain64
sector: 512 [bytes]

Keyslots:
0: luks2
Key: 512 bits
Priority: normal
Cipher: aes-xts-plain64
Cipher key: 512 bits
PBKDF: argon2i
Time cost: 4
Memory: 90436
Threads: 4
Salt: 51 01 04 1f c9 14 eb ab 44 81 ee f2 f7 a2 77 58
bf cd 5e 4d 4a 3f 9d b8 e3 05 15 34 ca 75 23 92
AF stripes: 4000
AF hash: sha256
Area offset:32768 [bytes]
Area length:258048 [bytes]
Digest ID: 0
Tokens:
Digests:
0: pbkdf2
Hash: sha256
Iterations: 13212
Salt: 4d 7b e8 56 31 83 54 ac cb fa 48 f3 33 a5 79 5a
6b 05 ff 01 ad dd ca 65 76 50 59 5a 4f 8e 07 eb
Digest: 42 35 b9 db 89 1f a9 f9 0a 24 e0 76 52 11 df 3d
c1 91 dd 86 e7 44 db ad 4e 19 e6 fd d6 dc ed e1
Command successful.')

Then I mounted the device:
$this->bbcode_second_pass_code('', '[root@alarm ~]# mount -t ext4 /dev/mapper/backup /mnt')

So far so good. Then I unmounted and cryptsetup close the HDD, luksOpen and mounted it on my laptop and transfered all file to the HDD (because it is way faster).

Now I wanted to access the data on the ODroid-C1 again. I do luksOpen and I try to mount the decrypted partition. But the happens the following:
$this->bbcode_second_pass_code('', '[root@alarm ~]# cryptsetup luksOpen /dev/sda backup
Enter passphrase for /dev/sda:
[root@alarm ~]# mount -t ext4 /dev/mapper/backup /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/mapper/backup, missing codepage or helper program, or other error.')

I don't know why this happens - everything seems to be correct:
$this->bbcode_second_pass_code('', '[root@alarm ~]# file -Ls /dev/mapper/backup
/dev/mapper/backup: Linux rev 1.0 ext4 filesystem data, UUID=0257153f-7f97-46ba-ffff84a0-3e2825077173 (extents) (64bit) (large files) (huge files)
[root@alarm ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
`-backup 254:0 0 931.5G 0 crypt
mmcblk0 179:0 0 14.8G 0 disk
`-mmcblk0p1 179:1 0 14.8G 0 part /
')

Thank you for your help :)
HotAndSpicy
 
Posts: 2
Joined: Fri Apr 23, 2021 9:29 am

Re: Mounting of opened LUKS Partition doesn't work on ODroid

Postby HotAndSpicy » Mon Apr 26, 2021 9:11 am

Hi guys, I just wanted to say that I appreciate any ideas :-)
HotAndSpicy
 
Posts: 2
Joined: Fri Apr 23, 2021 9:29 am


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 4 guests