You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
grub2/SOURCES/0055-Make-our-info-pages-sa...

1009 lines
42 KiB

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 9 Jul 2019 12:59:58 +0200
Subject: [PATCH] Make our info pages say "grub2" where appropriate.
This needs to be hooked up to --program-transform=, but I haven't had
time.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
docs/grub-dev.texi | 4 +-
docs/grub.texi | 321 ++++++++++++++++++++++++++++-------------------------
2 files changed, 171 insertions(+), 154 deletions(-)
diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi
index 6c629a23e2d..19f708ee662 100644
--- a/docs/grub-dev.texi
+++ b/docs/grub-dev.texi
@@ -1,7 +1,7 @@
\input texinfo
@c -*-texinfo-*-
@c %**start of header
-@setfilename grub-dev.info
+@setfilename grub2-dev.info
@include version-dev.texi
@settitle GNU GRUB Developers Manual @value{VERSION}
@c Unify all our little indices for now.
@@ -32,7 +32,7 @@ Invariant Sections.
@dircategory Kernel
@direntry
-* grub-dev: (grub-dev). The GRand Unified Bootloader Dev
+* grub2-dev: (grub2-dev). The GRand Unified Bootloader Dev
@end direntry
@setchapternewpage odd
diff --git a/docs/grub.texi b/docs/grub.texi
index 69f08d289f9..0615d0ed97e 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -1,7 +1,7 @@
\input texinfo
@c -*-texinfo-*-
@c %**start of header
-@setfilename grub.info
+@setfilename grub2.info
@include version.texi
@settitle GNU GRUB Manual @value{VERSION}
@c Unify all our little indices for now.
@@ -32,15 +32,15 @@ Invariant Sections.
@dircategory Kernel
@direntry
-* GRUB: (grub). The GRand Unified Bootloader
-* grub-install: (grub)Invoking grub-install. Install GRUB on your drive
-* grub-mkconfig: (grub)Invoking grub-mkconfig. Generate GRUB configuration
-* grub-mkpasswd-pbkdf2: (grub)Invoking grub-mkpasswd-pbkdf2.
-* grub-mkrelpath: (grub)Invoking grub-mkrelpath.
-* grub-mkrescue: (grub)Invoking grub-mkrescue. Make a GRUB rescue image
-* grub-mount: (grub)Invoking grub-mount. Mount a file system using GRUB
-* grub-probe: (grub)Invoking grub-probe. Probe device information
-* grub-script-check: (grub)Invoking grub-script-check.
+* GRUB2: (grub2). The GRand Unified Bootloader
+* grub2-install: (grub2)Invoking grub2-install. Install GRUB on your drive
+* grub2-mkconfig: (grub2)Invoking grub2-mkconfig. Generate GRUB configuration
+* grub2-mkpasswd-pbkdf2: (grub2)Invoking grub2-mkpasswd-pbkdf2.
+* grub2-mkrelpath: (grub2)Invoking grub2-mkrelpath.
+* grub2-mkrescue: (grub2)Invoking grub2-mkrescue. Make a GRUB rescue image
+* grub2-mount: (grub2)Invoking grub2-mount. Mount a file system using GRUB
+* grub2-probe: (grub2)Invoking grub2-probe. Probe device information
+* grub2-script-check: (grub2)Invoking grub2-script-check.
@end direntry
@setchapternewpage odd
@@ -103,15 +103,15 @@ This edition documents version @value{VERSION}.
* Platform-specific operations:: Platform-specific operations
* Supported kernels:: The list of supported kernels
* Troubleshooting:: Error messages produced by GRUB
-* Invoking grub-install:: How to use the GRUB installer
-* Invoking grub-mkconfig:: Generate a GRUB configuration file
-* Invoking grub-mkpasswd-pbkdf2::
+* Invoking grub2-install:: How to use the GRUB installer
+* Invoking grub2-mkconfig:: Generate a GRUB configuration file
+* Invoking grub2-mkpasswd-pbkdf2::
Generate GRUB password hashes
-* Invoking grub-mkrelpath:: Make system path relative to its root
-* Invoking grub-mkrescue:: Make a GRUB rescue image
-* Invoking grub-mount:: Mount a file system using GRUB
-* Invoking grub-probe:: Probe device information for GRUB
-* Invoking grub-script-check:: Check GRUB script file for syntax errors
+* Invoking grub2-mkrelpath:: Make system path relative to its root
+* Invoking grub2-mkrescue:: Make a GRUB rescue image
+* Invoking grub2-mount:: Mount a file system using GRUB
+* Invoking grub2-probe:: Probe device information for GRUB
+* Invoking grub2-script-check:: Check GRUB script file for syntax errors
* Obtaining and Building GRUB:: How to obtain and build GRUB
* Reporting bugs:: Where you should send a bug report
* Future:: Some future plans on GRUB
@@ -230,7 +230,7 @@ surprising.
@item
@file{grub.cfg} is typically automatically generated by
-@command{grub-mkconfig} (@pxref{Simple configuration}). This makes it
+@command{grub2-mkconfig} (@pxref{Simple configuration}). This makes it
easier to handle versioned kernel upgrades.
@item
@@ -244,7 +244,7 @@ scripting language: variables, conditionals, and loops are available.
@item
A small amount of persistent storage is available across reboots, using the
@command{save_env} and @command{load_env} commands in GRUB and the
-@command{grub-editenv} utility. This is not available in all configurations
+@command{grub2-editenv} utility. This is not available in all configurations
(@pxref{Environment block}).
@item
@@ -549,7 +549,7 @@ On OS which have device nodes similar to Unix-like OS GRUB tools use the
OS name. E.g. for GNU/Linux:
@example
-# @kbd{grub-install /dev/sda}
+# @kbd{grub2-install /dev/sda}
@end example
On AROS we use another syntax. For volumes:
@@ -572,7 +572,7 @@ For disks we use syntax:
E.g.
@example
-# @kbd{grub-install //:ata.device/0/0}
+# @kbd{grub2-install //:ata.device/0/0}
@end example
On Windows we use UNC path. For volumes it's typically
@@ -599,7 +599,7 @@ For disks it's
E.g.
@example
-# @kbd{grub-install \\?\PhysicalDrive0}
+# @kbd{grub2-install \\?\PhysicalDrive0}
@end example
Beware that you may need to further escape the backslashes depending on your
@@ -609,7 +609,7 @@ When compiled with cygwin support then cygwin drive names are automatically
when needed. E.g.
@example
-# @kbd{grub-install /dev/sda}
+# @kbd{grub2-install /dev/sda}
@end example
@node Installation
@@ -622,7 +622,7 @@ from the source tarball, or as a package for your OS.
After you have done that, you need to install the boot loader on a
drive (floppy or hard disk) by using the utility
-@command{grub-install} (@pxref{Invoking grub-install}) on a UNIX-like OS.
+@command{grub2-install} (@pxref{Invoking grub2-install}) on a UNIX-like OS.
GRUB comes with boot images, which are normally put in the directory
@file{/usr/lib/grub/<cpu>-<platform>} (for BIOS-based machines
@@ -633,22 +633,22 @@ loader needs to find them (usually @file{/boot}) will be called
the @dfn{boot directory}.
@menu
-* Installing GRUB using grub-install::
+* Installing GRUB using grub2-install::
* Making a GRUB bootable CD-ROM::
* Device map::
* BIOS installation::
@end menu
-@node Installing GRUB using grub-install
-@section Installing GRUB using grub-install
+@node Installing GRUB using grub2-install
+@section Installing GRUB using grub2-install
For information on where GRUB should be installed on PC BIOS platforms,
@pxref{BIOS installation}.
In order to install GRUB under a UNIX-like OS (such
-as @sc{gnu}), invoke the program @command{grub-install} (@pxref{Invoking
-grub-install}) as the superuser (@dfn{root}).
+as @sc{gnu}), invoke the program @command{grub2-install} (@pxref{Invoking
+grub2-install}) as the superuser (@dfn{root}).
The usage is basically very simple. You only need to specify one
argument to the program, namely, where to install the boot loader. The
@@ -657,13 +657,13 @@ For example, under Linux the following will install GRUB into the MBR
of the first IDE disk:
@example
-# @kbd{grub-install /dev/sda}
+# @kbd{grub2-install /dev/sda}
@end example
Likewise, under GNU/Hurd, this has the same effect:
@example
-# @kbd{grub-install /dev/hd0}
+# @kbd{grub2-install /dev/hd0}
@end example
But all the above examples assume that GRUB should put images under
@@ -677,7 +677,7 @@ boot floppy with a filesystem. Here is an example:
# @kbd{mke2fs /dev/fd0}
# @kbd{mount -t ext2 /dev/fd0 /mnt}
# @kbd{mkdir /mnt/boot}
-# @kbd{grub-install --boot-directory=/mnt/boot /dev/fd0}
+# @kbd{grub2-install --boot-directory=/mnt/boot /dev/fd0}
# @kbd{umount /mnt}
@end group
@end example
@@ -689,30 +689,37 @@ floppy instead of exposing the USB drive as a hard disk (they call it
@example
# @kbd{losetup /dev/loop0 /dev/sdb1}
# @kbd{mount /dev/loop0 /mnt/usb}
-# @kbd{grub-install --boot-directory=/mnt/usb/bugbios --force --allow-floppy /dev/loop0}
+# @kbd{grub2-install --boot-directory=/mnt/usb/bugbios --force --allow-floppy /dev/loop0}
@end example
This install doesn't conflict with standard install as long as they are in
separate directories.
+Note that @command{grub2-install} is actually just a shell script and the
+real task is done by other tools such as @command{grub2-mkimage}. Therefore,
+you may run those commands directly to install GRUB, without using
+@command{grub2-install}. Don't do that, however, unless you are very familiar
+with the internals of GRUB. Installing a boot loader on a running OS may be
+extremely dangerous.
+
On EFI systems for fixed disk install you have to mount EFI System Partition.
If you mount it at @file{/boot/efi} then you don't need any special arguments:
@example
-# @kbd{grub-install}
+# @kbd{grub2-install}
@end example
Otherwise you need to specify where your EFI System partition is mounted:
@example
-# @kbd{grub-install --efi-directory=/mnt/efi}
+# @kbd{grub2-install --efi-directory=/mnt/efi}
@end example
For removable installs you have to use @option{--removable} and specify both
@option{--boot-directory} and @option{--efi-directory}:
@example
-# @kbd{grub-install --efi-directory=/mnt/usb --boot-directory=/mnt/usb/boot --removable}
+# @kbd{grub2-install --efi-directory=/mnt/usb --boot-directory=/mnt/usb/boot --removable}
@end example
@node Making a GRUB bootable CD-ROM
@@ -732,10 +739,10 @@ usually also need to include a configuration file @file{grub.cfg} and some
other GRUB modules.
To make a simple generic GRUB rescue CD, you can use the
-@command{grub-mkrescue} program (@pxref{Invoking grub-mkrescue}):
+@command{grub2-mkrescue} program (@pxref{Invoking grub2-mkrescue}):
@example
-$ @kbd{grub-mkrescue -o grub.iso}
+$ @kbd{grub2-mkrescue -o grub.iso}
@end example
You will often need to include other files in your image. To do this, first
@@ -758,7 +765,7 @@ directory @file{iso/}.
Finally, make the image:
@example
-$ @kbd{grub-mkrescue -o grub.iso iso}
+$ @kbd{grub2-mkrescue -o grub.iso iso}
@end example
This produces a file named @file{grub.iso}, which then can be burned
@@ -774,7 +781,7 @@ storage devices.
@node Device map
@section The map between BIOS drives and OS devices
-If the device map file exists, the GRUB utilities (@command{grub-probe},
+If the device map file exists, the GRUB utilities (@command{grub2-probe},
etc.) read it to map BIOS drives to OS devices. This file consists of lines
like this:
@@ -1254,23 +1261,23 @@ need to write the whole thing by hand.
@node Simple configuration
@section Simple configuration handling
-The program @command{grub-mkconfig} (@pxref{Invoking grub-mkconfig})
+The program @command{grub2-mkconfig} (@pxref{Invoking grub2-mkconfig})
generates @file{grub.cfg} files suitable for most cases. It is suitable for
use when upgrading a distribution, and will discover available kernels and
attempt to generate menu entries for them.
-@command{grub-mkconfig} does have some limitations. While adding extra
+@command{grub2-mkconfig} does have some limitations. While adding extra
custom menu entries to the end of the list can be done by editing
-@file{/etc/grub.d/40_custom} or creating @file{/boot/grub/custom.cfg},
+@file{/etc/grub.d/40_custom} or creating @file{/boot/grub2/custom.cfg},
changing the order of menu entries or changing their titles may require
making complex changes to shell scripts stored in @file{/etc/grub.d/}. This
may be improved in the future. In the meantime, those who feel that it
would be easier to write @file{grub.cfg} directly are encouraged to do so
(@pxref{Booting}, and @ref{Shell-like scripting}), and to disable any system
-provided by their distribution to automatically run @command{grub-mkconfig}.
+provided by their distribution to automatically run @command{grub2-mkconfig}.
The file @file{/etc/default/grub} controls the operation of
-@command{grub-mkconfig}. It is sourced by a shell script, and so must be
+@command{grub2-mkconfig}. It is sourced by a shell script, and so must be
valid POSIX shell input; normally, it will just be a sequence of
@samp{KEY=value} lines, but if the value contains spaces or other special
characters then it must be quoted. For example:
@@ -1308,7 +1315,7 @@ works it's not recommended since titles often contain unstable device names
and may be translated
If you set this to @samp{saved}, then the default menu entry will be that
-saved by @samp{GRUB_SAVEDEFAULT} or @command{grub-set-default}. This relies on
+saved by @samp{GRUB_SAVEDEFAULT} or @command{grub2-set-default}. This relies on
the environment block, which may not be available in all situations
(@pxref{Environment block}).
@@ -1319,7 +1326,7 @@ If this option is set to @samp{true}, then, when an entry is selected, save
it as a new default entry for use by future runs of GRUB. This is only
useful if @samp{GRUB_DEFAULT=saved}; it is a separate option because
@samp{GRUB_DEFAULT=saved} is useful without this option, in conjunction with
-@command{grub-set-default}. Unset by default.
+@command{grub2-set-default}. Unset by default.
This option relies on the environment block, which may not be available in
all situations (@pxref{Environment block}).
@@ -1449,7 +1456,7 @@ intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode
@end example
@item GRUB_DISABLE_LINUX_UUID
-Normally, @command{grub-mkconfig} will generate menu entries that use
+Normally, @command{grub2-mkconfig} will generate menu entries that use
universally-unique identifiers (UUIDs) to identify the root filesystem to
the Linux kernel, using a @samp{root=UUID=...} kernel parameter. This is
usually more reliable, but in some cases it may not be appropriate. To
@@ -1471,7 +1478,7 @@ If this option is set to @samp{true}, disable the generation of recovery
mode menu entries.
@item GRUB_DISABLE_UUID
-Normally, @command{grub-mkconfig} will generate menu entries that use
+Normally, @command{grub2-mkconfig} will generate menu entries that use
universally-unique identifiers (UUIDs) to identify various filesystems to
search for files. This is usually more reliable, but in some cases it may
not be appropriate. To disable this use of UUIDs, set this option to
@@ -1482,12 +1489,12 @@ not be appropriate. To disable this use of UUIDs, set this option to
@item GRUB_VIDEO_BACKEND
If graphical video support is required, either because the @samp{gfxterm}
graphical terminal is in use or because @samp{GRUB_GFXPAYLOAD_LINUX} is set,
-then @command{grub-mkconfig} will normally load all available GRUB video
+then @command{grub2-mkconfig} will normally load all available GRUB video
drivers and use the one most appropriate for your hardware. If you need to
override this for some reason, then you can set this option.
-After @command{grub-install} has been run, the available video drivers are
-listed in @file{/boot/grub/video.lst}.
+After @command{grub2-install} has been run, the available video drivers are
+listed in @file{/boot/grub2/video.lst}.
@item GRUB_GFXMODE
Set the resolution used on the @samp{gfxterm} graphical terminal. Note that
@@ -1519,7 +1526,7 @@ boot sequence. If you have problems, set this option to @samp{text} and
GRUB will tell Linux to boot in normal text mode.
@item GRUB_DISABLE_OS_PROBER
-Normally, @command{grub-mkconfig} will try to use the external
+Normally, @command{grub2-mkconfig} will try to use the external
@command{os-prober} program, if installed, to discover other operating
systems installed on the same system and generate appropriate menu entries
for them. Set this option to @samp{true} to disable this.
@@ -1529,7 +1536,7 @@ List of space-separated FS UUIDs of filesystems to be ignored from os-prober
output. For efi chainloaders it's <UUID>@@<EFI FILE>
@item GRUB_DISABLE_SUBMENU
-Normally, @command{grub-mkconfig} will generate top level menu entry for
+Normally, @command{grub2-mkconfig} will generate top level menu entry for
the kernel with highest version number and put all other found kernels
or alternative menu entries for recovery mode in submenu. For entries returned
by @command{os-prober} first entry will be put on top level and all others
@@ -1537,11 +1544,11 @@ in submenu. If this option is set to @samp{true}, flat menu with all entries
on top level will be generated instead. Changing this option will require
changing existing values of @samp{GRUB_DEFAULT}, @samp{fallback} (@pxref{fallback})
and @samp{default} (@pxref{default}) environment variables as well as saved
-default entry using @command{grub-set-default} and value used with
-@command{grub-reboot}.
+default entry using @command{grub2-set-default} and value used with
+@command{grub2-reboot}.
@item GRUB_ENABLE_CRYPTODISK
-If set to @samp{y}, @command{grub-mkconfig} and @command{grub-install} will
+If set to @samp{y}, @command{grub2-mkconfig} and @command{grub2-install} will
check for encrypted disks and generate additional commands needed to access
them during boot. Note that in this case unattended boot is not possible
because GRUB will wait for passphrase to unlock encrypted container.
@@ -1600,7 +1607,7 @@ confusing @samp{GRUB_TIMEOUT_STYLE=countdown} or
@end table
-For more detailed customisation of @command{grub-mkconfig}'s output, you may
+For more detailed customisation of @command{grub2-mkconfig}'s output, you may
edit the scripts in @file{/etc/grub.d} directly.
@file{/etc/grub.d/40_custom} is particularly useful for adding entire custom
menu entries; simply type the menu entries you want to add at the end of
@@ -1862,7 +1869,7 @@ images as well.
Mount this partition on/mnt/boot and disable GRUB in all OSes and manually
install self-compiled latest GRUB with:
-@code{grub-install --boot-directory=/mnt/boot /dev/sda}
+@code{grub2-install --boot-directory=/mnt/boot /dev/sda}
In all the OSes install GRUB tools but disable installing GRUB in bootsector,
so you'll have menu.lst and grub.cfg available for use. Also disable os-prober
@@ -1872,20 +1879,20 @@ use by setting:
in /etc/default/grub
-Then write a grub.cfg (/mnt/boot/grub/grub.cfg):
+Then write a grub.cfg (/mnt/boot/grub2/grub.cfg):
@example
menuentry "OS using grub2" @{
insmod xfs
search --set=root --label OS1 --hint hd0,msdos8
- configfile /boot/grub/grub.cfg
+ configfile /boot/grub2/grub.cfg
@}
menuentry "OS using grub2-legacy" @{
insmod ext2
search --set=root --label OS2 --hint hd0,msdos6
- legacy_configfile /boot/grub/menu.lst
+ legacy_configfile /boot/grub2/menu.lst
@}
menuentry "Windows XP" @{
@@ -1948,15 +1955,15 @@ GRUB supports embedding a configuration file directly into the core image,
so that it is loaded before entering normal mode. This is useful, for
example, when it is not straightforward to find the real configuration file,
or when you need to debug problems with loading that file.
-@command{grub-install} uses this feature when it is not using BIOS disk
+@command{grub2-install} uses this feature when it is not using BIOS disk
functions or when installing to a different disk from the one containing
@file{/boot/grub}, in which case it needs to use the @command{search}
command (@pxref{search}) to find @file{/boot/grub}.
To embed a configuration file, use the @option{-c} option to
-@command{grub-mkimage}. The file is copied into the core image, so it may
+@command{grub2-mkimage}. The file is copied into the core image, so it may
reside anywhere on the file system, and may be removed after running
-@command{grub-mkimage}.
+@command{grub2-mkimage}.
After the embedded configuration file (if any) is executed, GRUB will load
the @samp{normal} module (@pxref{normal}), which will then read the real
@@ -1991,13 +1998,13 @@ included in the core image:
@example
@group
search.fs_label grub root
-if [ -e /boot/grub/example/test1.cfg ]; then
+if [ -e /boot/grub2/example/test1.cfg ]; then
set prefix=($root)/boot/grub
- configfile /boot/grub/example/test1.cfg
+ configfile /boot/grub2/example/test1.cfg
else
- if [ -e /boot/grub/example/test2.cfg ]; then
+ if [ -e /boot/grub2/example/test2.cfg ]; then
set prefix=($root)/boot/grub
- configfile /boot/grub/example/test2.cfg
+ configfile /boot/grub2/example/test2.cfg
else
echo "Could not find an example configuration file!"
fi
@@ -2521,7 +2528,7 @@ grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/i38
@end group
@end example
-Then follow instructions printed out by grub-mknetdir on configuring your DHCP
+Then follow instructions printed out by grub2-mknetdir on configuring your DHCP
server.
The grub.cfg file is placed in the same directory as the path output by
@@ -2715,7 +2722,7 @@ team are:
@end table
To take full advantage of this function, install GRUB into the MBR
-(@pxref{Installing GRUB using grub-install}).
+(@pxref{Installing GRUB using grub2-install}).
If you have a laptop which has a similar feature and not in the above list
could you figure your address and contribute?
@@ -2776,7 +2783,7 @@ bytes.
The sole function of @file{boot.img} is to read the first sector of the core
image from a local disk and jump to it. Because of the size restriction,
@file{boot.img} cannot understand any file system structure, so
-@command{grub-install} hardcodes the location of the first sector of the
+@command{grub2-install} hardcodes the location of the first sector of the
core image into @file{boot.img} when installing GRUB.
@item diskboot.img
@@ -2806,7 +2813,7 @@ images.
@item core.img
This is the core image of GRUB. It is built dynamically from the kernel
-image and an arbitrary list of modules by the @command{grub-mkimage}
+image and an arbitrary list of modules by the @command{grub2-mkimage}
program. Usually, it contains enough modules to access @file{/boot/grub},
and loads everything else (including menu handling, the ability to load
target operating systems, and so on) from the file system at run-time. The
@@ -2858,7 +2865,7 @@ GRUB 2 has no single Stage 2 image. Instead, it loads modules from
In GRUB 2, images for booting from CD-ROM drives are now constructed using
@file{cdboot.img} and @file{core.img}, making sure that the core image
contains the @samp{iso9660} module. It is usually best to use the
-@command{grub-mkrescue} program for this.
+@command{grub2-mkrescue} program for this.
@item nbgrub
There is as yet no equivalent for @file{nbgrub} in GRUB 2; it was used by
@@ -3014,8 +3021,8 @@ There are two ways to specify files, by @dfn{absolute file name} and by
An absolute file name resembles a Unix absolute file name, using
@samp{/} for the directory separator (not @samp{\} as in DOS). One
-example is @samp{(hd0,1)/boot/grub/grub.cfg}. This means the file
-@file{/boot/grub/grub.cfg} in the first partition of the first hard
+example is @samp{(hd0,1)/boot/grub2/grub.cfg}. This means the file
+@file{/boot/grub2/grub.cfg} in the first partition of the first hard
disk. If you omit the device name in an absolute file name, GRUB uses
GRUB's @dfn{root device} implicitly. So if you set the root device to,
say, @samp{(hd1,1)} by the command @samp{set root=(hd1,1)} (@pxref{set}),
@@ -3023,8 +3030,8 @@ then @code{/boot/kernel} is the same as @code{(hd1,1)/boot/kernel}.
On ZFS filesystem the first path component must be
@var{volume}@samp{@@}[@var{snapshot}].
-So @samp{/rootvol@@snap-129/boot/grub/grub.cfg} refers to file
-@samp{/boot/grub/grub.cfg} in snapshot of volume @samp{rootvol} with name
+So @samp{/rootvol@@snap-129/boot/grub2/grub.cfg} refers to file
+@samp{/boot/grub2/grub.cfg} in snapshot of volume @samp{rootvol} with name
@samp{snap-129}. Trailing @samp{@@} after volume name is mandatory even if
snapshot name is omitted.
@@ -3427,7 +3434,7 @@ The more recent release of Minix would then be identified as
@samp{other>minix>minix-3.4.0}.
This variable is often set by @samp{GRUB_DEFAULT} (@pxref{Simple
-configuration}), @command{grub-set-default}, or @command{grub-reboot}.
+configuration}), @command{grub2-set-default}, or @command{grub2-reboot}.
@node fallback
@@ -3517,7 +3524,7 @@ If this variable is set, it names the language code that the
example, French would be named as @samp{fr}, and Simplified Chinese as
@samp{zh_CN}.
-@command{grub-mkconfig} (@pxref{Simple configuration}) will try to set a
+@command{grub2-mkconfig} (@pxref{Simple configuration}) will try to set a
reasonable default for this variable based on the system locale.
@@ -3525,10 +3532,10 @@ reasonable default for this variable based on the system locale.
@subsection locale_dir
If this variable is set, it names the directory where translation files may
-be found (@pxref{gettext}), usually @file{/boot/grub/locale}. Otherwise,
+be found (@pxref{gettext}), usually @file{/boot/grub2/locale}. Otherwise,
internationalization is disabled.
-@command{grub-mkconfig} (@pxref{Simple configuration}) will set a reasonable
+@command{grub2-mkconfig} (@pxref{Simple configuration}) will set a reasonable
default for this variable if internationalization is needed and any
translation files are available.
@@ -3646,7 +3653,7 @@ input. The default is not to pause output.
The location of the @samp{/boot/grub} directory as an absolute file name
(@pxref{File name syntax}). This is normally set by GRUB at startup based
-on information provided by @command{grub-install}. GRUB modules are
+on information provided by @command{grub2-install}. GRUB modules are
dynamically loaded from this directory, so it must be set correctly in order
for many parts of GRUB to work.
@@ -3737,17 +3744,17 @@ GRUB provides an ``environment block'' which can be used to save a small
amount of state.
The environment block is a preallocated 1024-byte file, which normally lives
-in @file{/boot/grub/grubenv} (although you should not assume this). At boot
+in @file{/boot/grub2/grubenv} (although you should not assume this). At boot
time, the @command{load_env} command (@pxref{load_env}) loads environment
variables from it, and the @command{save_env} (@pxref{save_env}) command
saves environment variables to it. From a running system, the
-@command{grub-editenv} utility can be used to edit the environment block.
+@command{grub2-editenv} utility can be used to edit the environment block.
For safety reasons, this storage is only available when installed on a plain
disk (no LVM or RAID), using a non-checksumming filesystem (no ZFS), and
using BIOS or EFI functions (no ATA, USB or IEEE1275).
-@command{grub-mkconfig} uses this facility to implement
+@command{grub2-mkconfig} uses this facility to implement
@samp{GRUB_SAVEDEFAULT} (@pxref{Simple configuration}).
@@ -4476,7 +4483,7 @@ Translate @var{string} into the current language.
The current language code is stored in the @samp{lang} variable in GRUB's
environment (@pxref{lang}). Translation files in MO format are read from
-@samp{locale_dir} (@pxref{locale_dir}), usually @file{/boot/grub/locale}.
+@samp{locale_dir} (@pxref{locale_dir}), usually @file{/boot/grub2/locale}.
@end deffn
@@ -4871,7 +4878,7 @@ Define a user named @var{user} with password @var{clear-password}.
@deffn Command password_pbkdf2 user hashed-password
Define a user named @var{user} with password hash @var{hashed-password}.
-Use @command{grub-mkpasswd-pbkdf2} (@pxref{Invoking grub-mkpasswd-pbkdf2})
+Use @command{grub2-mkpasswd-pbkdf2} (@pxref{Invoking grub2-mkpasswd-pbkdf2})
to generate password hashes. @xref{Security}.
@end deffn
@@ -5814,8 +5821,8 @@ The @samp{password} (@pxref{password}) and @samp{password_pbkdf2}
which has an associated password. @samp{password} sets the password in
plain text, requiring @file{grub.cfg} to be secure; @samp{password_pbkdf2}
sets the password hashed using the Password-Based Key Derivation Function
-(RFC 2898), requiring the use of @command{grub-mkpasswd-pbkdf2}
-(@pxref{Invoking grub-mkpasswd-pbkdf2}) to generate password hashes.
+(RFC 2898), requiring the use of @command{grub2-mkpasswd-pbkdf2}
+(@pxref{Invoking grub2-mkpasswd-pbkdf2}) to generate password hashes.
In order to enable authentication support, the @samp{superusers} environment
variable must be set to a list of usernames, separated by any of spaces,
@@ -5860,7 +5867,7 @@ menuentry "May be run by user1 or a superuser" --users user1 @{
@end group
@end example
-The @command{grub-mkconfig} program does not yet have built-in support for
+The @command{grub2-mkconfig} program does not yet have built-in support for
generating configuration files with authentication. You can use
@file{/etc/grub.d/40_custom} to add simple superuser authentication, by
adding @kbd{set superusers=} and @kbd{password} or @kbd{password_pbkdf2}
@@ -5887,7 +5894,17 @@ may halt or otherwise impact the boot process.
An initial trusted public key can be embedded within the GRUB @file{core.img}
using the @code{--pubkey} option to @command{grub-install}
-(@pxref{Invoking grub-install}).
+(@pxref{Invoking grub2-install}).
+
+@comment Unfortunately --pubkey is not yet supported by grub2-install,
+@comment but we should not bring up internal detail grub2-mkimage here
+@comment in the user guide (as opposed to developer's manual).
+
+@comment An initial trusted public key can be embedded within the GRUB
+@comment @file{core.img} using the @code{--pubkey} option to
+@comment @command{grub2-mkimage} (@pxref{Invoking grub2-install}). Presently it
+@comment is necessary to write a custom wrapper around @command{grub2-mkimage}
+@comment using the @code{--grub-mkimage} flag to @command{grub2-install}.
GRUB uses GPG-style detached signatures (meaning that a file
@file{foo.sig} will be produced when file @file{foo} is signed), and
@@ -5907,8 +5924,8 @@ gpg --detach-sign /path/to/file
For successful validation of all of GRUB's subcomponents and the
loaded OS kernel, they must all be signed. One way to accomplish this
is the following (after having already produced the desired
-@file{grub.cfg} file, e.g., by running @command{grub-mkconfig}
-(@pxref{Invoking grub-mkconfig}):
+@file{grub.cfg} file, e.g., by running @command{grub2-mkconfig}
+(@pxref{Invoking grub2-mkconfig}):
@example
@group
@@ -5930,7 +5947,7 @@ See also: @ref{check_signatures}, @ref{verify_detached}, @ref{trust},
Note that internally signature enforcement is controlled by setting
the environment variable @code{check_signatures} equal to
@code{enforce}. Passing one or more @code{--pubkey} options to
-@command{grub-mkimage} implicitly defines @code{check_signatures}
+@command{grub2-mkimage} implicitly defines @code{check_signatures}
equal to @code{enforce} in @file{core.img} prior to processing any
configuration files.
@@ -6388,10 +6405,10 @@ Required files are:
GRUB's normal start-up procedure involves setting the @samp{prefix}
environment variable to a value set in the core image by
-@command{grub-install}, setting the @samp{root} variable to match, loading
+@command{grub2-install}, setting the @samp{root} variable to match, loading
the @samp{normal} module from the prefix, and running the @samp{normal}
command (@pxref{normal}). This command is responsible for reading
-@file{/boot/grub/grub.cfg}, running the menu, and doing all the useful
+@file{/boot/grub2/grub.cfg}, running the menu, and doing all the useful
things GRUB is supposed to do.
If, instead, you only get a rescue shell, this usually means that GRUB
@@ -6417,8 +6434,8 @@ normal
However, any problem that leaves you in the rescue shell probably means that
GRUB was not correctly installed. It may be more useful to try to reinstall
-it properly using @kbd{grub-install @var{device}} (@pxref{Invoking
-grub-install}). When doing this, there are a few things to remember:
+it properly using @kbd{grub2-install @var{device}} (@pxref{Invoking
+grub2-install}). When doing this, there are a few things to remember:
@itemize @bullet{}
@item
@@ -6430,7 +6447,7 @@ is usually better to use UUIDs or file system labels and avoid depending on
drive ordering entirely.
@item
-At least on BIOS systems, if you tell @command{grub-install} to install GRUB
+At least on BIOS systems, if you tell @command{grub2-install} to install GRUB
to a partition but GRUB has already been installed in the master boot
record, then the GRUB installation in the partition will be ignored.
@@ -6461,21 +6478,21 @@ entry which claims partition start at block 0. This change will not hamper
bootability on other machines.
-@node Invoking grub-install
-@chapter Invoking grub-install
+@node Invoking grub2-install
+@chapter Invoking grub2-install
-The program @command{grub-install} generates a GRUB core image using
-@command{grub-mkimage} and installs it on your system. You must specify the
+The program @command{grub2-install} generates a GRUB core image using
+@command{grub2-mkimage} and installs it on your system. You must specify the
device name on which you want to install GRUB, like this:
@example
-grub-install @var{install_device}
+grub2-install @var{install_device}
@end example
The device name @var{install_device} is an OS device name or a GRUB
device name.
-@command{grub-install} accepts the following options:
+@command{grub2-install} accepts the following options:
@table @option
@item --help
@@ -6491,13 +6508,13 @@ separate partition or a removable disk.
If this option is not specified then it defaults to @file{/boot}, so
@example
-@kbd{grub-install /dev/sda}
+@kbd{grub2-install /dev/sda}
@end example
is equivalent to
@example
-@kbd{grub-install --boot-directory=/boot/ /dev/sda}
+@kbd{grub2-install --boot-directory=/boot/ /dev/sda}
@end example
Here is an example in which you have a separate @dfn{boot} partition which is
@@ -6505,16 +6522,16 @@ mounted on
@file{/mnt/boot}:
@example
-@kbd{grub-install --boot-directory=/mnt/boot /dev/sdb}
+@kbd{grub2-install --boot-directory=/mnt/boot /dev/sdb}
@end example
@item --recheck
-Recheck the device map, even if @file{/boot/grub/device.map} already
+Recheck the device map, even if @file{/boot/grub2/device.map} already
exists. You should use this option whenever you add/remove a disk
into/from your computer.
@item --no-rs-codes
-By default on x86 BIOS systems, @command{grub-install} will use some
+By default on x86 BIOS systems, @command{grub2-install} will use some
extra space in the bootloader embedding area for Reed-Solomon
error-correcting codes. This enables GRUB to still boot successfully
if some blocks are corrupted. The exact amount of protection offered
@@ -6527,17 +6544,17 @@ installation}) where GRUB does not reside in any unpartitioned space
outside of the MBR. Disable the Reed-Solomon codes with this option.
@end table
-@node Invoking grub-mkconfig
-@chapter Invoking grub-mkconfig
+@node Invoking grub2-mkconfig
+@chapter Invoking grub2-mkconfig
-The program @command{grub-mkconfig} generates a configuration file for GRUB
+The program @command{grub2-mkconfig} generates a configuration file for GRUB
(@pxref{Simple configuration}).
@example
-grub-mkconfig -o /boot/grub/grub.cfg
+grub-mkconfig -o /boot/grub2/grub.cfg
@end example
-@command{grub-mkconfig} accepts the following options:
+@command{grub2-mkconfig} accepts the following options:
@table @option
@item --help
@@ -6553,17 +6570,17 @@ it to standard output.
@end table
-@node Invoking grub-mkpasswd-pbkdf2
-@chapter Invoking grub-mkpasswd-pbkdf2
+@node Invoking grub2-mkpasswd-pbkdf2
+@chapter Invoking grub2-mkpasswd-pbkdf2
-The program @command{grub-mkpasswd-pbkdf2} generates password hashes for
+The program @command{grub2-mkpasswd-pbkdf2} generates password hashes for
GRUB (@pxref{Security}).
@example
grub-mkpasswd-pbkdf2
@end example
-@command{grub-mkpasswd-pbkdf2} accepts the following options:
+@command{grub2-mkpasswd-pbkdf2} accepts the following options:
@table @option
@item -c @var{number}
@@ -6581,23 +6598,23 @@ Length of the salt. Defaults to 64.
@end table
-@node Invoking grub-mkrelpath
-@chapter Invoking grub-mkrelpath
+@node Invoking grub2-mkrelpath
+@chapter Invoking grub2-mkrelpath
-The program @command{grub-mkrelpath} makes a file system path relative to
+The program @command{grub2-mkrelpath} makes a file system path relative to
the root of its containing file system. For instance, if @file{/usr} is a
mount point, then:
@example
-$ @kbd{grub-mkrelpath /usr/share/grub/unicode.pf2}
+$ @kbd{grub2-mkrelpath /usr/share/grub/unicode.pf2}
@samp{/share/grub/unicode.pf2}
@end example
This is mainly used internally by other GRUB utilities such as
-@command{grub-mkconfig} (@pxref{Invoking grub-mkconfig}), but may
+@command{grub2-mkconfig} (@pxref{Invoking grub2-mkconfig}), but may
occasionally also be useful for debugging.
-@command{grub-mkrelpath} accepts the following options:
+@command{grub2-mkrelpath} accepts the following options:
@table @option
@item --help
@@ -6608,17 +6625,17 @@ Print the version number of GRUB and exit.
@end table
-@node Invoking grub-mkrescue
-@chapter Invoking grub-mkrescue
+@node Invoking grub2-mkrescue
+@chapter Invoking grub2-mkrescue
-The program @command{grub-mkrescue} generates a bootable GRUB rescue image
+The program @command{grub2-mkrescue} generates a bootable GRUB rescue image
(@pxref{Making a GRUB bootable CD-ROM}).
@example
grub-mkrescue -o grub.iso
@end example
-All arguments not explicitly listed as @command{grub-mkrescue} options are
+All arguments not explicitly listed as @command{grub2-mkrescue} options are
passed on directly to @command{xorriso} in @command{mkisofs} emulation mode.
Options passed to @command{xorriso} will normally be interpreted as
@command{mkisofs} options; if the option @samp{--} is used, then anything
@@ -6633,7 +6650,7 @@ mkdir -p disk/boot/grub
grub-mkrescue -o grub.iso disk
@end example
-@command{grub-mkrescue} accepts the following options:
+@command{grub2-mkrescue} accepts the following options:
@table @option
@item --help
@@ -6661,15 +6678,15 @@ Use @var{file} as the @command{xorriso} program, rather than the built-in
default.
@item --grub-mkimage=@var{file}
-Use @var{file} as the @command{grub-mkimage} program, rather than the
+Use @var{file} as the @command{grub2-mkimage} program, rather than the
built-in default.
@end table
-@node Invoking grub-mount
-@chapter Invoking grub-mount
+@node Invoking grub2-mount
+@chapter Invoking grub2-mount
-The program @command{grub-mount} performs a read-only mount of any file
+The program @command{grub2-mount} performs a read-only mount of any file
system or file system image that GRUB understands, using GRUB's file system
drivers via FUSE. (It is only available if FUSE development files were
present when GRUB was built.) This has a number of uses:
@@ -6701,13 +6718,13 @@ even if nobody has yet written a FUSE module specifically for that file
system type.
@end itemize
-Using @command{grub-mount} is normally as simple as:
+Using @command{grub2-mount} is normally as simple as:
@example
grub-mount /dev/sda1 /mnt
@end example
-@command{grub-mount} must be given one or more images and a mount point as
+@command{grub2-mount} must be given one or more images and a mount point as
non-option arguments (if it is given more than one image, it will treat them
as a RAID set), and also accepts the following options:
@@ -6729,13 +6746,13 @@ Show debugging output for conditions matching @var{string}.
@item -K prompt|@var{file}
@itemx --zfs-key=prompt|@var{file}
Load a ZFS encryption key. If you use @samp{prompt} as the argument,
-@command{grub-mount} will read a passphrase from the terminal; otherwise, it
+@command{grub2-mount} will read a passphrase from the terminal; otherwise, it
will read key material from the specified file.
@item -r @var{device}
@itemx --root=@var{device}
Set the GRUB root device to @var{device}. You do not normally need to set
-this; @command{grub-mount} will automatically set the root device to the
+this; @command{grub2-mount} will automatically set the root device to the
root of the supplied file system.
If @var{device} is just a number, then it will be treated as a partition
@@ -6753,10 +6770,10 @@ Print verbose messages.
@end table
-@node Invoking grub-probe
-@chapter Invoking grub-probe
+@node Invoking grub2-probe
+@chapter Invoking grub2-probe
-The program @command{grub-probe} probes device information for a given path
+The program @command{grub2-probe} probes device information for a given path
or device.
@example
@@ -6764,7 +6781,7 @@ grub-probe --target=fs /boot/grub
grub-probe --target=drive --device /dev/sda1
@end example
-@command{grub-probe} must be given a path or device as a non-option
+@command{grub2-probe} must be given a path or device as a non-option
argument, and also accepts the following options:
@table @option
@@ -6777,16 +6794,16 @@ Print the version number of GRUB and exit.
@item -d
@itemx --device
If this option is given, then the non-option argument is a system device
-name (such as @samp{/dev/sda1}), and @command{grub-probe} will print
+name (such as @samp{/dev/sda1}), and @command{grub2-probe} will print
information about that device. If it is not given, then the non-option
argument is a filesystem path (such as @samp{/boot/grub}), and
-@command{grub-probe} will print information about the device containing that
+@command{grub2-probe} will print information about the device containing that
part of the filesystem.
@item -m @var{file}
@itemx --device-map=@var{file}
Use @var{file} as the device map (@pxref{Device map}) rather than the
-default, usually @samp{/boot/grub/device.map}.
+default, usually @samp{/boot/grub2/device.map}.
@item -t @var{target}
@itemx --target=@var{target}
@@ -6839,19 +6856,19 @@ Print verbose messages.
@end table
-@node Invoking grub-script-check
-@chapter Invoking grub-script-check
+@node Invoking grub2-script-check
+@chapter Invoking grub2-script-check
-The program @command{grub-script-check} takes a GRUB script file
+The program @command{grub2-script-check} takes a GRUB script file
(@pxref{Shell-like scripting}) and checks it for syntax errors, similar to
commands such as @command{sh -n}. It may take a @var{path} as a non-option
argument; if none is supplied, it will read from standard input.
@example
-grub-script-check /boot/grub/grub.cfg
+grub-script-check /boot/grub2/grub.cfg
@end example
-@command{grub-script-check} accepts the following options:
+@command{grub2-script-check} accepts the following options:
@table @option
@item --help