Solved Upgrade from 12.2 to 13.0 getting BTX halt error with external USB Seagate drive

Hello all, trying to get some help with what I hope is an easy fix.

I was running FreeBSD 12.2 on a dell OptiPlex 9020, with an internal hard drive and a Seagate 5TB external USB drive with NTFS. Prior to the upgrade, everything was fine, FreeBSD would boot, then through the FSTAB file, it would auto mount the NTFS volume.

After upgrading to 13.0, when the device boots, it throws a BTX error with two drives shown (drive C and D).
When I disconnect the external USB drive, it then boots fine in FreeBSD as long as I comment out the NTSF volume mount in FSTAB.
As a workaround for now, I let it boot into FreeBSD, connect the external USB, then manually mount the drive.

What has changed and what do I need to do the get it to not crash out in BTX when booting with the external USB connected?

Thanks.
 
Which version of FreeBSD, exactly?

freebsd-version -kru

uname -aKU



gpart show

geom disk list



FYI <https://bsd-hardware.info/?d=FreeBSD&view=computers&vendor=Dell&model=OptiPlex+9020> two of the five run 13.0.
root@PLEX-MINI:~ # freebsd-version -kru

13.0-RELEASE-p4
13.0-RELEASE-p4
13.0-RELEASE-p5
root@PLEX-MINI:~ # uname -aKU

FreeBSD PLEX-MINI 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #0: Tue Aug 24 07:33:27 UTC 2021 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 1300139 1300139
root@PLEX-MINI:~ # gpart show

=> 63 976773105 ada0 MBR (466G)
63 1 - free - (512B)
64 976773104 1 freebsd [active] (466G)

=> 0 976773104 ada0s1 BSD (466G)
0 968884224 1 freebsd-ufs (462G)
968884224 7888880 2 freebsd-swap (3.8G)

=> 34 11721045100 da0 GPT (5.5T)
34 262144 1 ms-reserved (128M)
262178 2014 - free - (1.0M)
264192 11720779776 2 ms-basic-data (5.5T)
11721043968 1166 - free - (583K)

root@PLEX-MINI:~ # geom disk list

Geom name: ada0
Providers:
1. Name: ada0
Mediasize: 500107862016 (466G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r2w2e5
descr: TOSHIBA MQ01ACF050
lunid: 5000039663e816dd
ident: 759OC6IYT
rotationrate: 7200
fwsectors: 63
fwheads: 16

Geom name: da0
Providers:
1. Name: da0
Mediasize: 6001175125504 (5.5T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
descr: Seagate Expansion Desk
lunname: NAAAGM9V
lunid: 3e414141474d3956
ident: NAAAGM9V
rotationrate: unknown
fwsectors: 63
fwheads: 255
 
try to reinstall bootcode with bsdlabel -w -B
it looks like? bootcode is confused of disk order
also see boot.config(5)
 
try to reinstall bootcode with bsdlabel -w -B
it looks like? bootcode is confused of disk order
also see boot.config(5)
Hello -
I search for a boot.config, seems not to exist on my system, so I ran the bsdlabel cmd as such:

root@PLEX-MINI:/ # bsdlabel -w -B
usage: bsdlabel disk
(to read label)
bsdlabel -w [-n] [-m machine] disk [type]
(to write label with existing boot program)
bsdlabel -e [-n] [-m machine] disk
(to edit label)
bsdlabel -R [-n] [-m machine] disk protofile
(to restore label with existing boot program)
bsdlabel -B [-b boot] [-m machine] disk
(to install boot program with existing on-disk label)
bsdlabel -w -B [-n] [-b boot] [-m machine] disk [type]
(to write label and install boot program)
bsdlabel -R -B [-n] [-b boot] [-m machine] disk protofile
(to restore label and install boot program)

root@PLEX-MINI:/ # bsdlabel disk
bsdlabel: unable to get correct path for disk: No such file or directory

I assume I am missing the correct parameters in the command to write label and install boot program?
 
boot.config is optional, does not exist by default you have to create one if you need
to rewrite the bootcode
bsdlabel -B ada0s1
forget about -w
 
boot.config is optional, does not exist by default you have to create one if you need
to rewrite the bootcode
bsdlabel -B ada0s1
forget about -w
root@PLEX-MINI:~ # bsdlabel -B ada0s1
bsdlabel: cannot open provider /dev/ada0s1 for writing label: Operation not permitted
bsdlabel: Try to use gpart(8).

I am doing this from SSH, do I need perform this from the console, or is there a partition issue?
 
try
/sbin/gpart bootcode -b /boot/boot ada0s1
if it still fails either try sysctl geom.debugflags=16 and retry the command or boot from cd/usb media and retry the command while ad0s1 is not mounted
 
try
/sbin/gpart bootcode -b /boot/boot ada0s1
if it still fails either try sysctl geom.debugflags=16 and retry the command or boot from cd/usb media and retry the command while ad0s1 is not mounted
root@PLEX-MINI:~ # /sbin/gpart bootcode -b /boot/boot ada0s1

bootcode written to ada0s1

So it took the command, unfortunately, when I reboot, it still throws the BTX Halt error and won't boot into FreeBSD until I disconnect the external USB drive, and reboot.
In the BIOS, I have it set to legacy and only the internal drive as a boot source.
 
can you interrupt the boot just after the bios finishes it's stuff by pressing a key and see
something like

default: 0:ad(0,a)/boot/loader ?
if you can, then type 0:ad(1,a)/boot/loader
LE
in fact forget about boot.config for now
if your bios has an option to boot from usb devices, disable it, or move usb device behind internal drives in the boot order
 
can you interrupt the boot just after the bios finishes it's stuff by pressing a key and see
something like

default: 0:ad(0,a)/boot/loader ?
if you can, then type 0:ad(1,a)/boot/loader
LE
in fact forget about boot.config for now
if your bios has an option to boot from usb devices, disable it, or move usb device behind internal drives in the boot order
Yes, my BIOS is set to Legacy and the only boot option that is selected, is the internal hard drive, everything else is unchecked, including boot from USB.
 
can you interrupt the boot just after the bios finishes it's stuff by pressing a key and see
something like

default: 0:ad(0,a)/boot/loader ?
if you can, then type 0:ad(1,a)/boot/loader
LE
in fact forget about boot.config for now
if your bios has an option to boot from usb devices, disable it, or move usb device behind internal drives in the boot order
Reading this section:

It seems that your solution of "bsdlabel -B ada0s1" is supposed to fix the issue. Should I boot into single user mode and retry to issue the command?
 
the gpart thing does the same so i doubt bsdlabel will do more
i suspect that the bootcode wants to boot from the 1st disk and if the usb drive is present the internal bsd disk becomes 2nd and so it fails
at the failure point kernel is not loaded so the usb disk may be visible to the bootcode only by bios
try to interrupt the boot and type
0:ad(1,a)/boot/loader
 
the gpart thing does the same so i doubt bsdlabel will do more
i suspect that the bootcode wants to boot from the 1st disk and if the usb drive is present the internal bsd disk becomes 2nd and so it fails
at the failure point kernel is not loaded so the usb disk may be visible to the bootcode only by bios
try to interrupt the boot and type
0:ad(1,a)/boot/loader
Wasn't able to break into the loader process, but I solved the problem. I will post the images of the solution. Thanks for all your help, it is appreciated!
 
20211203_161450_resized.jpg


Here is the BTX Halt Error.
 
20211203_162208_resized.jpg


In the boot bios sub-menu, there is a "USB Configuration" menu. Here I had to also unselect "Enable Boot Support". This solved my issue and did not confuse the FreeBSD bootloader/order.
 
Back
Top