You are not logged in.

#1 2018-10-24 08:50:11

addk
Member
Registered: 2014-02-19
Posts: 6

[SOLVED] Encrypted root and boot, no keyboard/USB after GRUB

Hi,

I have a tablet with Baytrail. I am using it as a server (that doesn't run all the time) and have done a plain installation before without any troubles.

Now I would like to encrypt it and have used the same approach that I have done for this laptop, without any problems.

I set up the EFI partition unencrypted, encrypts boot with luks, encrypts the rest of the drive with luks and set up lvm. This is the wiki/guide
https://wiki.archlinux.org/index.php/Dm … .28GRUB.29

It boots, GRUB ask for password to decrypt, which I enter, the menu comes and I get the "Welcome to Linux!"

[  OK  ] Reached target Initrd Root Device.
[  OK  ] ...
[  OK  ] Started Load Kernel Modules.
[  OK  ] Failed to mount /sysroot
See 'systemctl status sysroot.mount' for details.
[DEPEND] Dependency failed for Initrd Root File System.
[DEPEND] Dependency failed for Reload Configuration from the Real Root.
[  OK  ] Reached target Initrd File Systems.
[  OK  ] ...
[  OK  ] Found device /dev/disk/by-uuid/xxx
Starting Cryptography Setup for cryptlvm
Please enter passphrase for disk Linux\x20LVM (cryptlvm)!

At this point I can't use the keyboard anymore and have also tried with a USB-keyboard, but that doesn't work. A couple of seconds pass and it continues

You are now in emergency mode ...

The keyboard still doesn't work, so I can only turn it off. I have tried journalctl to get a log after I chroot into the system, but it says it is empty (as far as I can understand, because there is no disk to write to).

It is the same whether i use encrypt or sd-encrypt. Here is the other method:

[    0.xx] dw_dmac INTL9C60:00: Missing DT data]
[    0.xx] dw_dmac INTL9C90:01: Missing DT data]
:: running early hook (udev)
starting version 239
...
:: running hook [encrypt]

A password is required to access the cryptlvm volume:
Enter passphrase for /dev/mmcblk1p3:

And it hangs there, again without the option to use the keyboard.

I get a lvmetad error when running grub-mkconfig but according to the GRUB wiki I can ignore this.

The partitions are encrypred with:

cryptsetup -v --cipher aex-xts-plain64 --key-size 512 --hash sha512 luksFormat --iter-time 2000 --use-random /dev/mmcblk1px

Last edited by addk (2018-10-24 10:30:51)

Offline

#2 2018-10-24 09:37:20

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 1,979
Website

Re: [SOLVED] Encrypted root and boot, no keyboard/USB after GRUB

Did you, by any chance, build the initramfs while there was no keyboard connected to the system.
If so, years ago, I stumbled over this issue¹.
If you use the autodetect hook and do not have a keyboard connected to the respective machine while building the initramfs, there might be no USB keyboard support during initramfs phase.
My solution was to just keep a keyboard connected to the machine at any time and re-build the initramfs.
___
1) Link to issue in german forum: https://bbs.archlinux.de/viewtopic.php?id=28727

Last edited by schard (2018-10-24 09:41:16)


macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }

Offline

#3 2018-10-24 10:29:39

addk
Member
Registered: 2014-02-19
Posts: 6

Re: [SOLVED] Encrypted root and boot, no keyboard/USB after GRUB

Yes, it works. Thank you very much smile

The tablet comes with a keyboard that can be attached/detached. Only recently (last year or so) did the kernel add build-in support for this keyboard, but it worked fine with the plain install.

I did as you said and chrooted with the USB keyboard attached, rebuilded, rebooted and I could use the USB keyboard to decrypt after GRUB.

Offline

Board footer

Powered by FluxBB