MikeL's FreeBSD howto - rPi install

This page is organized in most recent first order. If you want to understand it as it occured, you'll want to scroll to the bottom, and go upwards.

[20251127]
Extremely important! Be sure to install a 32bit OS - a 64bit will give a seg fault when using the mlrpi package. To check an existing installation, do getconf LONG_BIT. If necessary, use Raspberry Pi Imager.

Following abbreviated instructions are for "trixie".
Use nmtui to configure network. You may need to set the MAC address to specific IP in your DHCP server configuration (DSL modem).
systemctl enable ssh
systemctl start ssh
apt-get install swig
apt-get install xterm
apt-get install xutils
apt-get install emacs


[20251120]
Managed to get the downstairs setup going again, with the extra WiFi router at the corner of the house. My iPhone shows it as 2 bars at the vineyard location. It does connect sometimes, and the connection seems to drop more than occasionally, but I have been able to do some work this way.


[20251119]
Here it is, another holiday season approaching... Did I do anything on this over the summer? Nope too busy. This year the rPi wouldn't work over WiFi. I farted around for a while, and finally got it to work, see the new interfaces file below. However, when I take it to it's position outdoors, I can't access it. I'm guessing that it's because it used to bind to an access point that was on the corner of the house closest to the vineyard, but that one was removed earlier in the year. Checking with my iPhone where the rPi is sitting, it's showing 1 bar for the connection I'm trying to use this year, which is currently the closest. I'll see if I can set up a replacement unit where the one got removed, in hopes it will be sufficient for the rPi to bind to it from way down the hill - it used to work...

/etc/network/interfaces.d/interfaces:

auto eth0
iface eth0 inet static
address x.y.z.177
netmask 255.255.255.248
gateway x.y.z.182
broadcast x.y.z.182
dns-nameservers 205.171.3.65 63.150.72.4

iface wlan0
allow-hotplug wlan0
iface wlan0 inet static
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
address 192.168.0.177
netmask 255.255.255.0
gateway 192.168.0.1
broadcast 192.168.0.1
dns-nameservers x.y.z.182 207.229.65.53

[20250331]
Tried a couple of different USB WiFi sitcks, one old, one new - was unable to get either to work with FreeBSD on rPi. Decided to go ahead and assume I'll have this problem taken care of when I'm ready to move to remote location, namely outdoors, which won't be until November. At that point maybe there will be an available driver for one of these two, or maybe they'll have native rPi built in, or maybe I'll choke up $20 bucks or so for a compatible one.
Next problem is that my rPiLed Perl library is not working under FreeBSD. I suppose I'll see if I can take care of that, and continue to develop under FreeBSD, however, I may just be stuck with Raspian/Linux again.
Sigh.

[20250329]
Fuck - the amount of time I've wasted in my life on this shit!

You'll see from previous days (below), that I got off into the weeds trying to get fucking bullshit Debian Linux garbage fucking crap to work, so It's time to try my favorite, FreeBSD. FreeBSD does not at this time have native handling for rPi WiFi, but that can be solved easily with an external USB WiFi, so I'll do that for now, eventually hopefully will be able to remove that and use the rPi native WiFi.

On PC, FreeBSD.org, download latest image. Instructions say to use 'aarch64', found FreeBSD-14.2-RELEASE-arm64-aarch64-RPI.img (2-3 min download)
Run balenaEtcher, flash micro sd card (32Gb) (about 10 mins).
Move flash card to rPi, with screen/mouse/keyboard and boot.
If it takes several mins to boot, you have a bad microSD card, see: SD Card system disk is super slow on Raspberry Pi 1 B+ (armv6l). Confirm with:
dmesg | grep mmcsd0 and see result:
mmcsd0: 16GB at mmc0 0.4MHz/4bit/65535-block -- note "0.4MHz", this should be "50.0MHz".
Find another brand of MicroSD card, and start over.

Use default root:root to login and immediately:
bsdconfig and set timezone.
passwd root and change password.
adduser, use your defaults, 6146.
Edit /etc/resolv.conf:
Add search vintners.net
nameserver 205.171.3.65
Edit /etc/rc.conf, add:
ntpdate_enable="YES"
sshd_flags="-o X11Forwarding=yes"
(Specifics at MikeL's FreeBSD howto - 14.0 Install, of course omitting Dell specific and upgrade specific stuff. Fix /etc/crontab freebsd-update; /etc/rc.conf sshd_flags X11Forwarding, ftpd_flags, ntpdate_enable; .forwards; Charlie root; /etc/group add my user to root gropup; console.info)
pkg (do you wanna install? - yes)
pkg install xorg-minimal (~ 4 mins)
pkg install xterm (< 2 mins)
pkg install xload (secs)
pkg install emacs (~ 8 mins)

Ignore everything below, that's fucking bullshit Linux crap that won't get you there.


[20250328]
I managed to brick my rPi for the LED array project. All I did was edit the 'networks' file, and apparently messed it up. When I rebooted, I couldn't get in via ssh, and plugging a monitor/keyboard/mouse, the desktop wouldn't come up either. So here's the reinstall sequence...
Set up rPi with mouse, screen, and ethernet cable.
Boot rPi; when "For recovery mode, hold Shift" comes up, do it.
I took Debian 64bit, with console.
Wait for install. Go ahead and let it do updates. Whole process will take a solid half hour.
Bring up machine, take Preferences->Raspberry Pi config, System tab. Set hostname. Just hostname, no domain. Ignore change pswd here, this is your pswd, not root.
Take Interfaces tab, enable ssh.
Start a command line, do sudo passwd root and set root pswd
Reboot.
Start a command line. Do:
apt-get install traceroute
apt-get install emacs
apt-get install xterm
apt-get install tcsh
apt-get install csh
I gotta tell you - I spent hours messing with this crap, and never got everything to work right. This seems to work, but hostname and dnsdomainname are still wrong.
emacs /etc/resolvconf.conf change to resolve_conf="NO".
emacs /etc/resolv.conf add:
  search vintners.net
  nameserver 205.171.3.65 207.229.65.53
emacs /etc/hostname and update host, do not include domain name.
hostname -F /etc/hostname
emacs /etc/hosts and add host with FQDN. There may already be a 192 prefix non-fqdn version - leave this
emacs /etc/network/interfaces.d/interfaces (may not already exist).
  auto wlan0
  iface wlan0 inet static
    address x.y.z.181
    netmask 255.255.255.248
    gateway x.y.z.182
    broadcast x.y.z.182
    dns-nameservers 205.171.3.65 207.229.65.53
emacs /etc/dhcpcd.conf, add to end:
  interface wlan0
  static ip_address=x.y.z.181/24
  static routers=x.y.z.182
  domain_name_servers=205.171.3.65 207.229.65.53
  domain_search=vintners.net
Could not get xterm to return a window via ssh - fuck it, let's try FreeBSD.

Copyright © 1995-2025 Mike Lempriere (running on host bayanus)