# 12.2, Boot fails, BTX Halted, was working fine



## irukandji (Apr 11, 2021)

I have rebooted and I got BTX Halted message. No header, no disk enumeration. Nothing. Only BTX Halted with registers dump.

My first idea was that there is something regarding disks, that one died or something but after unplugging them BTX Halted was still there.

Boot disk is fine, I can access all the data without issues on another system. What is ringing somewhere in my head is a few years back
I had similar accident where after the update, boot needed to be updated using gpart. I dont want to mess the disk, was there any update
that required this (and I missed it? I was in configuring spree as I have changed the server hardware and reinstall freebsd in last month)
and how to fix it? Using boot dvd?


----------



## irukandji (Apr 11, 2021)

I have created backup of all partitions from linux box and run:

`gpart bootcode -p /boot/gptboot -i 1 ada0`

After reboot, trying to boot the system produced:
gptboot: no UFS partition was found

I could really use some help


----------



## irukandji (Apr 12, 2021)

Hmm... i presume that bootloader for 12.2 release cd is not working after updating the system, will try to mount zroot and flash the /boot/gptboot from there... =/

I have also found two bootcodes in /boot, gptboot and gptzfsboot, probably the second should be use as i have zfs root


----------



## richardtoohey2 (Apr 12, 2021)

There's a few suggestions on these forums to do with that error message, but not sure any help you directly.

Mostly suggestions about checking the BIOS and UEFI/Legacy settings.  But if it was all working until recently, then doesn't seem likely it could be related to BIOS settings?


----------



## irukandji (Apr 12, 2021)

richardtoohey2 said:


> There's a few suggestions on these forums to do with that error message, but not sure any help you directly.
> 
> Mostly suggestions about checking the BIOS and UEFI/Legacy settings.  But if it was all working until recently, then doesn't seem likely it could be related to BIOS settings?


Yes... the bios was always set as it was. No hardware was added and reboots were working. The boot ssd is working without any issues that I would found, smartd test also passed, the boot cd in also working without problems. The only thing I can think of is update of the system =/


----------



## SirDice (Apr 12, 2021)

Boot the live from the install media. Post the output from `gpart show`.


----------



## irukandji (Apr 12, 2021)

I have fixed it.

I have booted the system from installcd ( I cant recomend this one enough for creating boot usbs from isos: https://www.ventoy.net/en/index.html) and mounted the zroot from my boot disk.

Wanted to update bootcode from there but autocomplete showed me another file, gpt*zfs*boot and that one started to ring a few bells in my head ( why _gptboot: no UFS partition was found_)

Instead of using gptboot bootcode, I used gptzfsboot (for all anyone hitting the same issue: gpart bootcode -p /boot/*gptzfsboot* -i 1 ada0 ).

gptzfsboot was the one on zroot/default (/boot) that I have mounted in previous step.

It fixed it.

Grrrrr.... I would almost bet it was an update where I have missed the warning to run gpart bootcode ... I really dont understand why this is not integrated into update itself if there is a possibility that system is left unbootable.

*Thank you for reading, thank you for trying to help.*


----------

