Booting from ZFS

So I have received the UART cable, and had a little time to try it out.
But as it turns out, when I install NixOS on the ZFS array, the entire thing doesn’t come further than the boot screen. Doesn’t even get to the boot menu so that I can select a NixOS generation.
If I select the drive manually (and yes it should be the correct one) I just get dumped back into the UEFI setup menu (I’m using EDK2).
I think I’m out of ideas here. Something is deeply broken :confused:

1 Like

Oh. You’re not even getting to the boot loader. It sounds like your EDK2 build doesn’t support booting from the NVMe at all.

er, wait, no, you showed getting into the kernel at one point. Was that maybe a kernel / boot loader left behind on the emmc or something?

1 Like

Yeah that screenshot is all on eMMC, left behind on purpose so that, when experimenting with ZFS, I’d have something to fall back on rather than needing to jump all the way back to step 1 below.

The flow I use is basically:

  1. Assume EDK2 is installed.
  2. Boot armbian from an SD card, complete with DT entries. So it’s slow, and not directly usable long term. But it’s quite usable for step 2.
  3. Install NixOS from armbian to the eMMC drive using nixos-install. During this process I also install the bootloader to one of the eMMC partitions, which is marked with a EFI flag.
  4. Boot NixOS from the eMMC drive.
  5. Import my ZFS array (the armbian image is too old to do this, otherwise if try installing directly to ZFS + SSD array using RAIDZ1)
  6. Install NixOS to ZFS from the NixOS-on-eMMC. I’ve tried 2 different things w.r.t. the bootloader here, first to install to one of the SSDs (that’s a partition I created on each SSD separate from the ZFS array, again with EFI flag. It’s created on each SSD for symmetry purposes), and after that I finally tried the bootloader on eMMC. The latter zif successful, would be workable but less than ideal.

Of course, step 5 always fails, and when I install the bootloader to eMMC, it overwrites the bootloader I had that booted NixOS-on-eMMC, so that borks the device when it fails, necessitating a jump back to step 1.

So that’s where things stand right now.