grub.cfg gets larger and larger when menu entries are generated in another language
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-prober (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The script in 40grub2 has some code to skip certain entries from grub.cfg. It goes like this:
elif echo "$title" | grep -q '(on /dev/[^)]*)$'; then
log "Skipping entry '$title':"
log "appears to be an automatic reference taken from another menu.lst"
(( Notice the "on" ))
However, if the grub.cfg was created on a system with a non standard LANG the grep does not find the match. This is particular nasty on a system with one boot partition and a few Linux root partitions. The end result of update-grub is a bigger grub.cfg after each run. It gets bigger and bigger. Also update-grub takes longer and longer to finish.
Here is an example of a menuentry on my system
menuentry 'Ubuntu 11.04 (11.04) (op /dev/mapper/
Here is a session with running update-grub twice in a row.
root@rockie:~# echo $LANG
nl_NL.UTF-8
root@rockie:~# grep menuentry /boot/grub/
34
root@rockie:~# update-grub
Aanmaken van 'grub.cfg'...
Linux-afbeelding is gevonden: /boot/vmlinuz-
Initrd-image gevonden: /boot/initrd.
Found memtest86+ image: /memtest86+.bin
Ubuntu 10.04.2 LTS (10.04) is gevonden op /dev/sda2
Ubuntu 11.04 (11.04) is gevonden op /dev/mapper/
Ubuntu 10.04.1 LTS (10.04) is gevonden op /dev/mapper/
voltooid
root@rockie:~# grep menuentry /boot/grub/
88
summary: |
- 40grub2 gets confused for menuentry generated in other languages + grub.cfg gets larger and larger when menu entries are generated in + another language |
Status changed to 'Confirmed' because the bug affects multiple users.