Bug#905084: grub-common: Generates grub config with unusable "lang"

Christopher David Howie me at chrishowie.com
Tue Jul 31 07:07:29 BST 2018


Package: grub-common
Version: 2.02~beta3-5

Context: My system has two bootable disks, each with a GPT label and two
partitions: 1 is a BIOS boot partition, and 2 is a dmraid raid1.

The raid device is an LVM PV.  Within that lies the root volume.

I mention this because it may be revelant; none of my other Debian
systems have this problem, and this configuration is the most unique
across my systems.

tl;dr: update-grub generates a grub.cfg with "set lang=en_US" which grub
itself apparently does not like, as I get dropped to a grub shell when
this line is present.  "set lang=C" works fine.

Running update-grub from within the system itself causes the "set
lang=en_US" line to be present, which means installing a new kernel
package will cause the machine not to come back up after rebooting.

Running update-grub from the installer CD in rescue mode while chrooted
into the system creates an identical grub.cfg, with the exception of
this one line, which is instead "set lang=C".  This works and the system
will boot.

I debated whether to file this bug against grub-common or grub2-common;
I chose the former because it contains /etc/grub.d/00_header, which is
where this line comes from.

I note that there is no en_US.mo in /boot/grub/locale, which is
ostensibly the reason grub will not boot.

It seems like 00_header and/or update-grub should check if
/boot/grub/locale/{$grub_lang}.mo exists, attempt to install it if it
does not, and fall back on the C locale if this can't be done.

(As an aside, it's strange to me that grub chooses to fall on its face
when it can't load a locale file instead of spitting a warning and
continuing with the built-in C locale.  I can't imagine a scenario where
it would be beneficial for the bootloader to halt when it can't load a
translation that, assuming the boot process is successful, will only be
seen for a few seconds.  It seems a bit like a car refusing to start
because the paint is the wrong color.)

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers

If you correspond with me on a regular basis, please read this document:
http://www.chrishowie.com/email-preferences/

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5

------------------------------------------------------------------------
                    IMPORTANT INFORMATION/DISCLAIMER

This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.



More information about the Pkg-grub-devel mailing list