Getting the most out of Grub


The grub bootloader is particularly useful, especially when upgrading and testing new kernels. I recently found a way to modifiy the default boot config to make it useful when you wish to remotely upgrade a kernel and boot into it once only without being at the console to change the default back.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Booting once only with grub

# grub
grub>savedefault --default=0 --once

If new kernel boots up without error, edit grub.conf to make the new kernel as the default.

grub savedefault

echo "savedefault --default=0 --once" | grub --batch