Transitioning From Oracle® Solaris 10 to Oracle Solaris 11.2

Exit Print View

Updated: December 2014
 
 

x86: Adding Custom Entries to the GRUB Menu After an Installation

Starting with Oracle Solaris 11.1, GRUB 2 is the default boot loader on x86 platforms. GRUB 2 uses a different configuration file (grub.cfg) than the menu.lst file that is used by GRUB Legacy. The grub.cfg file contains most of the GRUB configuration, including all Oracle Solaris menu entries. Unlike the menu.lst file, you manage the grub.cfg file solely by using the bootadm command. Do not directly edit this file.

Also, the grub.cfg file does not contain any custom menu entries. For custom menu entries, there is an additional configuration file (custom.cfg) that you can use. Before adding custom menu entries to the custom.cfg first, you first have to create the file and then store it in the same location as the grub.cfg and menu.conf files (/pool-name/boot/grub/) are stored.

During the boot process, GRUB checks for the existence of a custom.cfg file in the top-level dataset of the root pool, in the boot/grub subdirectory. If the file exists, GRUB sources the file and then processes any commands within the file as though the contents were textually inserted in the main grub.cfg file.

For example, on a system with 64-bit UEFI firmware, custom.cfg file entries might appear as follows:

menuentry "Windows (64-bit UEFI)" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root cafe-f4ee
chainloader /efi/Microsoft/Boot/bootmgfw.efi
}

On a system with BIOS firmware, entries in this file might appear as follows:

menuentry "Windows" {
insmod chain
set root=(hd0,msdos1)
chainloader --force +1
}

See Customizing the GRUB Configuration in Booting and Shutting Down Oracle Solaris 11.2 Systems .