LinuxCommandLibrary

linux-boot-prober

Detect bootable Linux installations on disks

TLDR

Probe a partition

$ sudo linux-boot-prober [/dev/sdXY]
copy

SYNOPSIS

os-prober [options]

PARAMETERS

-d, --debug
    Enables verbose debugging output, useful for troubleshooting.

-V, --version
    Displays the version information of the os-prober utility.

-h, --help
    Shows a help message and exits.

--skip-external-devices
    Prevents probing of external devices such as USB drives, potentially speeding up the scan.

--only-partitions=PARTITION
    Probes only the specified partition (e.g., /dev/sda1), useful for targeted scans.

DESCRIPTION

While linux-boot-prober is not a standard, runnable command, this analysis focuses on os-prober, which performs the exact function implied by 'boot prober' and is widely used for this purpose, particularly by the GRUB bootloader.

os-prober is a utility designed to automatically detect other operating systems installed on a computer. Its primary role is to assist bootloader configuration tools, such as GRUB's grub-mkconfig, in generating boot entries for multi-boot environments. It scans various disk partitions and filesystems, identifying known signatures of different operating systems (e.g., Linux, Windows, macOS, BSD).

The command outputs its findings to standard output in a structured format, which is then parsed by wrapper scripts (like those in /etc/grub.d/) to build the bootloader's menu. This automation greatly simplifies the process of setting up dual-boot or multi-boot systems.

CAVEATS

The command linux-boot-prober does not exist as a standalone, directly executable utility. This analysis provides information for os-prober, which is the widely used tool performing the 'boot probing' function implied by the user's query.

os-prober typically requires root privileges to mount and inspect partitions. It can take a considerable amount of time to complete if there are many disks or partitions to scan. While generally reliable, it may not detect highly customized or very obscure operating system installations.

HISTORY

os-prober was developed as a key component of the GRUB 2 project to automate the detection of other installed operating systems. Prior to its widespread adoption, configuring GRUB for multi-boot systems often required manual editing of configuration files, which was prone to errors. By automating this discovery, os-prober significantly enhanced the user experience for dual-boot setups and became an integral part of GRUB 2 installations across most Linux distributions, simplifying the complex task of managing multiple bootable environments.

SEE ALSO

grub-mkconfig(8), grub(8), fdisk(8), lsblk(8)

Copied to clipboard