Feature #5561


support root pools on EFI/GPT partitioned disks

Added by Hans Rosenfeld over 7 years ago. Updated over 7 years ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


With the change for #5560 our grub can use EFI/GPT partitioned disks, so there is no reason why we shouldn't allow root pools to use that partitioning. In particular that allows root pools to use whole disk vdevs and large disks (>2TB).

This needs the following changes in our tools and libraries:

  1. installgrub(1M) needs to learn about EFI/GPT disk labels. Two things need to change: we need to find a suitable place to store grub stage2, and we must not set the SMI slice number in stage2 as that doesn't exist in this case.
    In fdisk-partitioned disks stage2 is stored in the boot slice (first cylinder of the illumos fdisk partition), but there is no such thing on EFI labeled disks. As it happens ZFS has a 3.5MB reserved-for-future-use space just following the first two vdev labels, which according to the on-disk format description is even intended for boot loaders. Therefore this is the perfect spot to store stage2, which in turn means that installgrub(1M) needs to check that the filesystem in use is really ZFS.
  2. libbe needs to installgrub(1M) with the -m -f flags for vdevs in EFI/GPT partitions. It is necessary to install grub stage1 in the MBR of the disk as a standard MBR would not be able to load it from a EFI/GPT partition. To reduce the risk of overwriting other boot loaders we do not do that if any partition is found that has a GUID not used by illumos.
  3. bootadm(1M) needs to be changed to write the grub findroot command without the specification of a slice letter into menu.lst for vdevs in EFI/GPT partitions.
  4. libgrubmgmt needs to accept the new findroot format.
  5. ZFS and libzfs/zpool need all checks removed that prevent root pool functionality when vdevs in EFI/GPT partitions exist. (see #5125 and #5120)

Related issues

Related to illumos gate - Bug #397: illumos cannot boot from a device with an EFI labelResolved2010-11-04

Actions #2

Updated by Electric Monk over 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 1a902ef8628b0dffd6df5442354ab59bb8530962

commit  1a902ef8628b0dffd6df5442354ab59bb8530962
Author: Hans Rosenfeld <>
Date:   2015-02-20T23:00:32.000Z

    5561 support root pools on EFI/GPT partitioned disks
    5125 update zpool/libzfs to manage bootable whole disk pools (EFI/GPT labeled disks)
    Reviewed by: Jean McCormack <>
    Reviewed by: Josef 'Jeff' Sipek <>
    Approved by: Dan McDonald <>

Actions #3

Updated by Joshua M. Clulow over 5 years ago

  • Related to Bug #397: illumos cannot boot from a device with an EFI label added

Also available in: Atom PDF