]> code.delx.au - refind/blob - docs/man/refind-mkdefault.8
Added refind-mkdefault script to reset rEFInd as the default boot
[refind] / docs / man / refind-mkdefault.8
1 .\" Copyright 2016 Roderick W. Smith (rodsmith@rodsbooks.com)
2 .\" May be distributed under the GNU Free Documentation License version 1.3 or
3 any later version
4 .TH "REFIND-MKDEFAULT" "8" "0.10.3" "Roderick W. Smith" "rEFInd Manual"
5 .SH "NAME"
6 refind-mkdefault \- Set rEFInd as the default EFI boot option
7 .SH "SYNOPSIS"
8 .BI "refind-mkdefault "
9 [ \-L|\-\-label <name> ]
10
11 .SH "DESCRIPTION"
12
13 EFI booting normally relies on boot manager entries stored in NVRAM, which
14 describe the locations of EFI boot programs and the order in which the
15 firmware will attempt to launch them. In Linux, these entries can be
16 created, deleted, and manipulated with the \fIefibootmgr\fR utility.
17
18 Many OSes and Linux packages assume that they should control the boot
19 process, and so both create NVRAM boot entries for themselves and set these
20 entries first in the boot order. If you intend rEFInd to control the boot
21 process, though, such changes are undesirable and require adjustment via
22 \fIefibootmgr\fR. Such adjustments are annoying to make and can be
23 intimidating to non-experts.
24
25 The \fIrefind-mkdefault\fR script simplifies matters: Running this script
26 with no options sets rEFInd as the default boot program. The details of what
27 the script does depends on the current state of the boot order list and
28 existing boot entries:
29
30 .TP
31 .B *
32 If a rEFInd entry already exists in the boot order and is already first
33 in the list, no changes are made.
34
35 .TP
36 .B *
37 If a rEFInd entry already exists in the boot order but is not first in
38 the list, that entry is moved to the first position in the boot order.
39
40 .TP
41 .B *
42 If more than one rEFInd entry exists in the boot order,
43 \fIrefind-mkdefault\fR moves the one that comes earliest to the front of the
44 boot order list.
45
46 .TP
47 .B *
48 If no rEFInd entry exists in the boot order but a rEFInd boot entry
49 can be found in the list of \fBBoot####\fR entries, it is added to the boot
50 order and placed at the front of the list.
51
52 .TP
53 .B *
54 If multiple rEFInd boot entries exist but none is in the boot order, all the
55 entries are added to the boot order, but which one is first is uncontrolled.
56
57 .PP
58
59 A rEFInd entry is defined as one that contains the string \fBrefind\fR
60 (case-insensitive). This string could exist in the description or in the
61 filename. The string used to define the rEFInd entry can be changed via the
62 \fI\-\-label\fR (\fI\-L\fR) option.
63
64 The intent is that \fIrefind-mkdefault\fR can be called after booting via
65 GRUB or some other means to restore rEFInd as the default boot program. It
66 can also be placed in a startup and/or shutdown script to restore rEFInd to
67 its default position automatically. Because it does not re-write the boot
68 order if rEFInd is listed as the first boot entry, this practice should be
69 low in risk.
70
71 .SH "OPTIONS"
72
73 .TP
74 .B \-L | \-\-label \fI<name>\fR
75 Instead of searching for the string \fBrefind\fR in \fIefibootmgr\fR output
76 as a way to identify rEFInd, search for the string \fBname\fR.
77
78 .SH "LIMITATIONS"
79
80 .TP
81 .B *
82 \fIrefind-mkdefault\fR does not work when booted in BIOS mode (including
83 via a Compatibility Support Module, or CSM, on an EFI-based computer).
84 Similarly, it does not work if \fIefibootmgr\fR is not installed or fails
85 to work for any reason.
86
87 .TP
88 .B *
89 The script uses a very simple algorithm to determine what to move to
90 the start of the boot order list. This algorithm may fail if the system
91 has redundant or non-functional rEFInd boot entries or if those entries
92 are not named in an expected fashion. Cleaning up the boot entries by
93 manual use of \fIefibootmgr\fR may be necessary in such cases.
94
95 .SH "AUTHORS"
96 Primary author: Roderick W. Smith (rodsmith@rodsbooks.com)
97
98 .SH "SEE ALSO"
99 \fBmvrefind (8)\fR,
100 \fBmkrlconf (8)\fR,
101 \fBrefind-install (8)\fR,
102 \fBefibootmgr (8)\fR
103
104 \fIhttp://www.rodsbooks.com/refind/\fR
105
106 .SH "AVAILABILITY"
107 The \fBrefind-mkdefault\fR command is part of the \fIrEFInd\fR package and is
108 available from Roderick W. Smith.