FreeBSD will no longer boot (RPi)

(Am new to BSD, and use archlinux as my daily driver)

I was trying to configure FreeBSD 13 on my Raspberry Pi 4 for use as a home server. It no longer boots, and I suspect the reason is changes I made to `/etc/fstab` but I'm not totally sure. When it boots it hangs here:

IMG_3481.jpg


The problem is that I have no idea how to get past this, especially as I cannot boot to USB on a raspberry pi without Raspbian (which is really absurd) and on Linux I cannot mount UFS as RW, only as RO.

Any help would be much appreciated, bit of a last-ditch attempt.
 
Looks like your filesystem got corrupted. Boot to single user mode and run fsck -y.
 
I tried booting to single user mode as per the documentation by running `boot -s` from the loader, but it still froze without giving me a login prompt. The weird thing is that I can still see device events, for example if I plug or unplug a USB peripheral it comes up, so the system isn't frozen, it's just not getting past a certain stage.
 
I wonder what changes you made to your fstab? You could always try booting another computer with FreeBSD and do the fsck from there ...
 
Most Arm images use disk labels in fstab from my experience. So start there.
Mount the stick on a secondary machine and exploit.

Did you have to intervene at Uboot to boot from USB stick? Maybe its looking for mSD.
 
Your easiest way to fix this:
Load up FreeBSD in a VM (VMWare/VirtualBox), remove the USB that's attached to the RPI4 and mount it in the VM.
eg mount /dev/da0p1 /mnt
Then cd /mnt/etc and edit the fstab removing any/all your offending changes. Transfer back to the RPI and rinse/repeat until fixed.
 
Is your root on an sdcard? If so and it is running ufs, can you mount it readonly on Linux? If so, let us know what /etc/fstab says.
 
I tried booting to single user mode as per the documentation by running `boot -s` from the loader, but it still froze without giving me a login prompt. The weird thing is that I can still see device events, for example if I plug or unplug a USB peripheral it comes up, so the system isn't frozen, it's just not getting past a certain stage.
FreeBSD 13 and Raspberry Pi 4 starts with U-Boot. How can I boot the single mode?
 
If it is a matter to fsck can the OP mount the disk or the SD card into another computer?
You gave me an idea :)
I tried fsck -i on the first partion of the MicroSD (a 50Mb partition on /dev/da0s1) but still said that the file system is dirty.
I also mounted with read and write permissions (-o rw) and nothing.

Every month I do a full backup of the microSD with dd. So, my solution was that I cloned the first partition (da0s1) of a working MicroSD on the first partition (da0s1) of the broken MicroSD and it worked! Now I can boot normally the system and all the services (network, ssh, mariadb, nginx, etc).

I wrote an article (in catalan) with my solution: https://joancatala.net/node/1607
 
Back
Top