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

Post Reply
RedAndGreen
Posts: 1
Joined: Fri Apr 30, 2021 2:06 pm
languages_spoken: english, german
ODROIDs: ODroid C1
Has thanked: 0
Been thanked: 0
Contact:

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

Post by RedAndGreen »

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:

Code: Select all

[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

Code: Select all

[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:

Code: Select all

cryptsetup luksFormat --type luks2 /dev/sda
cryptsetup luksOpen /dev/sda backup
mkfs.ext4 /dev/mapper/backup
Looked good:

Code: Select all

[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:

Code: Select all

[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:

Code: Select all

[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:

Code: Select all

[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!

User avatar
odroid
Site Admin
Posts: 37753
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1910 times
Been thanked: 1183 times
Contact:

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

Post by odroid »

Moved from XU4 sub-forum.

I don't think the old kernel 3.10 can fully support the LUKS crypt file system.
But, I have no experience of using any encrypted partition.
I hope other experts can help you.

User avatar
mad_ady
Posts: 9540
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 604 times
Been thanked: 693 times
Contact:

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

Post by mad_ady »

If you're willing to try again, mount the filesystem as ext3 on your laptop when transferring files. Maybe it created some ext4 attribute not supported by the C1. Also look at dmesg and see if you get any errors when creating the encrypted volume and formatting. The usb on c1 is flakey...

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 1 guest