bugGNU GRUB - Bugs: bug #37765, Error when an apostrophe is on...


You are not allowed to post comments on this tracker with your current authentication level.

bug #37765: Error when an apostrophe is on grub.cfg messages

Submitted by:  Ferran Rius Riu <ferri64>
Submitted on:  Sun 18 Nov 2012 11:29:58 AM UTC  
Category:  Booting Severity:  Major
Priority:  5 - Normal Item Group:  Non-software Error
Status:  Invalid Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release: 
Release:  other Reproducibility:  Every Time
Planned Release:  None

( Jump to the original submission)

Mon 24 Jun 2013 06:44:32 PM UTC, comment #9:

In r5043 (up to date Arch package) its still affecting.
On file 10_linux, if I change echo line in lines (140 and 147):

message="$(gettext_printf "Loading Linux %s ..." "${version}")"
sed "s/^/$submenu_indentation/" << EOF
echo '$message'

message="$(gettext_printf "Loading initial ramdisk ...")"
sed "s/^/$submenu_indentation/" << EOF
echo '$message'

To, with double quotes:

echo "$message"

Then, grub-mkconfig generates a running grub.cfg

Llorenç <siot>
Mon 21 Jan 2013 10:11:21 AM UTC, comment #8:

I'm pretty sure this was fixed in r4558, anyway.

Colin Watson <cjwatson>
Project Member
Mon 10 Dec 2012 04:50:38 PM UTC, comment #7:

The reporter failed to both supply the info and to test newer version. Since the described scenario works perfectly with bzr trunk, closing the bug. If you still exeprience the problem feel free to reopen supplying the needed info.

Vladimir Serbinenko <phcoder>
Project Administrator
Wed 21 Nov 2012 12:13:41 AM UTC, comment #6:

"if I use a comment with an apostrophe I get the same behaviour than in Arch"

How are you "using a comment"? Are you editing the grub.cfg manually? (if so, then you need to be taking care of escaping on your own)

In addition to attaching the problematic grub.cfg please be very clear about any modifications that you have done to grub-mkconfig (including any changes made in /etc/grub.d/ ) or any manual edits you have made to the grub.cfg after generating it with grub-mkconfig.

While you are not required to use grub-mkconfig, and can write your own grub.cfg manually if you prefer, at that point the responsibility for proper quoting and escaping is yours (follow basically the same quoting rules as you would in a bash script).

Jordan Uggla <jordanu>
Tue 20 Nov 2012 08:10:23 PM UTC, comment #5:

Have you rerun grub-mkconfig after GRUB update? Can you attach resulting grub.cfg?

Vladimir Serbinenko <phcoder>
Project Administrator
Tue 20 Nov 2012 05:21:43 PM UTC, comment #4:

I'm using grub-bios 2.00-1 from Archlinux x86_64 repositories. I've made a test in another computer using Ubuntu 12.10, and if I use a comment with an apostrophe I get the same behaviour than in Arch.
Sorry for having proposed the change in the strings, but changing this I changed from and unbootable system to a normal one; I know it's not a solution, just a workaround, but it works until the underlying problem is fixed.
Thanks for your commitment in this problem.

Ferran Rius Riu <ferri64>
Mon 19 Nov 2012 10:30:48 PM UTC, comment #3:

This is something that was fixed in 2.00. Could you try the official 2.00 release or latest bzr?

Vladimir Serbinenko <phcoder>
Project Administrator
Mon 19 Nov 2012 08:03:22 PM UTC, comment #2:

I submitted a patch for this in https://savannah.gnu.org/bugs/index.php?37776.

Andrei Borzenkov <arvidjaar>
Project Member
Mon 19 Nov 2012 01:42:05 AM UTC, comment #1:

Changing translated strings is definitely not the right solution. Please tell that to anyone who you have asked to change their strings, so that they don't.

While there were escaping problems in previous versions of grub, grub-mkconfig in grub 2.00 should be properly escaping all translated strings.

What version of grub are you using?

Jordan Uggla <jordanu>
Sun 18 Nov 2012 11:29:58 AM UTC, original submission:

If the messages in grub.cfg include an apostrophe you get a "Kernel must be loaded first" message. It's possible to boot the system using the grub command-line.
I see this problem using the Catalan localization, because the messages 'Loading linux kernel...' and 'Loading initial ramdisk' are translated as 'S'està carregant el nucli Linux..' and 'S'està carregant la ramdisk inicial...'.
The behavior appears because these messages are between apostrophe characters, and the additional apostrophe marks a premature message ending.
I use Archlinux 64-bit, but the problem should appear in any distribution using this localization if these grub.cfg messages are present.
The problem disappears with a manual grub.cfg edition; the closest way to correct it is to use a grave accent character "`" instead of the apostrophe, ie 'S`està carregant el nucli Linux..' and 'S`està carregant la ramdisk inicial...'. It's nearly impossible to see the difference with the "real" apostrophe because the messages only show for a very short time. It's possible also to rephrase the translation to avoid the apostrophe.
Until now I haven't seen problems with apostrophes included in other parts of the Catalan localization file.
I've already proposed changes in the Catalan translation in Launchpad, using the grave accent, to help avoiding this problem in the future.
As the apostrophe is a character used in many languages I think there should be a warning for translators to avoid apostrophes in the messages that will appear in grub.cfg.

Ferran Rius Riu <ferri64>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by siot (Posted a comment)
  • -email is unavailable- added by cjwatson (Posted a comment)
  • -email is unavailable- added by danielecocca
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by jordanu (Posted a comment)
  • -email is unavailable- added by ferri64 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-12-10 phcoder StatusNone => Invalid
        Open/ClosedOpen => Closed
    2012-12-07 danielecocca Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.3