according to https://github.com/ryao/zfs-overlay/blob/master/zfs-install
i used sgdisk to create another partition (2) from 34 to 2047 which was
enough to hold grub2 data for me and boot from it without any problems.
Number Start (sector) End (sector) Size Code Name
1 2048 41945079 20.0 GiB BF01 boot
2 34 2047 1007.0 KiB EF02 grub
3 41945088 44042239 1024.0 MiB BF01 data-zil-1
4 44042240 117231374 34.9 GiB BF01 data-cache-1
(ok, i probably shouldn't put ZIL and CACHE for another pool onto the
boot SSDs but i did it anyway and it works nicely since the boot pool is
99% idle after the server started).
Since /sgdisk -n2:48:2047 -t2:EF02 -c2:bios_grub//<dev>/ is all you
need to make the partition after a zpool create on an empty drive, i
don't see a need to build this into ZFS.
Post by Schlacta, Christ
Can we have zfs create an extra 1mb partition, preferably at the start
of the disk, and set it up as bios_grub, possibly with an optional
flag, so that we can use whole disks when creating bootable pools?
It looks like the 8MB at the end (partition #9) is just there for EFI
booting. Would I harm anything (besided EFI booting) by removing it?
Do tools/OSs expect/require that partition if I am not EFI booting?
Partition #9 is created by the tools to be consistent with the Illumos
behavior but is otherwise completely unused. You should be able to
remove it safely without ill effect at least when using ZoL. I'm not
sure how things will behave on other platforms.
This came up because I'm trying to figure out if I could break my ZFS
mirror and LUKS encrypt the underlying disk and then re-mirror
(thread: Encrypt underlying disks after the fact?).
If ZFS isn't using that last 8MB then I could redo partition 1 to span
the entire disk and have enough blocks to reformat with LUKS.