|Skip Navigation Links|
|Exit Print View|
|Booting and Shutting Down Oracle Solaris 11.1 Systems Oracle Solaris 11.1 Information Library|
The following information is provided in this section:
If the GRUB 2 boot loader becomes corrupted, and the system can no longer boot, you might be required to boot from media and manually reinstall the boot loader. To reinstall the boot loader, you must boot from the Oracle Solaris installation media (for example, by using the text installer ISO image) and get to a command prompt.
You must import the root pool before you can reinstall GRUB 2. The following procedure describes the steps to follow.
# zpool import -f pool-name
# bootadm install-bootloader [-f] -P pool-name
Forces the installation of the boot loader an bypasses any versioning checks for not downgrading the version of the boot loader on the system.
Note - Do not used the -f option unless you are sure that you want to overwrite the boot loader with the version that is on the media.
Specifies the boot configuration for the pool to be used
# zpool export pool-name
Before You Begin
Check that you are running the latest version of Oracle Solaris that is installed in the set of boot environments that is present in your backup. Making sure that you are running the latest version of Oracle Solaris that is installed in the set of boot environments that is present in your backup ensures that you can successfully install the boot loader by using the bootadm install-bootloader command, without requiring the use of the -f option.
Then, restore the root pool. See Chapter 11, Archiving Snapshots and Root Pool Recovery, in Oracle Solaris 11.1 Administration: ZFS File Systems.
# bootadm install-bootloader -P poolname
If you are not running the latest version of Oracle Solaris that is installed in the set of boot environments that is present in your backup, a restored rpool might fail to boot after running the bootadm install-bootloader command. In this instance, try running the following command as an alternative:
# beadm activate -p poolname BEname
where BEname is the boot environment that contains the latest version of Oracle Solaris. Running this command will install the latest boot loader files.
This alternate method also installs the boot loader, but the installation is a side-effect of using the boot loader files from the boot environment, not from the running system. This workaround should be used when you are performing a restore from an older Oracle Solaris version.
On systems with BIOS firmware, sometimes it is necessary or desirable to install GRUB 2 into the master boot record. The following procedure describes how to do so. After the installation, GRUB 2 is then the default system boot loader, regardless of which DOS partition is marked as the active partition. When DOS partitioning is used on systems with BIOS firmware, and the Solaris partition is a primary partition, the default GRUB 2 installation location is the partition boot record. If the partition is a logical partition, GRUB 2 is always installed in the MBR.
# bootadm install-bootloader -M
Because the system does not automatically reinstall the GRUB Legacy boot loader when you destroy the last GRUB 2 boot environment, if you want to reinstall the GRUB Legacy boot loader, you must first boot to the latest boot environment that includes the GRUB Legacy boot loader files (in /boot/grub/stage1 and /boot/grub/stage2).
The installgrub command is deprecated in this release and should only be used if you are running a release that supports the GRUB Legacy boot loader. See installgrub(1M).
The following procedure applies if you have upgraded your system from a release that supports GRUB Legacy to Oracle Solaris 11.1.
If you decide to revert your system to the older GRUB Legacy boot loader, use the following procedure.
Caution - Be sure to perform these steps from the boot environment that contains the Oracle Solaris release or a Support Repository Update (SRU) that you used to update to Oracle Solaris 11.1. Additionally, if you have upgraded the ZFS pool's capabilities by using the zpool upgrade command past version 33, you will not be able to downgrade to GRUB Legacy or complete Step 2 of this procedure. Forcibly downgrading to GRUB Legacy after the root pool has been upgraded past version 33 results in an unbootable system.
Performing this step ensures that you do not accidentally activate and install GRUB 2, as activating any boot environments that include the Oracle Solaris 11.1 release will replace the Legacy GRUB boot loader with GRUB 2.
# bootadm install-bootloader -f
Note - You do not need to reboot after these steps. On the next full reboot, the GRUB Legacy boot loader will execute.