Trouble booting after switching root on ZFS from SATA to NVMe (on UEFI)

Hey all, I’ve got an interesting conundrum.

I installed Antergos to a ZFS root on a SATA SSD initially, and I’m now trying to migrate to an NVMe drive, but I’m having a bit of trouble.

My computer is a Lenovo T580, so NVMe booting is supported. I even had to order a special cable to put the NVMe in the 2.5" bay. (why Lenovo, just why) I’m not concerned with Secure Boot, so I’m not using it.

After installing the NVMe, I hooked the SATA drive up to a USB adapter, booted up the Antergos live USB, and created identical GPT partitions on the NVMe to the SATA (p1 for ESP formatted fat32, p2 for /boot formatted ext4, p3 for zpool), and I added the p3 as a mirror to the SATA pool, then removed the SATA from the pool after resilvering completed.

I used cp to copy the files from /boot and /boot/efi on the SATA to their respective partitions on the NVMe, changed the UUIDs for both partitions in /etc/fstab, and ran mkinitcpio -p linux.

Upon rebooting, I was greeted with a grub rescue shell, with the error: error: no such device: UUID which is the UUID for /boot. Doing ls reveals only (hd0), so I’m guessing that grub sees the NVMe device, but can’t see the partitions on it. Grub is installed from the grub-zfs package provided by Antergos.

I’ve also tried using systemd-boot, but it complains that it cannot mount the dataset. My root line reads: root=zfs=pool/ROOT/antergos, which I think is correct.

I haven’t played with rEFInd before, so I haven’t tried that yet. Has anyone used this combination before (UEFI, NVMe and root on ZFS), and gotten it to work?

Sounds like you need to update the uuid in your grub config

Ahh, I may have forgotten to mention that in the OP, but I did update the grub config. When grub boots, it is complaining about not being able to find the UUID that is correct for the new /boot partition on the NVMe disk.

Does grub need special drivers for nvme or something?

That part I don’t know. Ubuntu installs without issue on NVMe, (albeit without the ZFS part), but a perusal of /boot on my Ubuntu machine running NVMe doesn’t reveal anything obvious to me.

You can see the partitions on the NVMe once you boot into linux, right? If that is the case but GRUB doesn’t see them, I’d lean towards whatever specific version of grub you installed being the issue, perhaps something as simple as a missing module to be loaded by the config or maybe it’s a special thing Ubuntu added to their version of GRUB (everyone ships a different random grub version because grub hasn’t had an actual release in years)