I have a physical machine running Ubuntu 16.04 with a zfs root file system, installed following the instructions at https://github.com/zfsonlinux/zfs/wiki/Ubuntu-16.04-Root-on-ZFS
I installed the bootloader as per instructions:
5.5b For UEFI booting, install GRUB:
grub-install --target=x86_64-efi --efi-directory=/boot/efi \ --bootloader-id=ubuntu --recheck --no-floppy
The system has been running fine for three months, with several reboots (mainly caused by power cuts).
The root pool is a three way mirror:
NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ata-SAMSUNG_HM500JI_S1WFJ90S818624-part1 ONLINE 0 0 0 ata-ST3250820AS_5QE5BVW5-part1 ONLINE 0 0 0 ata-GB0250C8045_9SF0R2RD-part1 ONLINE 0 0 0
Originally I also had a hot-spare included in the pool. This morning, I needed the hot spare for use in another server which had a failed device, so I used zpool remove to remove the hot spare from the system, powered down, and physically removed the spare.
Now the server won't boot.
I've tried selecting all the three remaining physical disks to boot from but no joy.
At present, I have rebooted using a live CD. Following the early steps in the installation instructions above, I can see all the zfs pools, so the data is all there. I think the next step might be to chroot into this zpool but am not sure how to do so given the different ROOT file systems etc.
I am guessing that the GRUB boot information, for some reason, was only installed onto the disk which was designated as "spare" and which I have now removed. The disk in question is now part of a zfs mirror on a different server so it is not possible to put it back.
My question is: what is the easiest way of re-initialising GRUB so that the server will boot? Do I need to chroot into the disk-based system or can this be done from the live-CD environment? If the former, how do I correctly mount the root pool?