bugGNU GRUB - Bugs: bug #29668, Long lines with all boot...

 
 

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

bug #29668: Long lines with all boot parameters in grub.cfg

Submitted by:  Alain SAURAT <maisondouf>
Submitted on:  Sun 25 Apr 2010 09:04:55 PM UTC  
 
Category: ConfigurationSeverity: Major
Priority: 5 - NormalItem Group: Action Request
Status: InvalidPrivacy: Public
Assigned to: NoneOriginator Name: Maisondouf
Open/Closed: ClosedRelease: 
Release: 1.98Reproducibility: Every Time
Planned Release: None

Fri 30 Apr 2010 07:26:13 AM UTC, comment #1:

Part --class ubuntu --class gnu-linux --class gnu --class os is useful. If it causes any bug in os-prober please report it to debian-installer team

Vladimir Serbinenko <phcoder>
Project Administrator
Sun 25 Apr 2010 09:04:55 PM UTC, original submission:

Recently I have seen this kind of line in grub.cfg:
menuentry 'Ubuntu, avec Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {

It seem to be due to the script "/usr/lib/linux-boot-probe/mounted/40grub2"

# The double-quoted string is the title.
title="$(echo $@ | sed 's/."\(.\)".*/\1/' | sed 's/://g')"

In fact this line work to isolate the final text of the 'menuentry' but search for a double-quoted string

I try to correct this with adding a few lines in it just after.


# or in fact simple-quoted string ....
prime=${title:0:1}
if [ "$prime" = "'" ]; then
title="$(echo $@ | sed "s/.'\(.\)'.*/\1/" | sed 's/://g')"
fi
------

I test if the result begin with a simple-quote, and if yes I reverse the 'sed' argument to isolate a simple-quoted string

So, the line in grub.cfg become :

menuentry "Ubuntu, avec Linux 2.6.32-21-generic" {

pay attention, I was obliged to use 'bash' instead of 'sh' for character test.
Perhaps an equal solution can be found with 'sh'

Thanks, Alain

Alain SAURAT <maisondouf>

 

Attached Files
file #20332:  40grub2 added by maisondouf (2KiB - application/octet-stream - 40grub2 but with a lot of echo for debuging)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by maisondouf (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 30 Apr 2010 07:26:13 AM UTCphcoderOpen/ClosedOpen=>Closed
    Fri 30 Apr 2010 07:26:12 AM UTCphcoderStatusNone=>Invalid
    Sun 25 Apr 2010 09:04:55 PM UTCmaisondoufAttached File-=>Added 40grub2, #20332

    Back to the top


    Powered by Savane 3.1-cleanup1