Go to main content

Booting and Shutting Down Oracle® Solaris 11.3 Systems

Exit Print View

Updated: October 2017
 
 

x86: How to Add a Boot Entry to the GRUB Menu

Use the add-entry subcommand of the bootadm command to add a new entry to the GRUB menu with the specified entry title. If you specify an entry number, the new entry is inserted at the given position in the GRUB menu. Or, if the entry number is higher than the current number of entries in the menu, the entry is then added as the last entry in the menu.

  1. Assume the root role.

    See Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.

  2. (Optional) List the current boot entries in the GRUB menu.
    # bootadm list-menu
  3. Add the new boot entry to the GRUB menu.
    # bootadm add-entry -P pool -i [entry-number] entry-title
  4. Set the bootfs property for the newly added entry as follows:
    # bootadm change-entry -i new-entry-number bootfs='pool-name/ROOT/be-name'

    This step ensures that the newly added boot entry does not use the default bootfs value that is set in the root pool, which is specified in the bootfs pool-level property.

  5. Verify that the boot entry was added.
    # bootadm list-menu

    Note -  If you do not see your changes, check the grub.cfg file to verify that the change was made.
Example 10  x86: Adding a Boot Entry to the GRUB Menu

The following example shows how to add a menu entry to the GRUB menu by using the bootadm add-entry command. In this example, entry number 2 is added.

# bootadm list-menu
The location of the boot loader configuration file is /rpool/boot/grub
default 2
console graphics
timeout 30
0 Oracle Solaris 11/11
1 Oracle Solaris 11.3
# bootadm add-entry -i 2  Oracle Solaris 11_test
# bootadm change-entry -i 2 bootfs='rpool/ROOT/test'
# bootadm list-menu
The location of the boot loader configuration file is /rpool/boot/grub
default 2
console graphics
timeout 30
0 Oracle Solaris 11/11
1 Oracle Solaris 11.3
2 Oracle Solaris 11_test

View the contents of the new menu entry by specifying the entry number, as follows:

# bootadm list-menu -i 2
     the location of the boot loader configuration files is: /rpool/boot/grub
     title: Oracle Solaris 11_test
     kernel: /platform/i86pc/kernel/amd64/unix
     kernel arguments: -B $ZFS-BOOTFS
     boot archive: /platform/i86pc/amd64/boot_archive
     ZFS root pool: rpool