--- grub/stage2/stage2.c Fri Feb 2 15:18:19 2001 +++ grub/stage2/stage2.c Mon Feb 26 17:25:50 2001 @@ -958,9 +958,12 @@ menu_entries = config_entries + config_len; /* Check if the default entry is present. Otherwise reset - DEFAULT_ENTRY. */ - if (default_entry >= num_entries) - default_entry = 0; + it to fallback if fallback is valid, or to DEFAULT_ENTRY + if not. */ + if (default_entry >= num_entries) + default_entry = ((fallback_entry < 0) + || (fallback_entry >= num_entries)) ? + 0 : fallback_entry; if (is_preset) close_preset_menu ();