LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

grub-probe

probe device and filesystem information for GRUB

TLDR

Name the filesystem module GRUB needs for a path
$ sudo grub-probe --target fs [/boot]
copy
Name the device that holds a path
$ sudo grub-probe --target device [/boot]
copy
Translate a system device into GRUB's own drive name
$ sudo grub-probe --device --target drive [/dev/sda1]
copy
Read the filesystem UUID
$ sudo grub-probe --target fs_uuid [/boot]
copy
Read the filesystem label
$ sudo grub-probe --target fs_label [/boot]
copy
Report the partition table type
$ sudo grub-probe --target partmap [/boot]
copy
Report the MBR partition type byte
$ sudo grub-probe --device --target msdos_parttype [/dev/sda1]
copy
Report abstractions such as LVM or RAID in the path
$ sudo grub-probe --target abstraction [/boot]
copy
Report the UUID of an encrypted container
$ sudo grub-probe --target cryptodisk_uuid [/boot]
copy
Emit the hint strings used in generated GRUB config
$ sudo grub-probe --target hints_string [/boot]
copy
Probe through a custom device map
$ sudo grub-probe --device-map [path/to/device.map] --target drive [/boot]
copy
Show what it is doing while probing
$ sudo grub-probe --verbose --target fs [/boot]
copy

SYNOPSIS

grub-probe [options] -t target path|device

DESCRIPTION

grub-probe extracts device and filesystem information in GRUB's naming format. It is primarily used internally by GRUB tools but is useful for debugging boot configuration.Target types include fs (filesystem module), device (system device path), disk (system disk path), drive (GRUB drive name like hd0), fs_uuid (filesystem UUID), fs_label (filesystem label), partmap (partition map type), partuuid (partition UUID), abstraction (abstraction module like lvm), cryptodisk_uuid, msdos_parttype, gpt_parttype, and various boot hint targets.This tool bridges Linux device names to GRUB's naming conventions, which is essential for generating correct boot configurations.

PARAMETERS

-t, --target TARGET

Information to probe: fs, fsuuid, fslabel, device, disk, drive, partmap, partuuid, abstraction, cryptodiskuuid, msdosparttype, gptparttype, hintsstring, zero_check (default: fs)
-d, --device
Treat argument as a system device, not a path
-m, --device-map FILE
Use custom device map file (default: /boot/grub/device.map)
-0
Separate items in output using ASCII NUL characters
-v, --verbose
Enable verbose output (pass twice for debug printing)

INSTALL

sudo apt install grub-common
copy
sudo pacman -S grub
copy
sudo apk add grub
copy

CAVEATS

Requires root privileges for most operations. Device mapping can change between boots, especially with removable media. GRUB drive naming may differ from Linux device names.

HISTORY

grub-probe is part of GRUB 2's toolset, providing the device detection logic used by grub-install and grub-mkconfig. It replaced simpler detection methods used in GRUB Legacy.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid