Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After update to zfsbootmenu zfsbootmenu-2.2.1_1: error mesage during boot: setfont: ERROR kdfontop.c:183 put_font_kdfontop: Unable to load such font with such kernel version #46758

Closed
gc-user opened this issue Oct 18, 2023 · 14 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@gc-user
Copy link

gc-user commented Oct 18, 2023

Is this a new report?

Yes

System Info

Void 6.3.13_2 x86_64 GenuineIntel uptodate hold rrmDDDFFFFFFFFF

Package(s) Affected

zfsbootmenu zfsbootmenu-2.2.1_1

Does a report exist for this bug with the project's home (upstream) and/or another distro?

There is a similar report about this error message, though it doesn't involve zfs and thus it doesn't involve zfsbootmenu or rEFInd.

#45216

The error message apparently is not critical, but annoying and there should be a way to eliminate the cause. For now, my guess it that the config file for iniramfs might contain the cause of this error message.

In /boot/config-[kernel_version] there are some settings regarding fonts:

CONFIG_FONT_SUPPORT=y
CONFIG_FONTS=y
# CONFIG_FONT_8x8 is not set
CONFIG_FONT_8x16=y
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_7x14 is not set
# CONFIG_FONT_PEARL_8x8 is not set
# CONFIG_FONT_ACORN_8x8 is not set
# CONFIG_FONT_MINI_4x6 is not set
# CONFIG_FONT_6x10 is not set
# CONFIG_FONT_10x18 is not set
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
CONFIG_FONT_TER16x32=y
# CONFIG_FONT_6x8 is not set

As the settings contain "TER" I tried installing terminus-font and rebuilding initramfs for the kernel and zfsbootmenu as well as vmlinz for zfsbootmenu, but booting those didn't make the error message disappear.
As grub isn't installed on my system I haven't tried the same installing grub-terminus as it seems pointless to me.

I thought of commenting out "CONFIG_FONT_TER16x32=y" to "#CONFIG_FONT_TER16x32 is not set", but am unsure if I might break something so I haven't tried that yet.

Expected behaviour

The boot process before zfsbootmenu is showing up should not differ from using initramfs images of previous versions of zfsbootmenu. I.E. this error message should not show up.

Actual behaviour

During boot, after rEFInd screen, just before zfsbootmenu screen the error message shows up:

setfont: ERROR kdfontop.c:183 put_font_kdfontop: Unable to load such font with such kernel version

Steps to reproduce

  1. Update zfsbootmenu to v2.2.1 and let dracut build a new vmlinuz / initramfs image
  2. Reboot to see the error message appear after rEFInd started loading the new initramfs image

To test previous version of zfsboootmenu:
Reboot, select initramfs of previous zfsbootmenu version in rEFInd and boot it to see no such error message showing up

@gc-user gc-user added bug Something isn't working needs-testing Testing a PR or reproducing an issue needed labels Oct 18, 2023
@classabbyamp
Copy link
Member

ZBM is just a custom initramfs, so it's the exact same thing as #45216

@classabbyamp classabbyamp closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
@classabbyamp classabbyamp added duplicate This issue or pull request already exists and removed needs-testing Testing a PR or reproducing an issue needed labels Oct 18, 2023
@zdykstra
Copy link
Contributor

Consider updating to Kernel 6.5.x - 6.3 is EOL and won't receive any more updates. If you use the binary release EFI from https://get.zfsbootmenu.org/efi do you get the same setfont error on your screen? What kernel commandline is rEFInd passing in to the ZFSBootMenu kernel/EFI bundle?

@gc-user
Copy link
Author

gc-user commented Oct 18, 2023

Thanks, Zach, for your reply.

  1. Kernel 6.5 is no option on my system as of now: Linux kernel 6.5, 6.6: System not waking up from standby / suspend. #46427
  2. When booting the binary release EFI from your link this error message doesn't show up.
  3. Not sure if this is what you're asking about as kernel commandline:

from /boot/efi/EFI/void/refind_linux.conf:
ro quiet loglevel=0 zbm.import_policy=hostid zbm.set_hostid zbm.timeout=4

FYI:

  • Adding "fbcon=nodefer" (suggested in the Unable to load such font with such kernel version #45216) to the end of the kcl in rEFInd for one-time-use makes the error message disappear.

  • Commenting out "CONFIG_FONT_TER16x32=y" and rebuilding initramfs for the kernel and zfsbootmenu as well as vmlinz for zfsbootmenu afterwards didn't change anything.

@zdykstra
Copy link
Contributor

Thanks, Zach, for your reply.

1. Kernel 6.5 is no option on my system as of now: [Linux kernel 6.5: System not waking up from standby / suspend. #46427](https://github.com/void-linux/void-packages/issues/46427)

Doh. Okay.

2. When booting the binary release EFI from your link this error message doesn't show up.

The ZFSBootMenu 2.2.1 release binaries are built with Kernel 6.1.55.

3. Not sure if this is what you're asking about as kernel commandline:

from /boot/efi/EFI/void/refind_linux.conf: ro quiet loglevel=0 zbm.import_policy=hostid zbm.set_hostid zbm.timeout=4

That's what I was looking for. For what it's worth, zbm.import_policy=hostid and zbm.set_hostid are the defaults, you can remove explicitly setting them if you want.

FYI:

* Adding "fbcon=nodefer" (suggested in the [Unable to load such font with such kernel version #45216](https://github.com/void-linux/void-packages/issues/45216)) to the end of the kcl in rEFInd for one-time-use makes the error message disappear.

I'll look into this option - thanks for noting that it worked. For now, I the easiest thing is to just permanently add that to /boot/efi/EFI/void/refind_linux.conf - or use the release EFI binary.

* Commenting out "CONFIG_FONT_TER16x32=y" and rebuilding initramfs for the kernel and zfsbootmenu as well as vmlinz for zfsbootmenu afterwards didn't change anything.

Where did you comment out CONFIG_FONT_TER16x32=y ? Unless you removed it from the config in the package and then rebuilt the package locally, it won't disable that option in the kernel.

@gc-user
Copy link
Author

gc-user commented Oct 18, 2023

  1. Ok, I see. Maybe I'll do that, too - or adding the fbcon line to kcl permanently. The EFI binary has some message after booting the BE about USB (can't recall the details right now and don't know where the log is stored, as it's not in "/var/log/everything/current".

  2. That's in /boot/config-[kernel_version]. It's also the output of "zcat /proc/config.gz |grep FONT". See also initial post above.

@zdykstra
Copy link
Contributor

The EFI binary ships with the USB teardown hook enabled by default. It's not needed by all users, but it also doesn't hurt to have enabled globally.

@gc-user
Copy link
Author

gc-user commented Oct 18, 2023

Yeah, that's it. "Tearing down USB controller..."

Just tested with "fbcon=nodefer" "hard-coded" into kcl: error message is gone, but font size is quite small for zbm. So, probably not the best solution.
Interestingly, when booting the binary, the font size was "normal". Probably also because it was built with kernel 6.1, I guess.

@zdykstra
Copy link
Contributor

Okay, I understand what's happening now. The setfont call that's being invoked isn't the one that ZFSBootMenu provides as a hook/contrib script, but is instead happening by the Dracut i18n module. They have a call to setfont that doesn't capture stdout/stderr, so when it errors out it just dumps straight to the console.

The font size is different in your locally built ZFSBootMenu image vs the binary release because the console auto-size hook is included by default in the binary release, but not local releases. That feature will be included/enabled by default in the upcoming ZFSBootMenu release. Until then, however, it has to be manually added to ZFSBootMenu. I'd recommend just sticking with the binary release for now - we'll have a few improvements to the local build process in the upcoming release.

@gc-user
Copy link
Author

gc-user commented Oct 18, 2023

Ok, thanks for your detective work!
Dracut once again... :-)

When you say the "console auto-size" can be added manually, do you mean via the rEFInd kcl or in zbm itself?

@zdykstra
Copy link
Contributor

You can add https://github.com/zbm-dev/zfsbootmenu/blob/v2.2.x/contrib/20-console-autosize.sh to your local build. It should be configured as an early setup hook, documented at https://docs.zfsbootmenu.org/en/v2.2.x/man/zfsbootmenu.7.html#options-for-dracut . https://github.com/zbm-dev/zfsbootmenu/blob/v2.2.x/etc/zfsbootmenu/release.conf.d/common.conf is how it's added in for the release EFI builds (along with everything else set for them). Adjust paths as needed, and make sure the script is executable.

@gc-user
Copy link
Author

gc-user commented Oct 18, 2023

Thanks, again!

  • I build (using the void package) from kernel v6.1.55 with no change.
  • Apparently, building including "20-console-autosize.sh" is above my pay-grade. At least it didn't result in a different outcome for me.

So, for now I just live with the tiny font and just wait for the next release.

@zdykstra
Copy link
Contributor

Share the changes you made to the files in /etc/zfsbootmenu/ - you've likely just missed one small step.

@gc-user
Copy link
Author

gc-user commented Oct 19, 2023

Well, I wasn't quite sure if you were talking building my own xbps package or "just" re-configuring zbm, so I tried both. Same approaches (I tried several ways), no luck.

I put the script into /stc/zfsbootmenu (& made sure it's executable) and the line

zfsbootmenu_early_setup+=" /etc/zfsbootmenu/20-console-autosize.sh "

into

A) /etc/zfsbootmenu/dracut.conf.d/zfsbootmenu.conf
B) /etc/zfsbootmenu/release.conf.d/release.conf
C) /etc/zfsbootmenu/release.conf.d/common.conf

In B) and C) that was the only entry in the file, in A) I added it as second entry (line).

(For xbps package building for A) I had to make a patch, so the file would not be overridden in the process.)

That is the level I was able to think of / "program". But I don't know if dracut would even read / check those changes / additions. The resulting images / EFI files had the same sizes as the previous ones and thus not surprisingly no effect on the font size.

@gc-user
Copy link
Author

gc-user commented Oct 29, 2023

The new version of zbm (2.2.2_1) seems to be the same in regards to the issue, but I remember, that the font was that tiny in the early versions of zbm, too, so I don't really mind and settled for the workaround (adding "fbcon=nodefer" at the end of the kcl in /boot/efi/EFI/void/refind_linux.conf).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants