Bug 1013573 - "dracut: Could not find FONT_MAP none!" warning while rebuilding initrd
Summary: "dracut: Could not find FONT_MAP none!" warning while rebuilding initrd
Status: RESOLVED FIXED
: 1096771 (view as bug list)
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Daniel Molkentin
QA Contact: E-mail List
URL: https://trello.com/c/3Ty7QlJj/1298-tu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-04 19:01 UTC by Andrei Dziahel
Modified: 2019-09-10 09:01 UTC (History)
12 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Dziahel 2016-12-04 19:01:08 UTC
Repro:

1. Install openSUSE Tumbleweed (snapshot 20161123 in my case)
2. run /sbin/mkinitrd as root (or wait for update that triggers rebuilding initrd)
3. Watch dracut output

Expected: no FONT_MAP-related warnings and related issues

Instead: see summary

The issue is created because current TW snapshot is affected as well

Additional info: 

> $ cat /etc/vconsole.conf 
> KEYMAP=us
Comment 1 Fabian Vogt 2016-12-05 08:35:34 UTC
It uses the value of CONSOLE_SCREENMAP in /etc/sysconfig/console.
It should likely be an empty string instead of "none".
Comment 2 Daniel Molkentin 2016-12-19 15:00:53 UTC
/usr/share/YaST2/modules/Console.rb already initializes the value with "none". Like Fabian said, this should be empty instead. CC'ing the yast module maintainer.
Comment 4 Ladislav Slezák 2017-01-17 12:43:08 UTC
Um, besides changing the default value (https://github.com/yast/yast-country/blob/ccb616e88eca82d93aaff13b672c1accee4a1ee5/console/src/modules/Console.rb#L68) we will probably need to touch the console/src/data/consolefonts_opensuse.ycp  and console/src/data/consolefonts.ycp data files as they also contain a screen map section...
Comment 5 Arvin Schnell 2017-01-17 12:53:48 UTC
I added a card to the YaST trello task board so that the issue is prioritised
with the other tasks.
Comment 6 Andrei Dziahel 2017-05-24 20:45:39 UTC
Affects fresh installation of TW
Comment 7 Andrei Dziahel 2018-06-24 08:45:48 UTC
Affects TW 20180622 too
Comment 8 M Fredericks 2018-09-30 09:47:02 UTC
I did change /etc/sysconfig/console on my up-to-date Tumbleweed system 20810930:

# See https://bugzilla.opensuse.org/show_bug.cgi?id=1013573
# CONSOLE_SCREENMAP="none"
CONSOLE_SCREENMAP=""

Then, running mkinitrd I still see the "Could not find FONT_MAP none!"

> sudo mkinitrd
Creating initrd: /boot/initrd-4.18.7-1-default
dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-4.18.7-1-default 4.18.7-1-default
dracut: *** Including module: bash ***
dracut: *** Including module: systemd ***
dracut: *** Including module: warpclock ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: i18n ***
dracut: Could not find FONT_MAP none!
dracut: *** Including module: drm ***
dracut: *** Including module: plymouth ***
dracut: *** Including module: btrfs ***
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***

Is there another key then CONSOLE_SCREENMAP that should be changed?
Comment 9 M Fredericks 2018-10-01 20:17:56 UTC
Had a look where the error comes from and found it is coming out of /usr/lib/dracut/modules.d/10i18n/module-setup.sh:

        if [[ ${FONT_MAP} ]]
        then
            FONT_MAP=${FONT_MAP%.trans}
            # There are three different formats that setfont supports
            inst_simple ${kbddir}/consoletrans/${FONT_MAP} \
            || inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans \
            || inst_simple ${kbddir}/consoletrans/${FONT_MAP}_to_uni.trans \
            || dwarn "Could not find FONT_MAP ${FONT_MAP}!"
        fi

${kbddir}/consoletrans/ is /usr/share/kbd/consoletrans and looking in that directory I see things like 8859-14_to_uni.trans but also "null" and "zero", are these values to use?

The null file header says:

# Map the ISO 8859-x control characters to <none>

The zero file header says

# Map all characters with high bit set to <none>

It is also not clear to me yet how the ${FONT_MAP} comes into this 0i18n/module-setup.sh script, is that really through the CONSOLE_SCREENMAP key in /etc/sysconfig/console
Comment 10 Andrei Amuraritei 2018-10-03 17:49:01 UTC
Hi,

FONT_MAP is sourced from /etc/vconsole.conf on line 22 of /usr/lib/dracut/modules.d/10i18n/module-setup.sh:

17-# called by dracut
18-install() {
19-    if dracut_module_included "systemd"; then
20-        unset FONT
21-        unset KEYMAP
22:        [[ -f /etc/vconsole.conf ]] && . /etc/vconsole.conf
23-    fi
24-
25-    KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps
26-    DEFAULT_FONT="${i18n_default_font:-LatArCyrHeb-16}"
27-    I18N_CONF="/etc/locale.conf"
28-    I18N_CONF_SUSE="/etc/sysconfig/language"
29:    VCONFIG_CONF="/etc/vconsole.conf"

and removing none from FONT_MAP in /etc/vconsole.conf and then running dracut -f -v the message is gone.
Comment 11 Andrei Amuraritei 2018-10-03 20:02:42 UTC
As far as I'm able to see, FONT_MAP=none still comes in vconsole.conf from:

https://github.com/yast/yast-country/blob/master/console/src/modules/Console.rb

68: @screenMap = "none"

So maybe get Yast team on this again?

Can't find anywhere else where vconsole.conf is configured with FONT_MAP for the moment.
Comment 12 Lukas Ocilka 2018-10-18 11:55:18 UTC
We'll try.
Comment 13 M Fredericks 2018-10-20 10:29:53 UTC
(In reply to Andrei Amuraritei from comment #11)
> As far as I'm able to see, FONT_MAP=none still comes in vconsole.conf from:

I can confirm, with:
> # cat /etc/vconsole.conf
> KEYMAP=us
> FONT=eurlatgr.psfu
> FONT_MAP=
> FONT_UNIMAP=

I do not see the warning/error anymore.
Comment 14 Josef Reidinger 2018-10-26 13:24:20 UTC
fix is in review https://github.com/yast/yast-country/pull/184
Comment 15 M Fredericks 2018-10-27 09:20:29 UTC
(In reply to Josef Reidinger from comment #14)
> fix is in review https://github.com/yast/yast-country/pull/184

Nice to see this will also be fixed in YaST.
Comment 16 Josef Reidinger 2018-10-29 09:49:46 UTC
fix merged. Will be in Leap 15.1 and TW.
Thanks for report
Comment 18 Swamp Workflow Management 2018-10-31 10:00:06 UTC
This is an autogenerated message for OBS integration:
This bug (1013573) was mentioned in
https://build.opensuse.org/request/show/645689 Factory / live-langset-data
Comment 20 Daniel Molkentin 2019-01-25 13:51:00 UTC
*** Bug 1096771 has been marked as a duplicate of this bug. ***
Comment 21 Daniel Molkentin 2019-01-25 13:56:31 UTC
I am reopening this because /etc/vconsole.conf still contains the incorrect value for existing setups (none is not a legal value for FONT_MAP, but systemd seems to silently ignore that, while dracut correctly complains). I see two ways of fixing this:

1. Have a sed command systemd packages %post section fix this, as the file belongs with the systemd package and systemd has migrated this value.
2. Have a YasT upgrade fix it.

I have created a submit request for the first option, but I understand Franck would prefer to have YaST fix the value in vconsole.conf. Is that correct?
Comment 22 Franck Bui 2019-01-25 14:24:42 UTC
Well as discussed, I currently don't see why we should put the workaround in systemd as yast2 put the incorrect value in the first place _and_ yast2 is able to modify vconsole.conf just as systemd can (the fact that the file is owned by systemd doesn't really matter I think).

However in order for the workaround to take effect, initrd should be rebuilt and neither systemd nor yast2 triggers a mkinitrd on package update.

So perhaps the simplest way to fix this is to put the workaround in dracut ?
Comment 23 Daniel Molkentin 2019-01-25 16:49:16 UTC
The regeneration argument is a good one, I wasn't aware of that. (Although it might be a good idea for systemd to trigger mkinitrd, because mkinitrd contains a good portion files copied from systemd).

So I submitted pretty much the same fix to factory for dracut that I did for systemd. Took some ||: convicing to make rpmbuild ignore the fact that dracut doesn't provide the file but it works now.
Comment 24 Thomas Blume 2019-02-01 13:56:59 UTC
*** Bug 1123525 has been marked as a duplicate of this bug. ***
Comment 25 Thomas Blume 2019-02-01 13:59:08 UTC
(In reply to Josef Reidinger from comment #16)
> fix merged. Will be in Leap 15.1 and TW.
> Thanks for report

Seems that Leap15 is also affected, see bug#1123525
Comment 26 Swamp Workflow Management 2019-03-05 17:13:00 UTC
SUSE-RU-2019:0546-1: An update that has 14 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1008352,1013573,1053248,1055834,1090884,1098448,1110519,1112327,1113712,1119499,1121251,1124088,1125327,937555
CVE References: 
Sources used:
SUSE Linux Enterprise Server 12-SP3 (src):    dracut-044.1-114.25.1
SUSE Linux Enterprise Desktop 12-SP3 (src):    dracut-044.1-114.25.1
SUSE CaaS Platform ALL (src):    dracut-044.1-114.25.1
SUSE CaaS Platform 3.0 (src):    dracut-044.1-114.25.1
Comment 27 Josef Reidinger 2019-07-15 07:22:55 UTC
(In reply to Thomas Blume from comment #25)
> (In reply to Josef Reidinger from comment #16)
> > fix merged. Will be in Leap 15.1 and TW.
> > Thanks for report
> 
> Seems that Leap15 is also affected, see bug#1123525

Hi Thomas, I worry that YaST update does not help here as it is insts-sys content. So update is not applied. Reassigning to Daniel if he wants to backport his fix or just closing as won't fix.
Comment 28 Daniel Molkentin 2019-09-10 09:01:16 UTC
This is actually resolved for quite some time now courtesy of a sed call in the dracut RPM.