man pages section 1M: System Administration Commands

Exit Print View

Updated: July 2014
 
 

installgrub(1M)

Name

installgrub - install GRUB in a disk partition

Synopsis

/usr/sbin/installgrub [-fm] stage1 stage2 raw-device

Description

The installgrub command is an x86–only program. GRUB stands for GRand Unified Bootloader. installgrub is deprecated, as it applies to the GRUB Legacy boot loader, which was the boot loader present in Oracle Solaris 11 11/11 and earlier revisions. To install the boot loader, see the bootadm(1M) install-bootloader subcommand.

installgrub installs GRUB Legacy stage 1 and stage 2 files on the boot area of a disk partition. If you specify the –m option, installgrub installs the stage 1 file onto first sector (the master boot sector [MBR]) of the disk.

Options

The installgrub command accepts the following options:

–f

Suppresses interaction when overwriting the master boot sector.

–m

Installs GRUB stage1 on the master boot sector interactively. You must use this option if Solaris is installed on an extended partition.

Operands

The installgrub command accepts the following operands:

stage1

The name of the GRUB stage 1 file.

stage2

The name of the GRUB stage 2 file.

raw-device

The name of the device onto which GRUB code is to be installed. It must be a character device that is readable and writable. For disk devices, specify the slice where the GRUB menu file is located. (For Solaris it is the root slice.)

Examples

Example 1 Installing GRUB on a Hard Disk Slice

The following command installs GRUB on a system where the root slice is c0d0s0:

example# /usr/sbin/installgrub /boot/grub/stage1 \
         /boot/grub/stage2 /dev/rdsk/c0d0s0

Files

/boot/grub

Directory where GRUB files reside.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/core-os
Interface Stability
Uncommitted

See also

boot(1M), bootadm(1M), fdisk(1M), fmthard(1M), kernel(1M), attributes(5)

Warnings

Installing GRUB on the master boot sector (–m option) overrides any boot manager currently installed on the machine. The system will always boot the GRUB in the Solaris partition regardless of which fdisk partition is active.

Do not use the installgrub command to install the boot loader on systems that have GRUB 2 installed, otherwise you can render the system unbootable. GRUB Legacy should be reinstalled with the installgrub command only after you have verified that the version of GRUB Legacy you are installing supports the ZFS pool version of your ZFS root pool, and that you no longer have any Solaris boot environments present that use GRUB2 as their boot loader.