You are not logged in.

#1 2025-11-08 13:58:36

lopster
Member
Registered: 2021-10-11
Posts: 19

[SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

After the mkinitcpio upgrade to 40-1 the other day, my systems started reporting "Failed to start Virtual Console Setup" errors on boot. systemd-vconsole-setup is being started before the file system is available. It needs the file system as I'm loading a custom key map. The retry succeeds so all is OK in the end. Downgraded to 39.2-5 and the failure is gone. Anyone know if this is a new expected behavior?

Log from initial attempt:

Nov 08 09:26:15 archlinux systemd[1]: Starting Virtual Console Setup...
Nov 08 09:26:15 archlinux kernel:  nvme0n1: p1 p2
Nov 08 09:26:15 archlinux systemd-vconsole-setup[236]: loadkeys: Unable to open file: /usr/local/share/kbd/keymaps/personal.map: No such file or directory
Nov 08 09:26:15 archlinux systemd-vconsole-setup[233]: /usr/bin/loadkeys failed with exit status 1.
Nov 08 09:26:15 archlinux systemd[1]: systemd-vconsole-setup.service: Main process exited, code=exited, status=1/FAILURE
Nov 08 09:26:15 archlinux systemd[1]: systemd-vconsole-setup.service: Failed with result 'exit-code'.
Nov 08 09:26:15 archlinux systemd[1]: Failed to start Virtual Console Setup.
Nov 08 09:26:15 archlinux kernel: nvme nvme1: 12/0/0 default/read/poll queues
Nov 08 09:26:15 archlinux kernel: nvme nvme1: Ignoring bogus Namespace Identifiers
Nov 08 09:26:15 archlinux kernel:  nvme1n1: p1
Nov 08 09:26:15 archlinux systemd[1]: Found device XPG GAMMIX S11 Pro 2.
Nov 08 09:26:15 archlinux systemd[1]: Reached target Initrd Root Device.
Nov 08 09:26:15 archlinux systemd[1]: Starting File System Check on /dev/disk/by-uuid/778b7fcc-3851-40a9-9fd0-96a04cbc40ca...
Nov 08 09:26:15 archlinux systemd-fsck[244]: /dev/nvme0n1p2: clean, 1186629/30146560 files, 75375032/120586240 blocks
Nov 08 09:26:15 archlinux systemd[1]: Finished File System Check on /dev/disk/by-uuid/778b7fcc-3851-40a9-9fd0-96a04cbc40ca.

A few seconds later:

Nov 08 09:26:19 desktop systemd[1]: Starting Virtual Console Setup...
Nov 08 09:26:19 desktop systemd[1]: Finished Virtual Console Setup.

Last edited by lopster (2025-11-09 15:46:51)

Offline

#2 2025-11-08 14:57:55

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 70,981

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

It needs the file system as I'm loading a custom key map.

Add the keymap to the initramfs FILES ?

Did you previously use busybox? (mkinitcpio switched to systemd by default w/ v40)

Offline

#3 2025-11-08 15:21:29

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 702

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

Have you added "systemd" and "sd-vconsole" to your HOOKS line in /etc/mkinitcpio.conf ? If not, do it an generate a new initramfs with: "sudo mkinitcpio -p linux".


Excuse my poor English.

Offline

#4 2025-11-08 17:19:44

lopster
Member
Registered: 2021-10-11
Posts: 19

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

Thank you for the replies.

No, I have never used busybox. Always systemd.

I tried adding the keymap file to FILES in mkinitcpio.conf and it still failed.

I have "systemd" and "sd-vconsole" in HOOKS. I also had "keymap" which the wiki implies is for busybox so I took that out. It still failed. I tried moving sd-vconsole to the end of the HOOKS and that led to the same failure.

I then checked my HOOKS against the mkinitcpio v40 gitlab defaults and they're the same (and keymap is included):

HOOKS=(base systemd autodetect microcode modconf kms keyboard keymap sd-vconsole block filesystems fsck)

Offline

#5 2025-11-08 17:28:37

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 702

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

Remove "keymap" hook and try again as you are using sd-vconsole.


Excuse my poor English.

Offline

#6 2025-11-08 17:36:12

lopster
Member
Registered: 2021-10-11
Posts: 19

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

agapito wrote:

Remove "keymap" hook and try again as you are using sd-vconsole.

I tried removing the keymap hook and the failure still happens.

Offline

#7 2025-11-08 20:14:54

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 70,981

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

I tried adding the keymap file to FILES in mkinitcpio.conf and it still failed.

Tried or succeeded?

lsinitcpio /boot/initramfs-linux.img | grep keymaps

Offline

#8 2025-11-08 20:53:27

NuSkool
Member
Registered: 2015-03-23
Posts: 286

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

I think the `keymaps` in the above command should be `keymap`?

$ sudo lsinitcpio /boot/initramfs-linux.img | grep keymaps

$ sudo lsinitcpio /boot/initramfs-linux.img | grep keymap
hooks/keymap
keymap.bin
keymap.utf8

Last edited by NuSkool (2025-11-08 20:53:57)


Scripts I Use                                                 :  https://github.com/Cody-Learner
grep -m1 'model name' /proc/cpuinfo    : AMD Ryzen 7 8745HS w/ Radeon 780M Graphics
grep -m1 'model name' /proc/cpuinfo    : Intel(R) N95
grep -m1 'model name' /proc/cpuinfo    : AMD Ryzen 5 PRO 2400GE w/ Radeon Vega Graphics

Offline

#9 2025-11-08 21:27:37

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 70,981

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

loadkeys: Unable to open file: /usr/local/share/kbd/keymaps/personal.map: No such file or directory

Please post your mkinitcpio.conf

Offline

#10 2025-11-08 21:53:07

xerxes_
Member
Registered: 2018-04-29
Posts: 968

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

NuSkool wrote:

I think the `keymaps` in the above command should be `keymap`?

No, 'keymaps' is good:

# lsinitcpio /boot/initramfs-linux.img | grep keymaps
usr/share/kbd/keymaps/
usr/share/kbd/keymaps/i386/
usr/share/kbd/keymaps/i386/qwerty/
usr/share/kbd/keymaps/i386/qwerty/pl2.map

Offline

#11 2025-11-09 00:10:01

lopster
Member
Registered: 2021-10-11
Posts: 19

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

Below is what I currently have. It is still logging "archlinux systemd-vconsole-setup[233]: /usr/bin/loadkeys failed with exit status 1." on boot. The error remains on boot even if "keymap" is removed from HOOKS

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=(usbhid xhci_hcd)
MODULES=()

# 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=(/usr/local/share/kbd/keymaps/personal.map)

# HOOKS
# This is the most important setting in this file.  The HOOKS control thearchlinux systemd-vconsole-setup[233]: /usr/bin/loadkeys failed with exit status 1.
# 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 microcode modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev microcode modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev microcode modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev microcode modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base systemd autodetect microcode modconf kms keyboard keymap sd-vconsole block filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# 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=()

# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"

/etc/vconsole.conf:

KEYMAP=/usr/local/share/kbd/keymaps/personal.map

The map is in the initramfs:

$ lsinitcpio /boot/initramfs-linux.img | grep keymaps
usr/local/share/kbd/keymaps/
usr/local/share/kbd/keymaps/personal.map

Offline

#12 2025-11-09 08:36:04

hermes.hariwald
Member
From: Hungary
Registered: 2024-12-11
Posts: 3

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

A similar (or same) thing happened to me.
I couldn't get hold of the logs because the system stuck trying to mount the root fs w/o decrypting it first therefore not being able to write it anywhere only to the screen.

What I could do to work around the issue is downgrading the following pkgs: mkinitcpio, device-mapper, lvm2.

Why not just mkinitcpio as this post suggested? Because downgrading only that caused some udev rules missing when regenerating the initramfs w/ mkinitcpio. (Logs are gone so I cannot be more specific, sorry.)

Last edited by hermes.hariwald (2025-11-09 08:36:51)

Offline

#13 2025-11-09 08:36:24

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 70,981

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

The map is in the initramfs

and it's still complaining w/

Nov 08 09:26:15 archlinux systemd-vconsole-setup[236]: loadkeys: Unable to open file: /usr/local/share/kbd/keymaps/personal.map: No such file or directory

There're some artifacts (?) in your post (?)

# This is the most important setting in this file.  The HOOKS control thearchlinux systemd-vconsole-setup[233]: /usr/bin/loadkeys failed with exit status 1.

Remove the keymap hook, make sure to properly regenerate the initramfs (what failed the first attempt to include the personal keymap file?) and post an updated journal w/ the actual error you're facing.

@hermes.hariwald
How "similar"? What was the actual error?

Last edited by seth (2025-11-09 08:37:26)

Offline

#14 2025-11-09 09:19:06

zaxdan69
Member
Registered: 2016-06-04
Posts: 313

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

I had a similar problem and I downgaded mkinitcpio for now. The consolefont I'm using seems that it loads at first(when boot messages appear on screen), but then, when the login prompt appears to ttys the font falls back to the default. I don't use a custom keymap, but I have added another xkblayout and font in vconsole.conf.

Offline

#15 2025-11-09 11:29:08

hermes.hariwald
Member
From: Hungary
Registered: 2024-12-11
Posts: 3

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

@seth
The logs couldn't be persisted so all I can remember is the last line: a systemd job trying to mount my root file system that's coming from a supposed to be decrypted device (/dev/mapper/root). The decryption didn't happen by the initramfs before the mount attempt. It didn't prompt for the LUKS passphrase. It was stuck, I couldn't even get hold of an emergency shell.
I don't remember seeing any vconsole related errors but there were like 40 lines of systemd log on my screen so that doesn't mean much. The reason I said "similar" is because here the "order of the steps how things should be executed is reversed".

Offline

#16 2025-11-09 12:32:37

lopster
Member
Registered: 2021-10-11
Posts: 19

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

With FILES but without keymap (and comments removed) the map does make it in the initramfs. The same failure message still occurs but the details are different. It's now complaining about missing file qwerty-layout.

$ cat /etc/mkinitcpio.conf
MODULES=()
BINARIES=()
FILES=(/usr/local/share/kbd/keymaps/personal.map)
HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems fsck)

$ cat /etc/vconsole.conf
KEYMAP=/usr/local/share/kbd/keymaps/personal.map

$ sudo mkinitcpio -p linux
[sudo] password for user:
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: '6.17.7-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [systemd]
  -> Running build hook: [autodetect]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
  -> Running build hook: [keyboard]
  -> Running build hook: [sd-vconsole]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: '6.17.7-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [systemd]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: 'ast'
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci_renesas'
  -> Running build hook: [sd-vconsole]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'cs42l43'
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-fallback.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful

$ lsinitcpio /boot/initramfs-linux.img | grep keymaps
usr/local/share/kbd/keymaps/
usr/local/share/kbd/keymaps/personal.map

$ ls -latr /boot/initramfs*
-rwxr-xr-x 1 root root  43357198 Nov  9 08:16 /boot/initramfs-linux.img
-rwxr-xr-x 1 root root 198570931 Nov  9 08:16 /boot/initramfs-linux-fallback.img

REBOOTED

$ journalctl -b | grep "vconsole\|loadkeys"
Nov 09 08:17:29 archlinux systemd-vconsole-setup[237]: cannot open include file qwerty-layout
Nov 09 08:17:29 archlinux systemd-vconsole-setup[237]: syntax error, unexpected ERROR
Nov 09 08:17:29 archlinux systemd-vconsole-setup[233]: /usr/bin/loadkeys failed with exit status 1.
Nov 09 08:17:29 archlinux systemd[1]: systemd-vconsole-setup.service: Main process exited, code=exited, status=1/FAILURE
Nov 09 08:17:29 archlinux systemd[1]: systemd-vconsole-setup.service: Failed with result 'exit-code'.
Nov 09 08:17:33 desktop systemd[1]: systemd-vconsole-setup.service: Deactivated successfully.

The wiki indicates sd-vconsole should be reading vconsole.conf. Without the FILES, the map doesn't make it into initramfs. It seems like sd-vconsole just isn't working for some reason.

$ cat /etc/mkinitcpio.conf
MODULES=()
BINARIES=()
FILES=()
HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems fsck)

$ sudo mkinitcpio -p linux

$ lsinitcpio /boot/initramfs-linux.img | grep keymaps | wc
      0       0       0

Offline

#17 2025-11-09 13:39:40

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 70,981

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

What if you move the layout somewhere into /usr/share/kbd/keymaps/i386/ ?
You're currently lacking /usr/share/kbd/keymaps/i386/include/qwerty-layout.inc which is probably included by your personal layout.

Offline

#18 2025-11-09 14:35:46

lopster
Member
Registered: 2021-10-11
Posts: 19

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

I think I figured out why this started happening, at least on my systems.

mkinitcpio v40 added sd-vconsole as a default hook. It's set in the new meson.build file and then written into the template mkinitcpio.conf. v39.2 didn't have sd-vconsole in the default mkinitcpio.conf.

My systems had a default mkinitcpio.conf which got updated going to v40. Previously they weren't attempting to start systemd-vconsole-setup.service in the early boot. It wasn't in the initramfs image until upgrading to v40.

Removing the sd-vconsole hook altogether from mkinitcpio.conf fixes the failure message on boot.

Offline

#19 2025-11-09 14:37:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 70,981

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

seth wrote:

Did you previously use busybox?

lopster wrote:

No, I have never used busybox. Always systemd.

Yo spelled "yes" wrong…

Offline

#20 2025-11-09 14:48:15

lopster
Member
Registered: 2021-10-11
Posts: 19

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

seth wrote:
seth wrote:

Did you previously use busybox?

lopster wrote:

No, I have never used busybox. Always systemd.

Yo spelled "yes" wrong…

OK, thank you, I guess. I apologize for whatever made you surface that.

I thought you were referring to the busybox init system as described in the wiki article on mkinitcpio since that seemed relevant to the problem at hand.

Offline

#21 2025-11-09 14:59:24

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

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

That is what they were referring to, and it was default until mkinitcpio 40. If you were using the default config, you WERE using busybox init.

Offline

#22 2025-11-09 15:44:41

lopster
Member
Registered: 2021-10-11
Posts: 19

Re: [SOLVED] mkinitcpio upgrade from 39.2-5->40-1 causes vconsole failure

Scimmia wrote:

That is what they were referring to, and it was default until mkinitcpio 40. If you were using the default config, you WERE using busybox init.

OK, I understand now. Thank you for clearing that up. I setup arch years ago and didn't know there was a different init system for the boot image. Or maybe I did at one point and forgot.

Offline

Board footer

Powered by FluxBB