Go to main content

Booting and Shutting Down Oracle® Solaris 11.4 Systems

Exit Print View

Updated: August 2018
 
 

Adding and Removing Menu Entries

You can expand or reduce the GRUB menu on a system by adding or removing entries. Adding an entry assumes that the entry's OS instance is installed on the system.

How to Add a Boot Entry to the GRUB Menu

The add-entry subcommand creates a new entry to the GRUB menu. If you specify an entry number greater than the total entries, the new entry is added at the end of the list. Otherwise, it is inserted at the specified position in the menu.

Before You Begin

Ensure that your role has the appropriate rights profiles to perform this procedure. See Using Rights Profiles to Administer Boot Features.

  1. (Optional) List the current menu entries.
    $ bootadm list-menu
  2. Add the new entry.
    $ bootadm add-entry -P pool -i [entry-number] entry-title
  3. Set the bootfs property for the newly added entry.
    $ bootadm change-entry -i new-entry-number bootfs='pool-name/ROOT/be-name'

    This step ensures that the new entry does not use the default bootfs value that is set for the root pool.

  4. 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 7  Adding a Linux 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 45
0 Oracle Solaris 11/11
1 Oracle Solaris 11-backup1
2 Oracle Solaris 11.4

$ bootadm add-entry -i 3 Oracle Linux
$ bootadm change-entry -i 3 bootfs='rpool/ROOT/test'
$ bootadm list-menu
The location of the boot loader configuration file is /rpool/boot/grub
default 2
console graphics
timeout 45
0 Oracle Solaris 11/11
1 Oracle Solaris 11-backup1
2 Oracle Solaris 11.4
3 Oracle Linux

$ bootadm list-menu -i 3
The location of the boot loader configuration files is: /rpool/boot/grub
title: Oracle Linux
kernel: /platform/i86pc/kernel/amd64/unix
kernel arguments: -B $ZFS-BOOTFS
boot archive: /platform/i86pc/amd64/boot_archive
ZFS root pool: rpool
bootfs: /rpool/ROOT/test

How to Remove a Boot Entry From the GRUB Menu

The remove-entry subcommand removes an entry, or a comma-separated list of entries, from the menu. If you specify multiple entries with the same title, all of the entries with that title are removed.

Before You Begin

Ensure that your role has the appropriate rights profiles to perform this procedure. See Using Rights Profiles to Administer Boot Features.

  1. (Optional) List the current boot entries.
    $ bootadm list-menu
  2. Remove the specified entry from the GRUB menu.
    $ bootadm remove-entry [-P pool] [{entry-title [,entry-title...] |
    -i entry-number[,entry-number...]}
  3. Verify that the entry has been removed.
    $ bootadm list-menu

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

The following example shows the removal of entry number 2 from the GRUB menu.

$ bootadm list-menu
The location of the boot loader configuration file is /rpool/boot/grub
default 2
console graphics
timeout 45
0 Oracle Solaris 11/11
1 Oracle Solaris 11-backup1
2 Oracle Solaris 11.4
3 Oracle Linux

bootadm remove-entry -i 0
1 entry removed
$ bootadm list-menu
The location of the boot loader configuration file is /rpool/boot/grub
default 2
console graphics
timeout 45
1 Oracle Solaris 11-backup1
2 Oracle Solaris 11.4
3 Oracle Linux