The currently used boot loader for Illumos is based on multiboot 1 and grub-0.97. Grub does provide ability to boot from disk, cd and network. Disk based boot is enabled to use both MBR/SMI (VTOC) disk label partitions and GPT based partitioning. While Illumos is able to boot from UFS file system, the primary and supported generic purpose disk based file system is ZFS.
In addition to boot loader itself, Illumos has set of tools and technologies to maintain the boot loader and boot environments:
- boot loader installion (installgrub command)
- Boot Environment management (beadm command and libbe library to build and maintain zfs clone based copies of operating system images)
- boot menu and boot archive management (bootadm command)
- other boot menu and BE aware tools (halt/reboot command, svc.startd service, sysevent handler to name some).
While grub-0.97 is able to provide the basic functionality, its design and implementation sets limits on adoption and implementation of new technologies and updates. This is the reason to look for alternate solution. The goal is to implement an loader to provide at least same set of base functionality as current grub does both for booting and management, to allow to implement feature updates and not to lock the loader itself to specific version or code base.
The first possible option investigated was Grub 2. The project did start up by testing grub-1.99 from Oracle Solaris 11, published by Oracle as this version was known to work and and therefore was providing good starting point. However, some minor problems did appear related to compiler support needed for specific code base, but it was proven the Grub 2 indeed is usable. The next step was to check out the Grub 2 upstream version, 2.02 beta, and it has much better compiler support. However, while Grub 2 most certainly does have very rich feature set, its licensing scheme used, even if will allow integration with Illumos, implementing future Illumos needs may prove problematic due to licensing. Tested, working, and boxed for time being.
Second option was to check boot loader implemented in FreeBSD. While adopting FreeBSD boot loader does require much more work as it is tailored to fit specifically FreeBSD needs and not intended to be generic multi-OS boot loader, the licensing scheme is much friendlier and the base functionality does what we need. Therefore most of this section is actually about this boot loader and its integration.
Current project source tree: https://github.com/tsoome/illumos-gate/tree/loader as this is long project, it will receive forced updates some times (unless I will be taught to use git properly).
FreeBSD CURRENT: https://www.freebsd.org/doc/handbook/current-stable.html