Ugly GRUB menu entries

Dane Mutters dmutters at
Wed Jan 18 21:30:57 UTC 2012

Also, on my system (as well as many others), I end up with 2 lines for
Windows 7 (or Vista, when I was using that)--only one of which boots.  One
is the system partition; one is the main partition.  Fixing this by hand
wouldn't be such a big deal if one didn't have to write part of a shell
script to do it, though manually editing a config file isn't exactly
"user-friendly" in any case.  I'm sure everybody from the GRUB team has
seen this before, but I wonder if this could be incorporated as a graphical
selection option--perhaps show the user a preview of the menu, then allow
them to say "there are two entries; remove this one..."  Also, a check box
to remove "(loader)" might be nice.

<from /etc/grub.d/30_os-prober>

# Added to remove "(loader)" from Windows 7 entry
  if [ "$LONGNAME" = "Windows 7 (loader)" ] && [ "${DEVICE}" = "/dev/sdb1" ]
      then LONGNAME="Windows 7"

# Added to remove duplicate Windows 7 entry
  if [ "${DEVICE}" = "/dev/sdb2" ]; then

These lines remove "(loader)", as well as the duplicate entry.

Obviously, /dev/sdb1 won't be the correct device for all users, but I'm
thinking that if the GRUB menu noted which partition each Windows entry
went to, and kept a log in the Linux partition of which was last used, then
the user could be shown which one he/she used last, and choose which one to
remove, based on that.

Since this fix is well beyond the ability of a casual user (and required
me--who knows a fair bit of BASH--some time and Googling to figure
out--especially since it's not obvious where to put this stuff), it would
be really nice to make these lines into "check box" options after showing
the user a preview of the menu.  Since the user likely won't know which
entry is the correct one until he/she tries to boot it, it would be best to
show this after a reboot (when the installation is done), and allow the
user to choose "show this dialog at next boot," or "don't show this dialog
at next boot"--with the option to access the menu elsewhere if he/she
chooses the latter.  This way, the user can deal with the problem as
he/she's ready to do so, without (1) being unable to find where to fix this
after the first boot; and (2) being annoyed that the dialog pops up at
every boot, after the user has decided to do nothing at all about it.

I'm no programmer, and have never written a blueprint or similar before
(and am wary about being told-off for doing it badly), so if anybody feels
up to formatting this in a pleasing way and posting it wherever such is
appropriate, I would be very grateful.  :-)  I think that this (if
implemented) would remove some of the ire I've noticed on the 'net about
the difficult-to-configure nature of GRUB2--at least where Windows Vista/7
entries are concerned.  (Please note that it's not my intention to bash on
GRUB2; I just notice that some things are pretty confusing to those of us
who don't know its intricacies.)

Anyway, I hope this email proves useful to somebody.  Have a nice day.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Ubuntu-devel-discuss mailing list