selecting GRUB option for next reboot

Tez binary_y2k2 at blueyonder.co.uk
Fri Jan 5 02:44:15 GMT 2007


Felipe Figueiredo wrote:
> Em Friday 29 December 2006 10:32, Tez escreveu:
>   
>> You have to change the line "default 0" (or similar) to "default saved" 
>> for that to work.
>>     
>
>
> Ok, I changed, and now it works... sort of. I lost my default option with that 
> choice. 
>
> It now boots for the last booted option. Can't I have the best of two cases 
> (i.e., have a default boot option AND be able to choose an option for the 
> next reboot)?
>
> regards
> FF
>   
I'm not sure exactly, the option for the next boot is stored in a file 
(/boot/grub/default), that's how grub knows what to choose.
You can add the line "savedefault" to the end of the menu entry in 
menu.lst to make that option the default on next boot.
Or, you can also use the command 'grub-set-default' to set the default 
for the next reboot.

I suppose you could add that command to /etc/rc.local, so after boot it 
will be reset to whatever option you want to be default unless you 
choose another one before reboot.

So if you add:
grub-set-default 0
to /etc/rc.local, then after boot it will grub will be reset to choose 
the 1st menu item when you reboot. If you choose another option before 
reboot then that one will be chosen instead.

let me know if it works :-)

Tez





More information about the kubuntu-users mailing list