Solved Kernel panic when installing FreeBSD with UFS

I'm trying to install FreeBSD with UFS on my computer, but it keeps kernel panicking (usually around extracting src.txz, but it sometimes crashes before or after).
I ran a memory test and it passed normally; I could also install/run Linux just fine. I've tried the installers for FreeBSD 13.5, 14.2 and 14.3 - none of them worked.

PC: GMKtec NucBox G3
CPU: Intel N100
RAM: 16GB
 

Attachments

  • crash2.jpg
    crash2.jpg
    1.4 MB · Views: 112
  • crash1.jpg
    crash1.jpg
    2 MB · Views: 107
I ran a memory test and it passed normally
Failing memory would be my first guess too, good to rule this out. The errors seem to imply issues when writing buffers to disk, did you check for bad blocks, dodgy disk?
 
Software and Operating System
The GMKtec NucBox G3 Plus comes with Windows 11 Pro pre-installed, offering users the latest features and security updates from Microsoft. The OS runs smoothly, and users have the flexibility to install Linux distributions if needed for programming or server applications.
For $150, this Chinese product did not promise to work under FreeBSD.
 
I'm trying to install FreeBSD with UFS on my computer, but it keeps kernel panicking (usually around extracting src.txz, but it sometimes crashes before or after).
I ran a memory test and it passed normally; I could also install/run Linux just fine. I've tried the installers for FreeBSD 13.5, 14.2 and 14.3 - none of them worked.

PC: GMKtec NucBox G3
CPU: Intel N100
RAM: 16GB
Try to change the SSD NVME, if you can financially.The RAM is ok, something on the NVME?
 
I'd try disabling IOMMU and/or CPU virtualization instructions from BIOS.

I've seen PCI AER stuff in dmesg on Linux sometimes if I had IOMMU enabled with the NVMe going through it, but don't recall it being an actual issue (drive r/w worked fine). I haven't seen the messages with IOMMU disabled.
 
One guess is that reading from and writing to that PC's internal SSD doesn't work reliably on FreeBSD for some reason. Try installing on an external disk. When you do that the internal SSD won't be used but the same RAM will be used as before.

You can also try installing with ZFS, which won't make the hardware problems disappear but will change how they manifest and that may give additional clues.

Because you can boot the installer successfully, you can enter the live rescue system and perform various tests of reading from and writing to the internal SSD.

Another guess is that when the internal SSD is being written to, it gets hot and that affects the RAM, which starts making errors. If this is the case, it's not surprising that when doing a memory test no errors are discovered. Linux and Windows may be better at keeping the CPU and other components operating in low-power mode thus dissipating less heat.
 
It only seems to crash when I try to mount /boot/efi on the main drive, either by making a new partition and using the entire disk or using the existing fat32 partition made by linux. If I don't mount /boot/efi at all (or install to a burner USB instead of the main drive), it installs perfectly fine, except that I can't boot into BSD and the /boot/efi folder on the UFS partition is empty.
I don't think it's drive corruption, since I've been able to boot off that EFI partition.
 
It only seems to crash when I try to mount /boot/efi on the main drive, either by making a new partition and using the entire disk or using the existing fat32 partition made by linux. If I don't mount /boot/efi at all (or install to a burner USB instead of the main drive), it installs perfectly fine, except that I can't boot into BSD and the /boot/efi folder on the UFS partition is empty.
I don't think it's drive corruption, since I've been able to boot off that EFI partition.
What does "making a new partition and using the entire disk" mean? If you use the entire disk for a UFS filesystem, you won't have space to create the EFI System Partition on it. What do you actually do once the installer is started?

You should provide much more detail (including about your actions) if you want help with this problem.
 
Nevermind I think I just have a damaged disk drive. though, why do other file systems on the drive work fine? Is UFS more sensitive to corruption?
 
Not specifically bad blocks but good block with corrupted data (due to RAM corruption on the machine that wrote the ISO) may cause this.
I used balena etcher to flash the ISOs, it verifies it after flashing. It would've had to corrupt the same way the 5 or 6 times I flashed different versions and installer types of FreeBSD.
I'm going to try updating the microcode sometime tomorrow to see if that was the issue.
 
This reminds me of a Sparc bug on Solaris. FTP of one specific file always failed on one machine and only on that machine. It turned out the CPU was bad. Sun replaced the CPU and the customer's FTP worked, "magically."

If all else checks out OK, weird and unbelievable hardware problems can make for a bad and confusing day.
 
Defective CPU/microcode could be it. If possible, remove the installed SSD and put it in a completely different system, like some AMD desktop/laptop. See if it works there, or gives the same error. Also, what does SMART say? On the other computer/external case, obviously.
 
Defective CPU/microcode could be it.
Check your power supply (12 volts, 3000 milliamps). I don't know what kind of power supply you have, but if it's like this, for example (compatible), then it's possible that there simply aren't enough amperes to properly raise the hardware. Your bowl may eat up amperes well. If the unit is made of sticks and crap, then the lack of amperes may have a miraculous effect on stability.
https://www.amazon.com/PowerHOOD-Adapter-Compatible-Computer-Battery/dp/B0CYH55T3J
 
Problems with Alderlake-n have been reported, but have you updated the microcode?
Doesn't seem like there's any BIOS updates for it: https://www.gmktec.com/pages/drivers-and-software
This exactly describes my current issue.
How do I set vm.pmap.pcid_enabled=0 from the installer prompt?
 
Yep, that fixed it. For some reason the "Edit" button isn't appearing my initial post so I can't mark this as solved
 
For some reason the "Edit" button isn't appearing my initial post so I can't mark this as solved
If I'm not mistaken, the edit button will be active for forum users after 10 days, and after 10 posts. Your post count is 9 at the time of this writing.

Until the post count reaches 10, you can ask a forums administrator to mark your post resolved. Use the "Report" button on the bottom left side of your post, explain the issue.
 
Back
Top