1GRUBBY(8) System Manager's Manual GRUBBY(8)
2
3
4
6 grubby - command line tool for configuring grub and zipl
7
8
10 grubby [--add-kernel=kernel-path] [--args=args]
11 [--bad-image-okay] [--config-file=path] [--copy-default]
12 [--default-kernel] [--default-index] [--default-title]
13 [--env=path] [--grub2] [--info=kernel-path]
14 [--initrd=initrd-path] [--extra-initrd=initrd-path]
15 [--make-default] [--remove-args=args]
16 [--remove-kernel=kernel-path] [--set-default=kernel-path]
17 [--set-default-index=entry-index] [--title=ntry-title]
18 [--update-kernel=kernel-path] [--zipl] [--bls-directory=path]
19
20
22 grubby is a command line tool for updating and displaying information
23 about the configuration files for the grub2 and zipl boot loaders. It
24 is primarily designed to be used from scripts which install new kernels
25 and need to find information about the current boot environment.
26
27 On BIOS-based Intel x86 platforms, grub2 is the default bootloader and
28 the configuration file is in /boot/grub2/grub.cfg. On UEFI-based Intel
29 x86 platforms, grub2 is the default bootloader, and the configuration
30 file is in /boot/efi/EFI/redhat/grub.cfg. On PowerPC platforms, systems
31 based on Power8 and Power9 support grub2 as a bootloader and use a con‐
32 figuration stored in /boot/grub2/grub.cfg. On s390x platforms the zipl
33 bootloader use a default configuration in /etc/zipl.conf.
34
35 All bootloaders define the boot entries as individual configuration
36 fragments that are stored by default in /boot/loader/entries. The for‐
37 mat for the config files is specified at https://sys‐
38 temd.io/BOOT_LOADER_SPECIFICATION. The grubby tool is used to update
39 and display the configuration defined in the BootLoaderSpec fragment
40 files.
41
42 There are a number of ways to specify the kernel used for --info,
43 --remove-kernel, and --update-kernel. Specificying DEFAULT or ALL
44 selects the default entry and all of the entries, respectively. Also,
45 the title of a boot entry may be specified by using TITLE=title as the
46 argument; all entries with that title are used.
47
48
50 --add-kernel=kernel-path
51 Add a new boot entry for the kernel located at kernel-path.
52
53
54 --args=kernel-args
55 When a new kernel is added, this specifies the command line
56 arguments which should be passed to the kernel by default (note
57 they are merged with the arguments of the default entry if
58 --copy-default is used). When --update-kernel is used, this
59 specifies new arguments to add to the argument list. Multiple,
60 space separated arguments may be used. If an argument already
61 exists the new value replaces the old values. The root= kernel
62 argument gets special handling if the configuration file has
63 special handling for specifying the root filesystem.
64
65
66 --bad-image-okay
67 When grubby is looking for an entry to use for something (such
68 as a default boot entry) it uses sanity checks, such as ensuring
69 that the kernel exists in the filesystem, to make sure entries
70 that obviously won't work aren't selected. This option overrides
71 that behavior, and is designed primarily for testing.
72
73
74 --config-file=path
75 Use path as the configuration file rather then the default.
76
77
78 --copy-default
79 grubby will copy as much information (such as kernel arguments
80 and root device) as possible from the current default kernel.
81 The kernel path and initrd path will never be copied.
82
83
84 --default-kernel
85 Display the full path to the current default kernel and exit.
86
87
88 --default-index
89 Display the numeric index of the current default boot entry and
90 exit.
91
92
93 --default-title
94 Display the title of the current default boot entry and exit.
95
96
97 --env=path
98 Use path as the grub2 environment block file rather then the
99 default path.
100
101
102 --grub2
103 Configure grub2 bootloader.
104
105
106 --info=kernel-path
107 Display information on all boot entries which match kernel-path.
108 If kernel-path is DEFAULT, then information on the default ker‐
109 nel is displayed. If kernel-path is ALL, then information on all
110 boot entries are displayed.
111
112
113 --initrd=initrd-path
114 Use initrd-path as the path to an initial ram disk for a new
115 kernel being added.
116
117
118 --extrainitrd=initrd-path
119 Use initrd-path as the path to an auxiliary init ram disk image
120 to be added to the boot entry.
121
122
123 --make-default
124 Make the new kernel entry being added the default entry.
125
126
127 --remove-args=kernel-args
128 The arguments specified by kernel-args are removed from the ker‐
129 nels specified by --update-kernel. The root argument gets spe‐
130 cial handling for configuration files that support separate root
131 filesystem configuration.
132
133
134 --remove-kernel=kernel-path
135 Removes all boot entries which match kernel-path. This may be
136 used along with --add-kernel, in which case the new kernel being
137 added will never be removed.
138
139
140 --set-default=kernel-path
141 The first entry which boots the specified kernel is made the
142 default boot entry.
143
144
145 --set-default-index=entry-index
146 Makes the given entry number the default boot entry.
147
148
149 --title=entry-title
150 When a new kernel entry is added entry-title is used as the
151 title for the entry.
152
153
154 --update-kernel=kernel-path
155 The entries for kernels matching kernel-path are updated. Cur‐
156 rently the only items that can be updated is the kernel argument
157 list, which is modified via the --args and --remove-args
158 options. If the ALL argument is used the variable GRUB_CMD‐
159 LINE_LINUX in /etc/default/grub is updated with the latest ker‐
160 nel argument list, unless the --no-etc-grub-update option is
161 used.
162
163
164 --zipl Configure zipl bootloader.
165
166
167 --bls-directory=path
168 Use path as the directory for the BootLoaderSpec config files
169 rather than the default /boot/loader/entries.
170
171
172 --no-etc-grub-update
173 Makes grubby to not update the GRUB_CMDLINE_LINUX variable in
174 /etc/default/grub when the --update-kernel option is used with
175 the ALL argument.
176
177
179 zipl(8), mkinitrd(8), kernel-install(8)
180
181
183 Erik Troan
184 Jeremy Katz
185 Peter Jones
186 Javier Martinez
187
188
189
190 Wed Apr 29 2020 GRUBBY(8)