1GRUBBY(8)                   System Manager's Manual                  GRUBBY(8)
2
3
4

NAME

6       grubby - command line tool for configuring grub and zipl
7
8

SYNOPSIS

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

DESCRIPTION

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, PowerPC and UEFI-based platforms, grub2 is the
28       default    bootloader    and    the    configuration    file    is   in
29       /boot/grub2/grub.cfg.  On s390x platforms, the zipl  bootloader  use  a
30       default configuration in /etc/zipl.conf.
31
32       All  bootloaders  define  the  boot entries as individual configuration
33       fragments that are stored by default in /boot/loader/entries. The  for‐
34       mat    for    the   config   files   is   specified   at   https://sys
35       temd.io/BOOT_LOADER_SPECIFICATION.  The grubby tool is used  to  update
36       and  display  the  configuration defined in the BootLoaderSpec fragment
37       files.
38
39       There are a number of ways to specify the kernel used for --info, --re‐
40       move-kernel,  and  --update-kernel. Specificying DEFAULT or ALL selects
41       the default entry and all of the entries, respectively.  Also, the  ti‐
42       tle  of a boot entry may be specified by using TITLE=title as the argu‐
43       ment; all entries with that title are used.
44
45

OPTIONS

47       --add-kernel=kernel-path
48              Add a new boot entry for the kernel located at kernel-path.
49
50
51       --args=kernel-args
52              When a new kernel is added, this specifies the command line  ar‐
53              guments  which  should  be passed to the kernel by default (note
54              they are merged with the  arguments  of  the  default  entry  if
55              --copy-default  is  used).   When  --update-kernel is used, this
56              specifies new arguments to add to the argument  list.  Multiple,
57              space  separated  arguments  may be used. If an argument already
58              exists the new value replaces the old values. The  root=  kernel
59              argument  gets  special  handling  if the configuration file has
60              special handling for specifying the root filesystem.
61
62
63       --bad-image-okay
64              When grubby is looking for an entry to use for  something  (such
65              as a default boot entry) it uses sanity checks, such as ensuring
66              that the kernel exists in the filesystem, to make  sure  entries
67              that obviously won't work aren't selected. This option overrides
68              that behavior, and is designed primarily for testing.
69
70
71       --config-file=path
72              Use path as the configuration file rather then the default.
73
74
75       --copy-default
76              grubby will copy as much information (such as  kernel  arguments
77              and  root  device)  as possible from the current default kernel.
78              The kernel path and initrd path will never be copied.
79
80
81       --default-kernel
82              Display the full path to the current default kernel and exit.
83
84
85       --default-index
86              Display the numeric index of the current default boot entry  and
87              exit.
88
89
90       --default-title
91              Display the title of the current default boot entry and exit.
92
93
94       --env=path
95              Use path as the grub2 environment block file rather then the de‐
96              fault path.
97
98
99       --grub2
100              Configure grub2 bootloader.
101
102
103       --info=kernel-path
104              Display information on all boot entries which match kernel-path.
105              If  kernel-path is DEFAULT, then information on the default ker‐
106              nel is displayed. If kernel-path is ALL, then information on all
107              boot entries are displayed.
108
109
110       --initrd=initrd-path
111              Use  initrd-path  as  the  path to an initial ram disk for a new
112              kernel being added.
113
114
115       --extrainitrd=initrd-path
116              Use initrd-path as the path to an auxiliary init ram disk  image
117              to be added to the boot entry.
118
119
120       --make-default
121              Make the new kernel entry being added the default entry.
122
123
124       --remove-args=kernel-args
125              The arguments specified by kernel-args are removed from the ker‐
126              nels specified by --update-kernel. The root argument  gets  spe‐
127              cial handling for configuration files that support separate root
128              filesystem configuration.
129
130
131       --remove-kernel=kernel-path
132              Removes all boot entries which match kernel-path.  This  may  be
133              used along with --add-kernel, in which case the new kernel being
134              added will never be removed.
135
136
137       --set-default=kernel-path
138              The first entry which boots the specified kernel is made the de‐
139              fault boot entry.
140
141
142       --set-default-index=entry-index
143              Makes the given entry number the default boot entry.
144
145
146       --title=entry-title
147              When  a new kernel entry is added entry-title is used as the ti‐
148              tle for the entry.
149
150
151       --update-kernel=kernel-path
152              The entries for kernels matching kernel-path are  updated.  Cur‐
153              rently the only items that can be updated is the kernel argument
154              list, which is modified via the  --args  and  --remove-args  op‐
155              tions.  If  the  ALL  argument  is  used the variable  GRUB_CMD‐
156              LINE_LINUX in /etc/default/grub is updated with the latest  ker‐
157              nel  argument  list,  unless  the --no-etc-grub-update option is
158              used.
159
160
161       --zipl Configure zipl bootloader.
162
163
164       --bls-directory=path
165              Use path as the directory for the  BootLoaderSpec  config  files
166              rather than the default /boot/loader/entries.
167
168
169       --no-etc-grub-update
170              Makes  grubby  to  not update the GRUB_CMDLINE_LINUX variable in
171              /etc/default/grub when the --update-kernel option is  used  with
172              the ALL argument.
173
174

SEE ALSO

176       zipl(8), mkinitrd(8), kernel-install(8)
177
178

AUTHORS

180       Erik Troan
181       Jeremy Katz
182       Peter Jones
183       Javier Martinez
184
185
186
187                                Wed Apr 29 2020                      GRUBBY(8)
Impressum