'\" te .\" Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. .TH installgrub 1M "18 Sep 2015" "SunOS 5.11" "System Administration Commands" .SH NAME installgrub \- install GRUB in a disk partition .SH SYNOPSIS .LP .nf \fB/usr/sbin/installgrub\fR [\fB-fm\fR] \fIstage1\fR \fIstage2\fR \fIraw-device\fR .fi .SH DESCRIPTION .sp .LP The \fBinstallgrub\fR command is an x86-only program. GRUB stands for GRand Unified Bootloader. \fBinstallgrub\fR 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 \fBbootadm\fR(1M) \fBinstall-bootloader\fR subcommand. .sp .LP \fBinstallgrub\fR installs GRUB Legacy stage 1 and stage 2 files on the boot area of a disk partition. If you specify the \fB-m\fR option, \fBinstallgrub\fR installs the stage 1 file onto first sector (the master boot sector [MBR]) of the disk. .SH OPTIONS .sp .LP The \fBinstallgrub\fR command accepts the following options: .sp .ne 2 .mk .na \fB\fB-f\fR\fR .ad .RS 6n .rt Suppresses interaction when overwriting the master boot sector. .RE .sp .ne 2 .mk .na \fB\fB-m\fR\fR .ad .RS 6n .rt Installs GRUB \fIstage1\fR on the master boot sector interactively. You must use this option if Solaris is installed on an extended partition. .RE .SH OPERANDS .sp .LP The \fBinstallgrub\fR command accepts the following operands: .sp .ne 2 .mk .na \fB\fIstage1\fR\fR .ad .RS 14n .rt The name of the GRUB stage 1 file. .RE .sp .ne 2 .mk .na \fB\fIstage2\fR\fR .ad .RS 14n .rt The name of the GRUB stage 2 file. .RE .sp .ne 2 .mk .na \fB\fIraw-device\fR\fR .ad .RS 14n .rt 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.) .RE .SH EXAMPLES .LP \fBExample 1 \fRInstalling GRUB on a Hard Disk Slice .sp .LP The following command installs GRUB on a system where the root slice is \fBc0d0s0\fR: .sp .in +2 .nf example# /usr/sbin/installgrub /boot/grub/stage1 \e /boot/grub/stage2 /dev/rdsk/c0d0s0 .fi .in -2 .SH FILES .sp .ne 2 .mk .na \fB\fB/boot/grub\fR\fR .ad .RS 14n .rt Directory where GRUB files reside. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityUncommitted .TE .SH SEE ALSO .sp .LP \fBboot\fR(1M), \fBbootadm\fR(1M), \fBfdisk\fR(1M), \fBfmthard\fR(1M), \fBkernel\fR(1M), \fBattributes\fR(5) .SH WARNINGS .sp .LP Installing GRUB on the master boot sector (\fB-m\fR option) overrides any boot manager currently installed on the machine. The system will always boot the GRUB in the Solaris partition regardless of which \fBfdisk\fR partition is active. .sp .LP Do \fBnot\fR use the \fBinstallgrub\fR 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 \fBafter\fR 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. If the system is using GRUB 2, then use the \fBbootadm install-bootloader\fR command to install the GRUB 2 bootloader. For more information, see the \fBbootadm\fR(1M) man page. .SH NOTES .sp .LP This command might be obselete and will be removed from a future release of Oracle Solaris.