xtz Apprentice
Joined: 29 Oct 2007 Posts: 181 Location: Singapore
|
Posted: Sun Jan 19, 2014 2:11 pm Post subject: GRUB2 automatic fallback |
|
|
Couldn't find it in the forum or wiki
What I want to achieve is to automate the fallback process in GRUB2.
e.g. scenario:
- I have 1 kernels (no initrd)
- the 2 default menu entries in grub (1 + 1 recovery)
- I've I add a 3rd menu entry in /etc/grub.d/40_custom, which tries to boot a non-existent kernel. at the end I have 'set fallback=0', so it sets the fallback to the 1st menu entry
- GRUB_DEFAULT is set to the 3rd menu item (GRUB_DEFAULT=2)
Now, when the system tries to boot, it first tries the non-existent kernel and of course, errors with 'Press any key to continue...'.
When you press a key it tries the fallback entry, which of course works.
What I'm trying to avoid is pressing that button, e.g. automatically boot from the failback entry in case the default fails. |
|