LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   grub-set-default ... get-default? (https://www.linuxquestions.org/questions/linux-general-1/grub-set-default-get-default-601473/)

RaduH 11-21-2007 11:04 AM

grub-set-default ... get-default?
 
Hi,

I understand grub-set-default but I was wondering how can I find the current default - the equivalent of the missing grub-get-default to tell me what was the default when I booted. I have two partitions and would like to be able to change the default to "the other" in a script. I could write that in a file and change the value each time I boot from the other partition but grub must have this value set somewhere so I can read it and then run grub-set-default with the other value. Where can I find this info? Any other solution/advice?

I forgot to mention, my menu.lst has the default entry like this:

default saved

And each boot option ends in savedefault, which makes the value not available for read.

Thanks!

forrestt 11-21-2007 01:05 PM

If I'm reading this correctly, you want to boot from option A, and when you reboot to automatically boot to option B by default, and then when you reboot again to automatically boot to option A by default, etc. If this is correct, edit your menu.lst and change the savedefault of the first entry to be "savedefault 1" and the savedefault of the second entry to be "savedefault 0".

HTH

Forrest


All times are GMT -5. The time now is 10:11 PM.