'\" te .\" 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] .TH installgrub 1M "2 Jul 2009" "SunOS 5.11" "System Administration Commands" .SH NAME installgrub \- install GRUB in a disk partition or a floppy .SH SYNOPSIS .LP .nf \fB/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. .sp .LP \fBinstallgrub\fR installs GRUB 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 on the master boot sector 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.) For a floppy disk, it is \fB/dev/rdiskette\fR. .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# /sbin/installgrub /boot/grub/stage1 \e /boot/grub/stage2 /dev/rdsk/c0d0s0 .fi .in -2 .LP \fBExample 2 \fRInstalling GRUB on a Floppy .sp .LP The following command installs GRUB on a formatted floppy: .sp .in +2 .nf 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 .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 _ Interface StabilityUncommitted .TE .SH SEE ALSO .sp .LP \fBboot\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.