尽管定义了 US ANSI,Archlinux 仍以德国 ISO 键盘布局启动

尽管定义了 US ANSI,Archlinux 仍以德国 ISO 键盘布局启动

我最近从 DE-ISO 切换到 US-ANSI 布局,并且在我的 Archlinux 机器上遇到了一个我无法解决的问题,这有点痛苦,因为加密密钥需要德国布局,但我的键盘是美国键盘。

这是我到目前为止所尝试过的:

  1. 检查我的系统上是否可以使用美国键盘映射:
    ~
    ❯ localectl list-keymaps | grep -iI "us"
    
    amiga-us
    atari-us
    br-latin1-us
    cz-us-qwertz
    is-latin1-us
    mac-us
    sunt5-cz-us
    sunt5-us-cz
    us
    us-acentos
    us1
    
  2. KEYMAP针对 vconsole 进行了更改:
    ~
    ❯ cat /etc/vconsole.conf
    KEYMAP=us
    FONT=lat9w-16
    
  3. 确保键映射挂钩位于 mkinitcpio 中的加密挂钩之前:
    ~
    ❯ grep -iI "hooks" /etc/mkinitcpio.conf
    # The following modules are loaded before any boot hooks are
    # HOOKS
    # This is the most important setting in this file.  The HOOKS control the
    # order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
    #    HOOKS=(base)
    #    HOOKS=(base udev autodetect block filesystems)
    #    HOOKS=(base udev block filesystems)
    #    HOOKS=(base udev block mdadm encrypt filesystems)
    #    HOOKS=(base udev block lvm2 filesystems)
    #    usr, fsck and shutdown hooks.
    HOOKS=(base udev autodetect modconf block keyboard keymap consolefont encrypt filesystems fsck shutdown)
    
  4. 为当前 Linux 内核重建 mkinitcpio:
    ~
    ❯ sudo mkinitcpio -p linux
    ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
      -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
    ==> Starting build: 6.0.8-arch1-1
      -> Running build hook: [base]
      -> Running build hook: [udev]
      -> Running build hook: [autodetect]
      -> Running build hook: [modconf]
      -> Running build hook: [block]
    ==> WARNING: Possibly missing firmware for module: xhci_pci
      -> Running build hook: [keyboard]
      -> Running build hook: [keymap]
      -> Running build hook: [consolefont]
      -> Running build hook: [encrypt]
    ==> WARNING: Possibly missing firmware for module: qat_4xxx
      -> Running build hook: [filesystems]
      -> Running build hook: [fsck]
      -> Running build hook: [shutdown]
    ==> Generating module dependencies
    ==> Creating zstd-compressed initcpio image: /boot/initramfs-linux.img
    ==> Image generation successful
    ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
      -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    ==> Starting build: 6.0.8-arch1-1
      -> Running build hook: [base]
      -> Running build hook: [udev]
      -> Running build hook: [modconf]
      -> Running build hook: [block]
    ==> WARNING: Possibly missing firmware for module: qed
    ==> WARNING: Possibly missing firmware for module: qla1280
    ==> WARNING: Possibly missing firmware for module: wd719x
    ==> WARNING: Possibly missing firmware for module: qla2xxx
    ==> WARNING: Possibly missing firmware for module: bfa
    ==> WARNING: Possibly missing firmware for module: aic94xx
    ==> WARNING: Possibly missing firmware for module: xhci_pci
      -> Running build hook: [keyboard]
      -> Running build hook: [keymap]
      -> Running build hook: [consolefont]
      -> Running build hook: [encrypt]
    ==> WARNING: Possibly missing firmware for module: qat_4xxx
      -> Running build hook: [filesystems]
      -> Running build hook: [fsck]
      -> Running build hook: [shutdown]
    ==> Generating module dependencies
    ==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-fallback.img
    ==> Image generation successful
    

然而,当我启动系统时,它无法解密我的设备,并且在两次加密尝试之间,我不断敲击随机键以查看哪个键映射处于活动状态,结果发现它仍然是德国 ISO 布局。

~
❯ uname -a
Linux bunda 6.0.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Nov 2022 21:14:24 +0000 x86_64 GNU/Linux

还有其他我可以定义的位置吗?我还能检查什么?

相关内容