Hi Ozpos, thanks for the details — this is almost always caused by /boot and /boot/efi not being mounted at the moment the kernel/grub scripts run. In that case, the new kernel/initramfs/grub files may be written to the ZFS root dataset instead of the ext4 /boot, and GRUB ends up booting from an older EFI entry.
Quick repair (one time)
- Make sure
/boot and /boot/efi are mounted (replace devices if yours differ):
sudo findmnt /boot /boot/efi
If they are not mounted:
sudo mount /dev/vda2 /boot
sudo mount /dev/vda1 /boot/efi
-
Regenerate initramfs and GRUB:sudo update-initramfs -u -k all
sudo update-grub
-
Reinstall GRUB to EFI (removable path) so the firmware always finds it:
sudo grub-install
–target=x86_64-efi
–efi-directory=/boot/efi
–bootloader-id=Synex
–no-nvram
–removable
–recheck
sudo mkdir -p /boot/efi/EFI/BOOT
sudo cp -f /boot/efi/EFI/Synex/grubx64.efi /boot/efi/EFI/BOOT/BOOTX64.EFI || true
sudo sync
- If your system has multiple disks (ZFS RAIDZ/mirror), replicate boot + EFI to the others:
sudo synex-boot-redundancy sync
If any target /boot partition is unformatted/corrupted, use once:
sudo synex-boot-redundancy sync --reformat
Prevent it from happening again
Make sure /boot and /boot/efi are always mounted via /etc/fstab, so kernel/grub updates write to the correct partitions.
Quick example (device paths):
/dev/vda1 /boot/efi vfat defaults,relatime 0 2
/dev/vda2 /boot ext4 defaults,relatime 0 2
Recommended (stable, using UUIDs):
- Get the UUIDs:
sudo blkid /dev/vda1 /dev/vda2
- Add them to
/etc/fstab:
UUID= /boot/efi vfat defaults,relatime 0 2
UUID /boot ext4 defaults,relatime 0 2
- Test it (without rebooting):
sudo umount /boot/efi /boot 2>/dev/null || true
sudo mount -a
findmnt /boot /boot/efi
Once this is in place, future kernel upgrades should update GRUB correctly without needing manual mounts.