Copyright 2015 Nexenta Systems Inc.
Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
/sbin/installgrub [-fm] stage1 stage2 raw-device
The installgrub command is an x86-only program. GRUB stands for GRand Unified Bootloader.
installgrub installs GRUB 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 on the master boot sector of the disk.
The installgrub command accepts the following options: -f
Suppresses interaction when overwriting the master boot sector.
Installs GRUB stage1 on the master boot sector interactively. You must use this option if Solaris is installed on an extended FDISK or an EFI/GPT partition.
The installgrub command accepts the following operands: stage1
The name of the GRUB stage 1 file.
The name of the GRUB stage 2 file.
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.) For a floppy disk, it is /dev/rdiskette.
Example 1 Installing GRUB on a Hard Disk Slice
The following command installs GRUB on a system where the root slice is c0d0s0:
example# /sbin/installgrub /boot/grub/stage1 \e /boot/grub/stage2 /dev/rdsk/c0d0s0
Example 2 Installing GRUB on a Floppy
The following command installs GRUB on a formatted floppy:
example# mount -F pcfs /dev/diskette /mnt # mkdir -p /mnt/boot/grub # cp /boot/grub/* /mnt/boot/grub # umount /mnt # cd /boot/grub # /sbin/installgrub stage1 stage2 /dev/rdiskette
Directory where GRUB files reside.
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Uncommitted |
attributes (7), boot (8), fdisk (8), fmthard (8), kernel (8)
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.