[SOLVED] Making changes in menu.lst from GRUB at boot time?
Can I make changes to /etc/boot/grub/menu.lst from the GRUB Menu that says 'Hi' to me when my machine boots up?
e.g. Linux is installed in (hd0,0) and windows in (hd0,5). The windows' one is set to default in /etc/boot/grub/menu.lst. Now when my machine boots up, I want my windows to boot up BUT I also want that the next time when I restart, Linux must boot up by default.
For doing so, can I make changes in /etc/boot/grub/menu.lst (setting default to linux) from the GRUB Menu before the Windows start booting?
Modifications required to grub menu.lst file
I wanted to know the distro because this affects which version of grub is used ...
Modified information below should do what you want ...
in summary you need to comment out hiddenmenu, change default to saved rather than 0, add savedefault entry to each menu entry so next boot uses other menu entry as default.
Let use know if it works for you :)
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
# Hides the menu by default (press ESC to see the menu)
# Pretty colours
color cyan/blue white/blue
## ## End Default Options ##
title Ubuntu 9.04, kernel 2.6.28-16-generic
kernel /boot/vmlinuz-2.6.28-16-generic root=UUID=bfd832e4-d1ac-4335-a6b2-31efcfd47be7 ro quiet splash
Ed: I suggest even after you get this to work the way you want you leave a time delay of 1 second, this allows you to break into the boot process if you need to after kernel updates etc ;)