Skip to end of metadata
Go to start of metadata


Loader is packaged as pkg:/system/boot/loader

Loader files will be installed to BE /boot directory as following:

/bootbase directory 
/boot/cdbootCD loader boot blockloads zfsloader
/boot/conf.ddirectory for config snippetscontent is sorted lexicographically and will override defaults
/boot/defaultsdefault config

contains default generic loader.conf

/boot/forthforth scriptsBootForth support scrips
/boot/gptzfsbootboot block loading from GPT labeled zfs poolto be installed to pool bootblock area. boot2 stage.
/boot/loader.conf"main" custom loader.conffor system specific generic options
/boot/loader.helpsimple online help 
/boot/loader.rcloader initial startup configwill load other forth files
/boot/pmbrProtected MBR binarylocates illumos "usr" partition and loads gptzfsboot
/boot/pxebootPXE boot program with tftp supportexpects tftpboot/boot directory, copy defaults, loader.conf, forth, zfsloader and copy loader.rc to pxeboot.rc
/boot/solaris/bootenv.rckernel propertiesmanaged by eeprom command, sets initial kernel and loader properties
/boot/transient.confone time boot settingsmanaged by bootadm command
/boot/zfsloaderzfs+ufs aware loader programboot3 stage, loaded by boot2 (or pxeboot or cdboot) from file system

The current  usable scenarios are pxeboot (tested with smartos), cdboot (used customised distro constructor) and disk boot with GPT labeled disk. Altho the zfs loader does work with 4k blocks, the pmbr/gptzfsboot code assumes 512B blocks and 4k most likely wont work - definitely not tested.

To install boot pmbr/gptzfsboot, use installboot(1M) command:

installboot -m /boot/pmbr /boot/gptzfsboot /dev/rdsk/cXtYd0s0

The source has additional updates for illumos: relaxed/removed checks for setting bootfs property on raidz (loader supports raidz), allowing gzip compression (loader currently does no support gzip compression) and allowing large blocks (loader supports large blocks). Also bootfs ( 5886 & 5887) update is applied on this fork.

sample loader.conf settings to set autoboot timeout and console mirror for loader:



The /boot/defaults/loader.conf will cause boot_archive and boot_archive.hash loaded:

boot_archive_load="YES"         # illumos will not boot without rootfs



boot_archive.hash_load="YES"    # use hash file as it will use ISADIR



Note: bootadm is updated to create hash, but till this update has not been integrated to illumos-gate, you may need to create hash manually after first boot with "bootadm update-archive -f".

example use of bootfs feature:







zfsloader config files are loaded in following order: /boot/solaris/bootenv.rc, /boot/defaults/loader.conf, /boot/loader.conf, config files from /boot/conf.d directory, /boot/transient.conf. /boot/conf.d directory is sorted lexicographically to make it possible to set order of the config snippets. transient.conf is only managed by bootadm to allow to set temporary, one time config options, transient.conf is removed on next multiuser runlevel startup.


pxeboot is updated to include DHCP ack structure in multiboot info to pass data to kernel same way as it is implemented in grub.


The Options section is updated to provide access for selected set of illumos kernel options. To support menu system, loader will parse boot-args variable after processing config files to set variables for individual options. The boot-args is rebuilt on boot command. This logic means the boot-args should be avoided in favour of individual options as there is no way to determine the processing order while setting variables.

The current boot code also will ignore environment if command line options are set for loaded files or options are used with boot command.


Loader will load BE based on pool bootfs property. Loader files are loaded from BE root dataset, or pool/boot if bootfs is not set.

To switch BE or pool and BE, loader has beadm command. Current beadm implementation is for proof of concept and can probably be implroved. Also the beadm list does not have pager support, so very long  list can be an issue on vidconsole. Current beadm in loader is using SPARC style pool/boot/menu.lst, which will be  created/updated by beadm.  By default beadm and bootadm have grub menu functions disabled, to switch beadm/bootadm to use grub menu management functions, set BE_HAS_GRUB=true environment variable for those commands.

Development support for Forth

To support Fort development and provide an access to BootForth environment and ficl scripting in general, the loader package does include libficl shared library and headers, also standalone ficl application is provided. The libficl is built to include set of loader specific functions to make it possible to emulate loader environment. Since some loader functions are tightly related to actual loading and boot and accessing hardware related information, not all functions are available and some functions are just stubs - for example load/unload and boot/reboot/autoboot are stubs.

Another limit is about terminal control, the current loader code support for terminal emulation is very limited and specifically tuned for x86 console. Therefore there are some artifacts related to ESC sequence use.

Also note that emulation mode still needs to be debugged and is buggy in some areas.

To access loader functionality, ficl needs to load loader scripts as for example:

$ ficl /boot/loader.rc   # load all the current loader environment

$ ficl /boot/forth/loader.4th  # only load loader support functions

$ ficl

ok include /boot/loader.rc   \  load loader environment from emulator.

The file access from emulator is controlled by currdev environment variable, and it has the same syntax as in real loader, zfs:dataset: Note the emulator will not mount datasets, the datasets have to be mounted before attempting to access files.

OS Management tools

libbe (completed)

libbe supports <pool>/boot/menu.lst updates, its the same code used for SPARC platform support.

libbe implements be_get_boot_args() interface to retrieve and provide kernel arguments to support fast boot. This is replacement interface for grub_get_boot_args() provided by libgrubmgmt.

libbe does boot loader install/update.

halt and svc.startd (completed)

halt/reboot and svc.startd are updated to use be_get_boot_args() call from libbe and are therefore able to provide fastboot argument for kernel. libgrubmgmt dependency is removed and there are no more consumers for libgrubmgmt.

bootadm (completed)

bootadm updates are done.

  • set-menu
  • list-menu
  • added install-bootloader command
  • internal, undocumented menu management arguments

bootloader install (completed)

bootloader install support is implemented via installboot command. boot2 versioning is implemented by using extended version components. 

eeprom (completed)

eeprom command is cleaned of grub menu file update. Still the eeprom/bootenv.rc needs more investigation about interacting with loader.

fs.d/zfs/bootinstall/ (syseventd handler script) is updated to use bootadm install-bootloader to update bootblocks. bootinstall update is integrated to illumos-gate.