SUSE Support

Here When You Need Us

Is there a temporary GRUB boot option to use only once?

This document (7010966) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10

Situation

Normally I want to have the server boot from the default GRUB menu, but there are times when I want to override this default setting only once without modifying the /boot/grub/menu.lst file. How do I boot to a GRUB menu title only once?

Resolution

Use the grubonce command supplied by the grub package. For example, consider the following /boot/grub/menu.lst file.

# cat /boot/grub/menu.lst

default 0
timeout 2
gfxmenu (hd0,0)/message

title SUSE Linux Enterprise Desktop 11 SP2 - 3.0.42-0.7
    root (hd0,0)
    kernel /vmlinuz-3.0.42-0.7-default root=/dev/disk/by-id/ata-ST3500630AS_9QG02WJ3-part3 resume=/dev/disk/by-id/ata-ST3500630AS_9QG02WJ3-part2 splash=native showopts vga=0x348
    initrd /initrd-3.0.42-0.7-default

title Failsafe -- SUSE Linux Enterprise Desktop 11 SP2 - 3.0.42-0.7
    root (hd0,0)
    kernel /vmlinuz-3.0.42-0.7-default root=/dev/disk/by-id/ata-ST3500630AS_9QG02WJ3-part3 showopts ide=nodma apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x348
    initrd /initrd-3.0.42-0.7-default

The server can boot from either of the two entries. The default is set to title number 0 "SUSE Linux Enterprise Desktop 11 SP2 - 3.0.42-0.7". However, you could select title number 1 "Failsafe -- SUSE Linux Enterprise Desktop 11 SP2 - 3.0.42-0.7" as well. Type grubonce to see the menu.lst titles from which you could boot.

# grubonce
0: SUSE Linux Enterprise Desktop 11 SP2 - 3.0.42-0.7
1: Failsafe -- SUSE Linux Enterprise Desktop 11 SP2 - 3.0.42-0.7

To override the default 0 title, run the following:

# grubonce 1
Using entry #1: Failsafe -- SUSE Linux Enterprise Desktop 11 SP2 - 3.0.42-0.7

Reboot the server. It will boot automatically to the Failsafe mode without any time delay. The GRUB default boot title will be restored after the reboot and will function as usual.

You could also add your own additional /boot/grub/menu.lst entry and select it to boot once. This is a helpful tool for unattended upgrades, booting remotely to a serial console configuration, and other scenarios.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7010966
  • Creation Date: 19-Oct-2012
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.