Skip Navigation Links | |
Exit Print View | |
Booting and Shutting Down Oracle Solaris 11.1 Systems Oracle Solaris 11.1 Information Library |
1. Booting and Shutting Down a System (Overview)
2. x86: Administering the GRand Unified Bootloader (Tasks)
x86: Description of the GRUB 2 Configuration
x86: GRUB 2 Partition and Device Naming Scheme
x86: GRUB 2 and GRUB Legacy Task Comparison
x86: Upgrading Your GRUB Legacy System to a Release That Supports GRUB 2
x86: How to Upgrade Your GRUB Legacy System to a Release That Supports GRUB 2
x86: How GRUB Legacy Menu Entries Are Migrated to GRUB 2
x86: Maintaining GRUB 2 and GRUB Legacy Boot Environments on the Same System
x86: Administering the GRUB Configuration by Using the bootadm Command
x86: How to List GRUB Menu Entries
x86: How to Manually Regenerate the GRUB Menu
x86: How to Maintain the GRUB Menu
x86: How to Set Attributes for a Specified Boot Entry in the GRUB Menu
x86: How to Add a Boot Entry to the GRUB Menu
x86: How to Remove a Boot Entry From the GRUB Menu
x86: Adding Kernel Arguments by Editing the GRUB Menu at Boot Time
x86: Adding -B prop=val Kernel Arguments at Boot Time by Editing the GRUB Menu
Redirecting the Oracle Solaris Console at Boot Time
x86: Advanced GRUB Administration and Troubleshooting
x86: Installing GRUB 2 by Using the bootadm install-bootloader Command
x86: How to Install the Boot Loader
x86: How to Install the Boot Loader After Restoring a Root Pool
x86: How to Install GRUB in a Location Other Than the Default Location
x86: Installing GRUB Legacy on a System That Has GRUB 2 Installed
x86: How to Install GRUB Legacy on a System That Has GRUB 2 Installed
3. Shutting Down a System (Tasks)
5. Booting a System From the Network (Tasks)
The grub.cfg file contains most of the GRUB configuration. An additional, editable file named custom.cfg can be used if you want to add more complex constructs, for example, menu entries or other scripting, to the GRUB configuration. This file does not exist on the system by default. You must create the file, and it must reside in the same location as the grub.cfg and menu.conf files, which is in /pool-name/boot/grub/.
GRUB processes the commands and any customizations that are in the custom.cfg file through the following code that is located at the end of the grub.cfg file:
if [ -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi
These instructions direct GRUB to check for the existence of a custom.cfg file in the top-level dataset of the root pool, in the boot/grub subdirectory. If a custom.cfg file exists, GRUB sources the file and processes any commands that are in the file, as if the contents were textually inserted in the grub.cfg file.
On a system with 64-bit UEFI firmware, entries in this file might look like the following:
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 look like the following:
menuentry "Windows" { insmod chain set root=(hd0,msdos1) chainloader --force +1 }