os-prober is a spinoff of debian-installer. One of the installer's features is that it can probe disks on the system for other operating systems, and add them to the boot loader, so that installing Debian doesn't make your other installed OS hard to boot.

To do this it needs to both be able to find out what version of what OS lives in a given partition (linux, windows, dos, macos, the hurd, solaris, qnx, minix). It also needs to work out how to boot existing installed linux systems, and has to be able to detect what distribution is installed, to add a better menu entry to grub than just "linux".

The program Josh Kwan and I developed for d-i to do this is quite flexible, new OSes and linux distros can be added by just dropping in a test file to check for them. It's fairly good at probing all the info needed to boot some installation of linux (the root, and /boot partitions, a kernel, an initrd, and kernel parameters). Since every version of linux does things slightly differently, this is no mean feat, techniques used include parsing /etc/fstab, rummaging around in /boot, parsing grub menu.lst files, etc.

os-prober can also be installed and used on a regular Debian system, and one of my goals is to find uses for it outside of d-i, and hopefully grow the number of contributors to it, so that it becomes able to detect even more OSes and linux variants. Some possible other uses include:

  • Use by other installers than d-i.
    • I've been told that Frugalware 0.5 will use it.
  • Using os-prober to eg, generate a grub menu.lst file for a running system.
  • Use on a live CD or rescue disk to enumerate OSes

It can be downloaded from http://packages.debian.org/unstable/utils/os-prober.

Questions or bug reports should be directed to the debian-installer team, not me personally.