* util/grub.d/40_custom.in: New file. Example on how to add custom
entries to /etc/grub.d.
* conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
40_custom (implicitly, by merging all the grub.d rules).
* util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
"/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
Linux image includes no initrd.
* util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
call from here ...
* util/grub.d/10_hurd.in: ... to here ...
* util/grub.d/10_linux.in: ... and here.
* util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
* util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
the `root' parameter to Linux.
* util/grub.d/00_header.in: Remove obsolete comment referencing
convert_system_path_to_grub_path().
* util/update-grub.in: Likewise.
* util/update-grub_lib.in (is_path_readable_by_grub): New function.
(convert_system_path_to_grub_path): Add a warning message explaining
that this function is deprecated. Rely on is_path_readable_by_grub()
for the readability checks.
(font_path): Use is_path_readable_by_grub() for the readability
check rather than convert_system_path_to_grub_path().
* util/update-grub_lib.in (prepare_grub_to_access_device): New function.
* util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
converting it first.
* util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
grub.cfg for access to font file, and afterwards call it again to set
the root device.
* commands/search.c (options): Add --fs_uuid option.
(search_fs_uuid): New function.
(grub_cmd_search): Fix --set argument passing.
Use search_fs_uuid() when requested via --fs_uuid.
(grub_search_init): Update help message.
* fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
and redeclare it as an array of 16-bit words.
(grub_ext2_uuid): New function.
(grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
* include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
* util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
(GRUB_DEVICE_BOOT_UUID): New variables.
(GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
* util/grub.d/00_header.in: Set root using `search --fs_uuid' command
whenever possible.
* util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
just assume `root' variable has the right value.
* util/grub.d/10_linux.in: Likewise.
* util/grub-probe.c (probe): Probe for filesystem UUID when requested
via PRINT_FS_UUID.
(main): Recognise `-t fs_uuid' argument.
Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
* util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
first boot option.
* util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
* util/grub.d/30_os-prober.in: New script. Use `os-prober' and
`linux-boot-prober' (if installed) to detect other operating
systems which are installed on the computer and add them to
the boot menu.
* conf/common.rmk: Build and install 30_os-prober.
* include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
(grub_util_get_dev_abstraction): New function prototype.
* util/getroot.c: Include `<grub/util/getroot.h>'
(grub_util_get_grub_dev): Move detection of abstraction type to ...
(grub_util_get_dev_abstraction): ... here (new function).
* util/grub-probe.c: Convert PRINT_* to an enum. Add
`PRINT_ABSTRACTION'.
(probe): Probe for abstraction type when requested.
(main): Understand `--target=abstraction'.
* util/i386/efi/grub-install.in: Add abstraction module to core
image when it is found to be necessary.
* util/i386/pc/grub-install.in: Likewise.
* util/powerpc/ieee1275/grub-install.in: Likewise.
* util/update-grub_lib.in (font_path): Return system path without
converting to GRUB path.
* util/update-grub.in: Convert system path returned by font_path()
to a GRUB path. Use `grub-probe -t abstraction' to determine what
abstraction module is needed for loading fonts (if any). Export
that as `GRUB_PRELOAD_MODULES'.
* util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
insmod commands).
* util/update-grub_lib.in (grub_file_is_not_garbage): New function.
Determines if a file is garbage left by packaging systems, etc.
* util/update-grub.in: Use grub_file_is_not_garbage() as a condition
for processing /etc/grub.d scripts.
* util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
* util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
as a condition for processing Linux images.
* util/update-grub_lib.in (font_path): New function. Determine wether
a font file can be found and, if so, echo the GRUB path to it.
* util/update-grub.in: Handle multiple terminals depending on user
input, platform availability and font file presence. Propagate
variables of our findings to /etc/grub.d/ children.
* util/grub.d/00_header.in: Handle multiple terminals, based on
environment setup by update-grub.
* util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
file doesn't exist, or if it is in a filesystem grub can't read.
* util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
not abort if GRUB_DRIVE could not be defined. Rearrange generated
header comment to fit in 80 columns when the variables are resolved.
* util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
could be identified by update-grub. Remove redundant check for
unifont.pff existance (since convert_system_path_to_grub_path now
handles that).
* util/update-grub_lib.in: New file.
* DISTLIST: Add update-grub_lib.in.
* conf/common.rmk: Generate update-grub_lib and install it in
$(lib_DATA).
* Makefile.in: Add install routine for $(lib_DATA).
* util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
function provided by update-grub_lib to support arbitrary paths of
unifont.pff.
* util/update-grub.in: Use convert_system_path_to_grub_path() to
initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
* util/update-grub.in: Fix a few assumptions about the devices holding
/, /boot and /boot/grub being the same.
* util/grub.d/00_header.in: Likewise.
* util/grub.d/10_hurd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
patterns. Use that to define the `.old' suffix as older than `'.
* util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
* util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
the grub.cfg header message.