Loader integration

The work on porting FreeBSD loader to illumos-gate has been recently integrated and loader bits are present in
OpenIndiana package repository now.
This concerns all OpenIndiana Hipster users. Briefly, when you update to the latest OpenIndiana Hipster AND do beadm activate,
grub will be replaced with loader.

Loader fixes a lot of issues (most annoying is the limit on the count of boot environments (BE)) and brings in support for new features,
like support for booting from raidz root pool, but after installing loader to activate older BEs (which don’t have loader userland binaries) you’ll
have to interact with loader (i.e. have console access). Newer BEs, which have loader userland bits, can be safely activated.

If you have console access, to load old (pre-loader) BE, you can do from loader prompt:

ok beadm activate bename
ok load -t rootfs /platform/i86pc/amd64/boot_archive
ok boot

where “ok” is a loader prompt.

To keep grub as your current loader, you can create file /etc/default/be
with the following line:


Note, that in future grub support will be completely removed from illumos-gate.

There is a known issue – in case of *not* whole disk setup, MBR will not be updated by “beadm activate” or “bootadm install-bootloader”.
In this case you can do “installboot -mF /boot/pmbr /boot/gptzfsboot /dev/rdsk/devicename” to install loader, for example:

# /usr/sbin/installboot -mF  /boot/pmbr /boot/gptzfsboot /dev/rdsk/c2t0d0s0
Updating master boot sector destroys existing boot managers (if any).
continue (y/n)? y
bootblock written for /dev/rdsk/c2t0d0s0, 216 sectors starting at 1024 (abs 33154)
stage1 written to slice 1 sector 0 (abs 16065)
stage1 written to master boot sector

Detailed announcement about loader integration can be found in illumos announce mailing list.

Additional information can be found here.