gptboot Error When Booting During Upgrade From 12.4 To 13.2

I'm upgrading my test server from 12.4-RELEASE to 13.2-RELEASE. After rebooting to the new kernel, I could not ssh to the host so I discovered via console that it didn't boot FreeBSD. It looks like it's trying to boot from the wrong partition?

Code:
gptboot: No /boot/loader on 0:ad(0p3)
gptboot: No /boot/kernel/kernel on 0:ad(0p3)

FreeBSD/x86 boot
Default: 0:ad(0p3)/boot/kernel/kernel
boot:

How do I fix this? Do I need to change the boot partition order or set the default boot partition somehow? I've never had this issue with a FreeBSD minor or major version upgrade. I didn't see anything in the release notes for 13.2-RELEASE that would explain this issue.

- Gavin
 
Did you look at the upgrade notes for upgrading from 12 to 13?


NOT sure it is your issue, just saying there is information there about boot loader changes near the top of that link that may or may not be relevant.

Are you using BIOS or UEFI?
 
I didn't read the release notes for 13.0, just 13.2. I'm looking at 13.0 right now and am new to efibootmgr. I can't determine if that is relevant or not, but thanks for bringing that to my attention.

My system is on VMware and I believe that uses the vSphere Client to access the BIOS. I can change the boot order there according to this page, but I want to make sure that's what I need to do first.

Should it be booting from a "da" labeled partition instead of an "ad" one? All my VMware hosted FreeBSD systems have partitions that start with "da":

Code:
# gpart show -p
=>      40  83886000    da0  GPT  (40G)
        40      1024  da0p1  freebsd-boot  (512K)
      1064  16777216  da0p2  freebsd-swap  (8.0G)
  16778280  67107760  da0p3  freebsd-ufs  (32G)
 
you don't have efi
iirc bootcode is not updated by freebsd-update so it should work as before (or at least not complain about finding loader)
unless 13.2 did something to the fs which is unlikely
you may use gpart to reinstall gpt boot code (or dd)
there was a kind of similar thread a few weeks ago but loader did get started just could not read anything under /boot/ or /boot/kernel
can't remember if the other case had efi or not
also make sure to fsck /dev/da0p3
 
You don't need to change the boot order. You are looking at output from the gptboot(8) code. That means it's at least booting the code from freebsd-boot, so the order is fine. You are stuck at stage 2:

Code:
gptboot: No /boot/loader on 0:ad(0p3)
It wants to go to stage 3, but fails to find loader(8). The boot loader is telling you it cannot find /boot/loader and /boot/kernel/kernel on the ad drive.
Should it be booting from a "da" labeled partition instead of an "ad" one?
Yes. Did someone perhaps change the disk controller of the VM?
 
I checked with our VM admin and there have been no changes of the disk controller. I also remembered (and I don't know how I forgot and then remembered it just now), but I got disconnected from my ssh session during the first call to freebsd-update install and after I reconnected (ssh) I rebooted. I probably should have checked to see if the freebsd-update process was still running.

In order to fix this, do I run FreeBSD from a disc, thumb drive or other so I can run gpart to install the boot code to the correct partition?
 
Back
Top