dracut icon indicating copy to clipboard operation
dracut copied to clipboard

dracut: i18n_vars not set! Please set up i18n_vars in configuration file.

Open barmadrid opened this issue 4 years ago • 10 comments

I'm setting console font in kernel parameters via /etc/dracut.conf.d/myconf.conf using: kernel_cmdline="rd.vconsole.keymap=us rd.vconsole.font=ter-v22b"

The efi image is generated with: dracut --force --uefi /boot/linux.efi

During build I see the following messages:

dracut: i18n_vars not set!  Please set up i18n_vars in  configuration file.
dracut: No KEYMAP configured.

Although the font get applied on boot regardless of messages above, the image does not contain /etc/vconsole.conf as described in DRACUT.CMDLINE(7):

rd.vconsole.font= console font; taken from consolefonts directory; will be written as FONT to /etc/vconsole.conf in the initramfs.

Is this normal or am I missing something?

barmadrid avatar Jul 28 '20 20:07 barmadrid

Do the binaries setfont, loadkeys and kbd_mode exist on your machine? is the i18n module part of your initrd? (check with lsinitrd)

danimo avatar Aug 04 '20 23:08 danimo

Do the binaries setfont, loadkeys and kbd_mode exist on your machine? is the i18n module part of your initrd? (check with lsinitrd)

@danimo Yes all three exists on my machine and also in the initrd image under /usr/bin. Yes, i18n module is included too.

barmadrid avatar Aug 07 '20 01:08 barmadrid

@barmadrid what distro is this, what release of dracut and could you double check and see if the keymap and font actually exist on the initrd ( highly unlikely that the us keymap is missing but ter-v22b.psf.gz might ).

johannbg avatar Aug 07 '20 07:08 johannbg

@johannbg The distro is Arch Linux and dracut version is 050 Yes, keymap is present and also the font:

$ lsinitrd /boot/linux.efi | less
:
-rw-r--r--   1 root     root        34557 Jun 29 12:28 usr/share/kbd/consolefonts/ter-v22b.psf
:

barmadrid avatar Aug 07 '20 18:08 barmadrid

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

stale[bot] avatar Jan 13 '21 23:01 stale[bot]

I can confirm that I'm still experiencing this in 051.

barmadrid avatar Jan 13 '21 23:01 barmadrid

Fedora ships with /usr/lib/dracut/dracut.conf.d/01-dist.conf:

# dracut config file customized for RedHat/Fedora.

# i18n
i18n_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP /etc/sysconfig/i18n:SYSFONT-FONT,FONTACM-FONT_MAP,FONT_UNIMAP"
i18n_default_font="eurlatgr"
i18n_install_all="yes"


stdloglvl=3
sysloglvl=5
install_optional_items+=" vi /etc/virc ps grep cat rm "
prefix="/"
systemdutildir=/usr/lib/systemd
systemdsystemunitdir=/usr/lib/systemd/system
systemdsystemconfdir=/etc/systemd/system
udevdir=/usr/lib/udev
hostonly="yes"
hostonly_cmdline="no"
early_microcode="yes"
reproducible="yes"

Your distro seems to be missing such file

haraldh avatar Jan 14 '21 08:01 haraldh

The paths to consolefonts and keymaps in Arch are:

/usr/share/kbd/consolefonts /usr/share/kbd/keymaps

I included that in i18n_vars, trying different combination as mentioned in dracut/modules.d/10i18n/README with no success!

Not sure at this point!

barmadrid avatar Feb 13 '21 16:02 barmadrid

I do not think this is a bug.

I never paid much attention to the error as it didn't negatively affect anything, but changing my conf file in /etc/dracut.conf.d/ from this:

# Hide all systemd messages at startup
kernel_cmdline="quiet"
# Use hostonly to exclude unnecessary modules, but do not include the hostonly
# cmdline in the image, because at the time of writing it has a few issues with
# discoverable partitions.
# See <https://github.com/dracutdevs/dracut/issues/723#issuecomment-792248568>
hostonly="yes"
hostonly_cmdline="no"

To this:

# i18n
i18n_vars="/usr/share/kbd/consolefonts  /usr/share/kbd/keymaps"
# Hide all systemd messages at startup
kernel_cmdline="quiet"
# Use hostonly to exclude unnecessary modules, but do not include the hostonly
# cmdline in the image, because at the time of writing it has a few issues with
# discoverable partitions.
# See <https://github.com/dracutdevs/dracut/issues/723#issuecomment-792248568>
hostonly="yes"
hostonly_cmdline="no"

Eliminated the error.

deimosian avatar Oct 20 '21 23:10 deimosian

Please read chapter 2.2 of the i18n module README.

haraldh avatar Oct 21 '21 07:10 haraldh

Closing..

@barmadrid Please let us know if you think dracut does not work as it intended/documented.

LaszloGombos avatar Oct 25 '22 12:10 LaszloGombos