Getting recognition from Linux / Part Two - Recognizing Haiku

Article contributed by Idefix on Tue, 2011-02-22 22:40
This article was written when Ubuntu 10.10 was the latest version. Starting with Ubuntu 11.04 (Natty Narwhal), Haiku should be recognized out of the box. Just run sudo update-grub to add it to the GRUB menu.

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:

sudo update-grub

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.


Re: Getting recognition from Linux / Part Two - Recognizing ...

Nice, I didn't notice the 'Part 2' until now. Thanks for creating these [hopefully temporary] packages and sending patches upstream. File system interoperability has advanced to a point where I'm no longer missing anything, personally. :)

Re: Getting recognition from Linux / Part Two - Recognizing ...

Great work ;)

Re: Getting recognition from Linux / Part Two - Recognizing ...

On my netbook running Ubuntu Natty, when a BeFS partition is mounted using the FUSE driver, os-prober will not detect the installation. When mounted using the kernelspace driver or when not mounted at all, os-prober detects it without issue. Unfortunately, I cannot figure out how to get verbose output from os-prober (tried -V, -v and --verbose) since there is no --help and no man page for the utility, so I cannot give you any additional information than my distro. There doesn't seem to be any facility for sending Private Messages on this site, and you don't have an email listed on, but if you need any additional information, you can send me email. The address is my nickname in lowercase at hotmail.