[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#624815: os-prober produces garbage when menu.lst has titles containing asterisks ("*")

Package: os-prober
Version: 1.42

I have a partition with a menu.lst file containing the following line:

    title * Lenny2 Debian 5.0.5, 2.6.26-2-amd64 on /dev/disk/by-label/root

When running update-grub, this produces a very long garbage entry in grub.cfg:

    menuentry "bin boot cdrom dev etc home [etc.] Lenny2 [the rest of the title] (on /dev/sdb2)" {

The asterisk was expanded to the content of the directory I happened to be in when running update-grub.

update-grub runs /etc/grub.d/30_os-prober, which runs linux-boot-prober, which runs /usr/lib/linux-boot-probes/mounted/40grub.

The problem comes from line 39 of /usr/lib/linux-boot-probes/mounted/40grub, which is

    set -- $line

At that point, the $line variable containing the title line with the asterisk is expanded, and $2 is the first file in the current directory, $3 the next, etc.

I'm not sure what the best solution would be, but the resulting grub2 menu looks really weird, and it was quite time-consuming to find what was causing it.

Fortunately, I had no title in menu.lst with entries like $(rm -rf) ...

Reply to: