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.
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.
$ bootadm list-menu
$ bootadm add-entry -P pool -i [entry-number] entry-title
$ 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.
$ bootadm list-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
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.
$ bootadm list-menu
$ bootadm remove-entry [-P pool] [{entry-title [,entry-title...] | -i entry-number[,entry-number...]}
$ bootadm list-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