grub-probe
Detect GRUB information about a device or file
SYNOPSIS
grub-probe [OPTION...] [PATH]
PARAMETERS
--device DEVICE
Probe only this device. If not specified, probe all block devices.
--target=TARGET
Print the specified TARGET information instead of the device.
--directory=DIR
Search for files in DIR instead of the current directory.
--file=FILE
Search for FILE to find the root device.
--no-warn
Suppress warnings.
--verbose
Be verbose.
--help
Display help message and exit.
--version
Display version information and exit.
DESCRIPTION
The `grub-probe` command is a utility used to gather information about various devices and filesystems, specifically to aid GRUB (Grand Unified Bootloader) in identifying them. It's commonly used during GRUB configuration to determine device paths (e.g., `/dev/sda1`) and filesystem types. `grub-probe` employs various heuristics and checks to determine this information. The tool can identify the root filesystem, partition layout, and other boot-related aspects. By default, grub-probe prints the device corresponding to the given path and optionally prints more device info. The most frequent use is finding the root device on which the OS is installed.
TARGETS
Possible --target values include:
fs: Filesystem type.
device: Device associated with the path (default).
drive: The drive device.
abstraction: Abstraction level.
Other targets exist for specialized GRUB configurations.
USAGE EXAMPLES
grub-probe /boot/grub: Determine the device containing the /boot/grub directory.
grub-probe --target=fs /boot: Find the filesystem type of /boot.
SEE ALSO
grub-install(8), grub-mkconfig(8)