You are not logged in.

#1 2022-11-09 18:51:33

philipp
Member
Registered: 2018-12-14
Posts: 10

usbhid module in mkinitcpio.conf not available

I am trying to setup full disk encryption as described here, using the sd-encrypt hook.So in order to make that work I have addded those modules:

HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt lvm2 filesystems fsck)

But I have only usb3 ports so my keyboard is inserted in one of those. As mentioned here:

If using a keyboard through a USB 3 hub and wish to use it to unlock a LUKS device, add usbhid xhci_hcd

But adding those modules to the list yields errors when regenerating the initramfs. I have notfound any way to install those modules. Right now I need to enter the passphrase on my de-latin1 keyboard as if it has a default layout (switching - with ß etc.) and in case something goes wrong I end up in a rescue shell without the ability to type at all.

Thanks for Help!

Offline

#2 2022-11-09 19:53:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: usbhid module in mkinitcpio.conf not available

xhci_hcd is built in now on the main Arch kernel. usbhid should still be there as a module. What's the error, exactly?

Offline

#3 2022-11-10 01:26:05

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: usbhid module in mkinitcpio.conf not available

philipp wrote:

But adding those modules to the list yields errors when regenerating the initramfs.

When you say 'the list', you're not adding them to the list you showed us, are you? You need to add them to the modules list. By default, that list is at the top of the file and empty.

MODULES=()

CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#4 2022-11-10 08:31:57

philipp
Member
Registered: 2018-12-14
Posts: 10

Re: usbhid module in mkinitcpio.conf not available

you need to add them to the modules list.

Thanks, that was indeed the mistake.

However, the problems itself:
- no working keypmap
- no ability to type in rescue shell

are still there.

What else can I try??

Offline

#5 2022-11-10 08:59:56

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,427

Re: usbhid module in mkinitcpio.conf not available

I need to enter the passphrase on my de-latin1 keyboard as if it has a default layout (switching - with ß etc.)

… keyboard keymap …
Edit: that's btw. in https://wiki.archlinux.org/title/dm-cry … mkinitcpio

Post your mkinitcpio.conf and a complete system journal (of a regular boot)

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Last edited by seth (2022-11-10 09:00:44)

Offline

#6 2022-11-10 09:55:48

philipp
Member
Registered: 2018-12-14
Posts: 10

Re: usbhid module in mkinitcpio.conf not available

mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=(usbhid xhci_hcd)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
#
#
#    usbhid
#    xhci_hcd
HOOKS=(base keyboard sd-vconsole modconf block sd-encrypt lvm2 filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

/etc/default/grub

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3"
GRUB_CMDLINE_LINUX="rd.luks.name=27350b79-b84f-413c-98e5-038f25f397ab=cryptroot"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
#GRUB_DISABLE_OS_PROBER=false

a regular boot isn't possible since I never arrive at the booted OS.

journalctl -b

yields: »No journal files were found«

Offline

#7 2022-11-10 10:01:32

philipp
Member
Registered: 2018-12-14
Posts: 10

Re: usbhid module in mkinitcpio.conf not available

As I just noticed, I missed the hooks

systemd autodetect

Now I have to enter the passphrase twice, which seams to be ok. But the first time I still need to switch the characters.

Offline

Board footer

Powered by FluxBB