How to repair grub after upgrade on HP 355

Hi Bruno hope you are well. I have just updated + upgraded and the kernel was rebuilt resulting in having to exit from grub and boot from grub efi file.

Could you please suggest a repair and what to do to prevent this occuring ?

Best regards,

Ozpos

P.S. Are there any logs you would like to see ?

Hi Ozpos, hope you’re doing well. Can you boot your system now? Are you in XFCE with ZFS (from the last manual installation from synex server)?

Hi Bruno, I am well thank you.

Yes I am running xfce-desktop installed on on u7 server.

I can boot by exiting grub prompt and boot from file /boot/efi/EFI/Synex/grubx64.efi

In doing so /boot remains mounted.

Ozpos

1 Like

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)

  1. 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

  1. Regenerate initramfs and GRUB:sudo update-initramfs -u -k all
    sudo update-grub

  2. 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

  1. 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):

  1. Get the UUIDs:

sudo blkid /dev/vda1 /dev/vda2

  1. Add them to /etc/fstab:

UUID= /boot/efi vfat defaults,relatime 0 2
UUID /boot ext4 defaults,relatime 0 2

  1. 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.

Hi Bruno, Thank you for your help.

The one-time fix worked however on this old laptop I had to enter the BIOS and toggle legacy mode back and forth before a clean boot worked.

All is OK now thank you very much.

Interestingly my fstab entries were correctly using UUIDs so I am am not sure what messed up during the upgrade to 13.1.

Best Regards,

Ozpos

1 Like