Solved FreeBSD hangs intermittently on boot

I have recently installed FreeBSD 13.1 on one of my machines, and it hangs around every one in three times on boot.

When it hangs, the last thing displayed on screen is this, and everything freezes - it needs to be powered off by holding the power button:

Code:
ata3: <ATA channel> at channel 1 on atapci0

During a successful boot, the next line from dmesg is as follows:

Code:
pci0: <simple comms, UART> at device 22.3 (no driver attached)

The same machine works fine with Windows 10. Does anyone have any ideas? I'm not sure where to begin. I have posted the dmesg output here in case it is useful.

Thanks in advance for any suggestions.
 
If you don't need the uart you can try turning it off in the BIOS.

Unless it is still messing with ATA when it hangs, in which case I would try a new SATA cable.
 
Is the drive seen/mounted under Windows?

On the first look to me I'd consider a loose connection.

Under FreeBSD the system will not come up if a drive is to be mounted by fstab as a fixed part of / but not detected.
Windows does if it's not the system's drive but any "additional" drive.
 
Are you running the latest bios available?
I updated it to the latest version before posting as I suspected this too.

If you don't need the uart you can try turning it off in the BIOS.

Unless it is still messing with ATA when it hangs, in which case I would try a new SATA cable.
I disabled the UART, which didn't fix it. I was actually quite pleased because I am about to start a project building a computer from scratch and will need this.

I checked the SATA cable, and it was tensed to the point of stretching. I replaced it with a longer one, and the machine has now booted 10 out 10 times without hanging!

Is the drive seen/mounted under Windows?

On the first look to me I'd consider a loose connection.

Under FreeBSD the system will not come up if a drive is to be mounted by fstab as a fixed part of / but not detected.
Windows does if it's not the system's drive but any "additional" drive.
I didn't even think of this - Windows wouldn't care if it's not addressing it. And, sure enough, it was the FreeBSD boot drive. I think I was initally thrown off because the numbering of the ata devices didn't match those on the board so I thought it was the unused eSATA port. Now I see that the ata devices show which drives they are mapped to in the dmesg:

ata2: <ATA channel> at channel 0 on atapci0
ata3: <ATA channel> at channel 1 on atapci0

Thanks to all for your help! I will mark this thread as solved! :)
 
Back
Top