system: FreeBSD v13.0-p7
reason: the bootloader is broken (e.g. after update)
solution: reinstall the bootloader(s) to your boot disk(s)
example: zroot (2-disk zfs-mirror with GPT partition tables)
- download a bootable FreeBSD-Image
(e.g.FreeBSD-13.0-RELEASE-amd64-memstick.img
) - copy the image-file to a USB-stick (attention: all data on the stick will be erased)
dd if=<download-folder>/FreeBSD-13.0-RELEASE-amd64-memstick.img of=/dev/<usbstick-device-file>
- boot from the USB-stick and select “console”
(notice: the memstick-image is able to boot in BIOS or in UEFI mode) - find out the devicenames and boot partition number from your boot-disks
gpart show
(the partition named “freebsd-boot” is the boot partition on every disk) - reinstall the pMBR and GPT ZFS bootloader (for every booting disk)
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i <boot-partition-number> <devicename>
(e.g.gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
)
(e.g.gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
) - reboot
used sources:
https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror#Creating_a_bootable_ZFS_Filesystem
https://wiki.freebsd.org/RootOnZFS