summaryrefslogtreecommitdiff
path: root/usr/src/man/man1m/installgrub.1m
blob: b6d64978dbb5cdd8b2e455bab72b41a92d56e39e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
'\" te
.\" 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]
.TH INSTALLGRUB 1M "Jan 14, 2015"
.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
.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
.LP
The \fBinstallgrub\fR command accepts the following options:
.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.RS 6n
Suppresses interaction when overwriting the master boot sector.
.RE

.sp
.ne 2
.na
\fB\fB-m\fR\fR
.ad
.RS 6n
Installs GRUB \fIstage1\fR on the master boot sector interactively. You must
use this option if Solaris is installed on an extended FDISK or an EFI/GPT
partition.
.RE

.SH OPERANDS
.LP
The \fBinstallgrub\fR command accepts the following operands:
.sp
.ne 2
.na
\fB\fIstage1\fR\fR
.ad
.RS 14n
The name of the GRUB stage 1 file.
.RE

.sp
.ne 2
.na
\fB\fIstage2\fR\fR
.ad
.RS 14n
The name of the GRUB stage 2 file.
.RE

.sp
.ne 2
.na
\fB\fIraw-device\fR\fR
.ad
.RS 14n
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
.ne 2
.na
\fB\fB/boot/grub\fR\fR
.ad
.RS 14n
Directory where GRUB files reside.
.RE

.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Uncommitted
.TE

.SH SEE ALSO
.LP
\fBboot\fR(1M), \fBfdisk\fR(1M), \fBfmthard\fR(1M), \fBkernel\fR(1M),
\fBattributes\fR(5)
.SH WARNINGS
.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.