Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#75928 - [grub] the "C.gmo" file is missing

Attached to Project: Arch Linux
Opened by lilikoi (lilikoi) - Saturday, 17 September 2022, 15:23 GMT
Last edited by Christian Hesse (eworm) - Wednesday, 05 October 2022, 15:36 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Christian Hesse (eworm)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Some "*.gmo" file may be missing in the grub package.


Additional info:

I did "pacman -Syu" and grub was synchronised to grub 2:2.06.r322.gd9b4638c5-4 .

On reboot after running "grub-install" and "grub-mkconfig", the following flashes on the screen:

> Welcome to GRUB!
>
> error: file `/boot/grub/locale/C.gmo' not found.

Then, the system enters a reboot loop.

When I checked the directory /boot/grub/locale/ , I could see various "*.mo" files but no "C.gmo".

I use EFI for booting grub. I tried reinstalling grub a number of times without successfully generating the "C.gmo" file (my environment is set up all right).

As a workaround, I manually copied "/usr/share/locale/en_US/LC_MESSAGES/mit-krb5.mo" to "/boot/grub/locale/C.gmo" and grubs boots normally.

After checking with Arch forms, there may be files missing in the grub package.

Steps to Reproduce:

Install grub package and run grub-install and grub-mkconfig.
This task depends upon

Closed by  Christian Hesse (eworm)
Wednesday, 05 October 2022, 15:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  grub 2:2.06.r334.g340377470-1
Comment by Toolybird (Toolybird) - Sunday, 18 September 2022, 01:46 GMT
I've seen this mentioned a few times lately. It seems to be a harmless warning but we should probably get rid of it if possible. Someone who can reproduce should send a patch upstream. Here's some possibly relevant ref's [1][2]

[1] https://gitlab.alpinelinux.org/alpine/aports/-/issues/10816
[2] https://github.com/alpinelinux/aports/commit/29f0a4dc
Comment by lilikoi (lilikoi) - Monday, 19 September 2022, 13:05 GMT
Fix in ref [1] of Toolybird does not solve it for me..
Comment by Christian Hesse (eworm) - Monday, 19 September 2022, 13:34 GMT
What is LANG set on your system?
Comment by Christian Hesse (eworm) - Monday, 19 September 2022, 13:48 GMT
I guess you have LANG=C.UTF-8... After applying the change make sure to run `grub-mkconfig` again!
Comment by lilikoi (lilikoi) - Monday, 19 September 2022, 22:03 GMT
@Christian H. I tried setting `LANG=C' in "/etc/default/grub". I also set `export LANG=C' in my shell before running grub-install and grub-mkconfig, however "C.gmo" file is still not generated.

> root archhost:/home/me +$ echo $LANG
> en_US.UTF-8

I had $GRUB_FONT and $GRUB_THEME set. I unset those and set LANG=C in /etc/default/grub and still had no "C.gmo" file generated. I did not reboot my system yet for fear that file would be needed anyway.
Comment by Christian Hesse (eworm) - Tuesday, 20 September 2022, 06:52 GMT
No, this file is not generated. It is not supposed to be.
The scripts take the current locale, strip the ".UTF-8" and set that in `grub.cfg`. For locale "en_US.UTF-8" you should have a line reading "set lang=en_US" in your `/boot/grub/grub.cfg`. For locale "C" the line is not added at all, just a system locale "C.UTF-8" can cause this as far as I can tell. So anything is really borked on your system if your given info is true...
Comment by lilikoi (lilikoi) - Friday, 23 September 2022, 05:10 GMT
OK, thanks. I understand my system may be borked. I studied grub script commits a little, so I understand what you said in the previous comment. Thanks for your attention!

Cheers!
Comment by Christian Hesse (eworm) - Wednesday, 05 October 2022, 15:36 GMT
Should be impossible to generate a configuration that has set the locale to "C" with grub 2:2.06.r334.g340377470-1.

Loading...