Upstream uses "grub" for these commands. Rename to "grub2" is
distro-specific

Le lun. 7 oct. 2024, 21:23, Leo Sandoval <lsand...@redhat.com> a écrit :

> From: Peter Jones <pjo...@redhat.com>
>
> This needs to be hooked up to --program-transform=, but I haven't had
> time.
>
> Signed-off-by: Peter Jones <pjo...@redhat.com>
> ---
>  docs/grub-dev.texi    |   4 +-
>  docs/grub.texi        | 359 ++++++++++++++++++++++--------------------
>  grub-core/kern/misc.c |   2 +-
>  3 files changed, 191 insertions(+), 174 deletions(-)
>
> diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi
> index 1276c5930..04c6678cb 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 a225f9a88..cecf14d55 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
> @@ -223,7 +223,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
> @@ -237,7 +237,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
> @@ -542,7 +542,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:
> @@ -565,7 +565,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
> @@ -592,7 +592,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
> @@ -602,7 +602,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
> @@ -615,7 +615,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
> @@ -626,22 +626,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
> @@ -650,13 +650,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
> @@ -670,7 +670,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
> @@ -682,30 +682,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
> @@ -725,10 +732,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
> @@ -751,7 +758,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
> @@ -767,7 +774,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:
>
> @@ -1269,23 +1276,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:
> @@ -1323,7 +1330,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}).
>
> @@ -1334,7 +1341,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}).
>
> @@ -1481,15 +1488,15 @@ 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
>  disable the use of UUIDs, set this option to @samp{true}.
>
>  @item GRUB_DISABLE_LINUX_PARTUUID
> -If @command{grub-mkconfig} cannot identify the root filesystem via its
> -universally-unique indentifier (UUID), @command{grub-mkconfig} can use
> the UUID
> +If @command{grub2-mkconfig} cannot identify the root filesystem via its
> +universally-unique indentifier (UUID), @command{grub2-mkconfig} can use
> the UUID
>  of the partition containing the filesystem to identify the root
> filesystem to
>  the Linux kernel via a @samp{root=PARTUUID=...} kernel parameter.  This
> is not
>  as reliable as using the filesystem UUID, but is more reliable than using
> the
> @@ -1503,7 +1510,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
> @@ -1514,12 +1521,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
> @@ -1552,20 +1559,20 @@ 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
> -The @command{grub-mkconfig} has a feature to use the external
> +The @command{grub2-mkconfig} has a feature to use the external
>  @command{os-prober} program to discover other operating systems installed
> on
>  the same machine and generate appropriate menu entries for them. It is
> disabled
>  by default since automatic and silent execution of @command{os-prober},
> and
>  creating boot entries based on that data, is a potential attack vector.
> Set
>  this option to @samp{false} to enable this feature in the
> -@command{grub-mkconfig} command.
> +@command{grub2-mkconfig} command.
>
>  @item GRUB_OS_PROBER_SKIP_LIST
>  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
> @@ -1573,11 +1580,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.
> @@ -1636,7 +1643,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
> @@ -1644,14 +1651,14 @@ that file, making sure to leave at least the first
> two lines intact.
>
>  @node Root Identifcation Heuristics
>  @section Root Identifcation Heuristics
> -If the target operating system uses the Linux kernel,
> @command{grub-mkconfig}
> +If the target operating system uses the Linux kernel,
> @command{grub2-mkconfig}
>  attempts to identify the root file system via a heuristic algoirthm.  This
>  algorithm selects the identification method of the root file system by
>  considering three factors.  The first is if an initrd for the target
> operating
>  system is also present.  The second is @samp{GRUB_DISABLE_LINUX_UUID} and
> if set
> -to @samp{true}, prevents @command{grub-mkconfig} from identifying the
> root file
> +to @samp{true}, prevents @command{grub2-mkconfig} from identifying the
> root file
>  system by its UUID.  The third is @samp{GRUB_DISABLE_LINUX_PARTUUID} and
> if set
> -to @samp{true}, prevents @command{grub-mkconfig} from identifying the
> root file
> +to @samp{true}, prevents @command{grub2-mkconfig} from identifying the
> root file
>  system via the UUID of its enclosing partition.  If the variables are
> assigned
>  any other value, that value is considered equivalent to @samp{false}.  The
>  variables are also considered to be set to @samp{false} if they are not
> set.
> @@ -1661,18 +1668,18 @@ filesystem to the initrd.  Most initrd images
> determine the root file system by
>  checking the Linux kernel's command-line for the @samp{root} key and use
> its
>  value as the identification method of the root file system.  To improve
> the
>  reliability of booting, most initrd images also allow the root file
> system to be
> -identified by its UUID.  Because of this behavior, the
> @command{grub-mkconfig}
> +identified by its UUID.  Because of this behavior, the
> @command{grub2-mkconfig}
>  command will set @samp{root} to @samp{root=UUID=...} to provide the
> initrd with
>  the filesystem UUID of the root file system.
>
>  If no initrd is detected or @samp{GRUB_DISABLE_LINUX_UUID} is set to
> @samp{true}
> -then @command{grub-command} will identify the root filesystem by setting
> the
> +then @command{grub2-command} will identify the root filesystem by setting
> the
>  kernel command-line variable @samp{root} to @samp{root=PARTUUID=...}
> unless
>  @samp{GRUB_DISABLE_LINUX_PARTUUID} is also set to @samp{true}.  If
>  @samp{GRUB_DISABLE_LINUX_PARTUUID} is also set to @samp{true},
> -@command{grub-command} will identify by its Linux device name.
> +@command{grub2-command} will identify by its Linux device name.
>
> -The following table summarizes the behavior of the @command{grub-mkconfig}
> +The following table summarizes the behavior of the
> @command{grub2-mkconfig}
>  command.
>
>  @multitable {detected} {GRUB_DISABLE_LINUX_PARTUUID}
> {GRUB_DISABLE_LINUX_UUID} {Linux Root}
> @@ -1900,7 +1907,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
> @@ -1910,20 +1917,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" @{
> @@ -1986,15 +1993,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
> @@ -2029,13 +2036,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
> @@ -2559,7 +2566,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
> @@ -2762,7 +2769,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?
> @@ -2823,7 +2830,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
> @@ -2853,7 +2860,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
> @@ -2905,7 +2912,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
> @@ -3073,8 +3080,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}),
> @@ -3082,8 +3089,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.
>
> @@ -3502,7 +3509,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
> @@ -3592,7 +3599,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.
>
>
> @@ -3600,10 +3607,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.
>
> @@ -3740,7 +3747,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.
>
> @@ -3852,17 +3859,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}).
>
>  @node Modules
> @@ -4924,7 +4931,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
>
>
> @@ -5276,7 +5283,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
>
> @@ -6402,8 +6409,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,
> @@ -6448,7 +6455,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}
> @@ -6474,8 +6481,18 @@ validation fails, then file @file{foo} cannot be
> opened.  This failure
>  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}).
> +using the @code{--pubkey} option to @command{grub2-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
> @@ -6495,8 +6512,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
> @@ -6518,7 +6535,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.
>
> @@ -6566,7 +6583,7 @@ UTF-8 strings as comma-separated values (CSV). See
>  @uref{https://github.com/rhboot/shim/blob/main/SBAT.md} for more details.
>
>  To add a data section containing the SBAT information into the binary, the
> -@option{--sbat} option of @command{grub-mkimage} command should be used.
> The content
> +@option{--sbat} option of @command{grub2-mkimage} command should be used.
> The content
>  of a CSV file, encoded with UTF-8, is copied as is to the .sbat data
> section into
>  the generated EFI binary. The CSV file can be stored anywhere on the file
> system.
>
> @@ -6977,10 +6994,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
> @@ -7006,8 +7023,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
> @@ -7019,7 +7036,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.
>
> @@ -7054,33 +7071,33 @@ bootability on other machines.
>  @chapter User-space utilities
>
>  @menu
> -* 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
>  @end menu
>
>
> -@node Invoking grub-install
> -@section Invoking grub-install
> +@node Invoking grub2-install
> +@section 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
> @@ -7096,13 +7113,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
> @@ -7110,16 +7127,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
> @@ -7132,17 +7149,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
> -@section Invoking grub-mkconfig
> +@node Invoking grub2-mkconfig
> +@section 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
> +grub2-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
> @@ -7158,17 +7175,17 @@ it to standard output.
>  @end table
>
>
> -@node Invoking grub-mkpasswd-pbkdf2
> -@section Invoking grub-mkpasswd-pbkdf2
> +@node Invoking grub2-mkpasswd-pbkdf2
> +@section 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
> +grub2-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}
> @@ -7186,23 +7203,23 @@ Length of the salt.  Defaults to 64.
>  @end table
>
>
> -@node Invoking grub-mkrelpath
> -@section Invoking grub-mkrelpath
> +@node Invoking grub2-mkrelpath
> +@section 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
> @@ -7213,17 +7230,17 @@ Print the version number of GRUB and exit.
>  @end table
>
>
> -@node Invoking grub-mkrescue
> -@section Invoking grub-mkrescue
> +@node Invoking grub2-mkrescue
> +@section 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
> +grub2-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
> @@ -7235,10 +7252,10 @@ commonly used to add extra files to the image:
>  @example
>  mkdir -p disk/boot/grub
>  @r{(add extra files to @file{disk/boot/grub})}
> -grub-mkrescue -o grub.iso disk
> +grub2-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
> @@ -7266,15 +7283,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
> -@section Invoking grub-mount
> +@node Invoking grub2-mount
> +@section 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:
> @@ -7306,13 +7323,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
> +grub2-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:
>
> @@ -7334,13 +7351,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
> @@ -7349,7 +7366,7 @@ an entire disk in @file{disk.img}, then you can use
> this command to mount
>  its second partition:
>
>  @example
> -grub-mount -r 2 disk.img mount-point
> +grub2-mount -r 2 disk.img mount-point
>  @end example
>
>  @item -v
> @@ -7358,18 +7375,18 @@ Print verbose messages.
>  @end table
>
>
> -@node Invoking grub-probe
> -@section Invoking grub-probe
> +@node Invoking grub2-probe
> +@section 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
> -grub-probe --target=fs /boot/grub
> -grub-probe --target=drive --device /dev/sda1
> +grub2-probe --target=fs /boot/grub
> +grub2-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
> @@ -7382,16 +7399,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}
> @@ -7444,19 +7461,19 @@ Print verbose messages.
>  @end table
>
>
> -@node Invoking grub-script-check
> -@section Invoking grub-script-check
> +@node Invoking grub2-script-check
> +@section 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
> +grub2-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
> diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
> index 465a8e74e..b1d399d37 100644
> --- a/grub-core/kern/misc.c
> +++ b/grub-core/kern/misc.c
> @@ -1303,7 +1303,7 @@ void __attribute__ ((noreturn))
>  grub_abort (void)
>  {
>  #ifndef GRUB_UTIL
> -#if defined(__i386__) || defined(__x86_64__)
> +#if (defined(__i386__) || defined(__x86_64__)) &&
> !defined(GRUB_MACHINE_EMU)
>    grub_backtrace();
>  #endif
>  #endif
> --
> 2.46.2
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to