Grubb list menu

Tom H tomh0665 at gmail.com
Fri Feb 5 23:25:35 UTC 2010


> 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.

(1) If you edit grub.cfg, make sure that you back it up because it
will be overwritten by update-grub at the next kernel upgrade.

(2) Renumbering the /etc/grub.d scripts is probably the safest way to
change the order of the grub menu entries.

(3) Adding entries with 40_custom will not prevent update-grub from
adding new kernels to the grub menu unless you run
chmod 644 10_linux and 30_os-prober




More information about the ubuntu-users mailing list