grub2 approach can make system unusable if shit happens
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: grub2
On my Samsung netbook there is a recovery tool which will try to bring the system into it's
factory state. Unfortunately it will erase your master boot record when you boot it.
The grub2 / ubuntu approach of automatically modifying the configuration and not automatically correcting
the default entry might lead to a situation where the recovery tool will automatically be booted against what the user expect. It happened to me recently when a new kernel was installed. I got two new boot entries and the default entry suddenly pointed to the recovery tools boot entry in the menu.
I think grub2 should be modified to have an option to work in grub 1 mode with fixed menu entries.
grub2 is too unsafe to work with if it does bad things like described above.
GRUB 2 has the option already; you just weren't using it. :-) Set GRUB_DEFAULT to the *name* of a menu entry rather than its number.
I would rather not change the behaviour of numbers in GRUB_DEFAULT, because (a) it's very messy to have something automatically modifying a configuration file in /etc and (b) the current behaviour may well be useful. Names are the documented way to do this:
`GRUB_DEFAULT'
The default menu entry. This may be a number, in which case it
identifies the Nth entry in the generated menu counted from zero,
or the full name of a menu entry, or the special string `saved'.
Using the full name may be useful if you want to set a menu entry
as the default even though there may be a variable number of
entries before it.
If you set this to `saved', then the default menu entry will be
that saved by `GRUB_SAVEDEFAULT', `grub-set-default', or
`grub-reboot'.
The default is `0'.