Jump to content

NanoPi R4S - cryptsetup target password prompt via serial console


Werner

Recommended Posts

I tried to create encrypted home folders on my NanoPi R4S but for some reason the password prompt does not show up in serial console. It just times out and therefore fails.

 

I assume that the prompt is not properly pointed to the serial console but the board's console is clearly set to serial.

Tried to simply connect an USB keyboard and when the boot at the serial console pauses to enter the password this way but no idea if it has been recognized because it made no difference. Keyboard itself worked though, system rebooted on CTRL+ALT+DEL.

Tried a few things like making the cryptsetup.target depending on getty but did not make a difference.

 

From the cryptsetup part mostly I followed this: https://feeding.cloud.geek.nz/posts/encrypting-your-home-directory-using/

just with the addition that I updated the initramfs which is not mentioned there.

I also tried to use UUID for both fstab and crypttab instead of device names. No luck either.

 

[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Found device /dev/ttyS2.
[  OK  ] Found device /sys/subsystem/net/devices/eth1.
[  OK  ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
         Starting Load/Save RF Kill Switch Status...
[  OK  ] Reached target Bluetooth.
[  OK  ] Started Load/Save RF Kill Switch Status.
[  OK  ] Found device /dev/mmcblk1p2.
[...]
[  OK  ] Finished Helper to synchronize boot up for ifupdown.
         Starting Cryptography Setup for chome...
[FAILED] Failed to start Cryptography Setup for chome.
See 'systemctl status systemd-cryptsetup@chome.service' for details.
[DEPEND] Dependency failed for Local Encrypted Volumes.
[DEPEND] Dependency failed for /dev/mapper/chome.
[DEPEND] Dependency failed for /home.
[DEPEND] Dependency failed for Local File Systems.
[DEPEND] Dependency failed for Mark… need to relabel after reboot.
[DEPEND] Dependency failed for File…em Check on /dev/mapper/chome.
[  OK  ] Reached target Block Devic…aration for /dev/mapper/chome.
         Starting Load AppArmor profiles...
         Starting Armbian ZRAM config...
         Starting Set console font and keymap...
[...]

 

The log does not show up any useful info. I assume its just the timeout for the password prompt.

 


● systemd-cryptsetup@chome.service - Cryptography Setup for chome
     Loaded: loaded (/etc/crypttab; generated)
     Active: failed (Result: exit-code) since Fri 2021-01-01 18:02:57 UTC; 2min 11s ago
       Docs: man:crypttab(5)
             man:systemd-cryptsetup-generator(8)
             man:systemd-cryptsetup@.service(8)
    Process: 548 ExecStart=/lib/systemd/systemd-cryptsetup attach chome /dev/mmcblk1p2 none luks,timeout=30 (code=exited, status=1/FAILURE)
   Main PID: 548 (code=exited, status=1/FAILURE)

 

Doing luksOpen and mount manually after startup works perfectly fine.

Link to comment
Share on other sites

Armbian & Khadas are rewarding contributors

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines