Grubb list menu

NoOp glgxg at
Wed Feb 10 00:38:42 UTC 2010

On 02/05/2010 02:57 PM, Rashkae wrote:
> Well, lot of ways, each with their own pro's and con's.
> The easy and quick way is to just go ahead edit grub.cfg file.  Yes, I 
> know, I've seen all the dire warnings about how this is bad and not 
> recommended.... wah wah wah.. in reality, all this means is that the 
> menu order will go right back to default next time a Kernel update is 
> performed.  As far as I'm concerned, this is a plus, since any screw ups 
> you make editing the grub.cfg file are just a grub-update away from 
> being fixed.
> The next way is to change the order that grub-update builds the file.
> The file is generated from a series of scripts (in /etc/grub.d).  They 
> are executed in order, so just rename 10_linux 20_memtest86+ 
> 30_os-prober  to 10_os-prober 20_linux 30_memtest.
> (osprober is the script that finds windows and adds it to the grub.cfg 
> file)  update-grub and your new menu should be arranged a little 
> differently.
> And finally, there's the screw this automatic crap, I'll do it myself 
> method.  Append the contents of your grub.cfg file to the 
> /etc/grub.d/40_custom file, then remove the executable permission from 
> all the other files in /etc/grub.d.    You can then edit the contents of 
> 40_custom to your heart's content, and when update-grub is called, it 
> will copy that file back into your grub.cfg file.  Big warning though, 
> new kernels will *not* be automatically added to grub for you, you'll 
> have to do that yourself, as well as fixing the menu entries yourself if 
> one of your drive UUID's is changed somehow.

> $ sudo update-grub
> Generating grub.cfg ...
> Found linux image: /boot/vmlinuz-2.6.31-19-generic
> Found initrd image: /boot/initrd.img-2.6.31-19-generic
> Found linux image: /boot/vmlinuz-2.6.31-18-generic
> Found initrd image: /boot/initrd.img-2.6.31-18-generic
> Found memtest86+ image: /boot/memtest86+.bin
> Found Windows 7 (loader) on /dev/sda1
> Found Windows Vista (loader) on /dev/sda2 <=== this
> Found Windows Vista (loader) on /dev/sda3 <=== and this
> done

I ended up commenting out (#) those last two entries. Of course tested
with 'sudo update-grub' and they came back (expected). Commented them
out again & life in the boot lane is much easier now. I'll wait to see
if the new kernal updates that seem to be appearing every few days (I'm
on -20 now) will change the commented out grub.cfg entries. I suspect it

The problem with the /etc/grub.d/40_custom (as far as I can tell) is
that the file is intended to _add_ entries, but not remove entries. So I
may still try your last suggestion.

Also, wrt my comments about grub2 being a PITA; I am referring to issue
like this whereby there are so many interacting files that it is
difficult to simply edit one file (as in 'menu.lst') and have the
preferences stick. I'm quite happy that grub2 picks up the 'Vista'
entries etc., but not happy that there doesn't (yet) seem to be a way to
refer to a 'master' grub2 menu file (outside of the generated grub.cfg)
that will allow commenting out those entries to stick.

More information about the ubuntu-users mailing list