Getting recognition from Linux / Part Two - Recognizing Haiku
When I switched from Windows to Ubuntu, not only did I wonder why it wouldn't recognize the BFS file systems, but also why Windows would automatically get added to the GRUB menu, but Haiku wouldn't.
GRUB 2 uses its 30_os-prober script to detect other installed operating systems and add them to the menu. This script, in turn, uses the os-prober utility to do the actual detecting. You can try it out with sudo os-prober to get a summary of all the recognized operating systems.
This utility didn't have any code to detect Haiku, so I wrote a module that will look for the Haiku stage 1 bootloader, stage 2 bootloader and kernel. If all three are found, it will return the necessary information for GRUB to create a menu entry.
When I was about to submit the module to the maintainers, I discovered that François Revol had already submitted a module to detect Haiku. But as it only checked for the stage 2 bootloader and was ignored by the maintainers for more than six months, I also submitted my module and after two days it got accepted. As of os-prober v1.44, Haiku will be recognized by it.
Current versions of Ubuntu won't update to the newer os-prober version, so I made a modified package and added it to my Personal Package Archive (PPA). When you have followed the steps outlined in the previous article, you will also receive the modified os-prober package when you update your system. After that, Haiku will automatically get added to the GRUB menu when you update the GRUB menu with:
Questions & Answers
How do I disable automatically adding of Haiku (and other operating systems) to the GRUB menu?
You can disable the 30_os-prober script by adding the following line to the /etc/default/grub file and then update the GRUB menu: GRUB_DISABLE_OS_PROBER="true"
How about other distributions?
Most distribution based on Debian should have os-prober and there is a ticket asking for inclusion in Fedora. If you use a different distribution, you will have to consult its package information whether it comes with os-prober v1.44 or higher.