Upgrading to Bullseye on the Raspberry Pi 4

My two Raspberry Pi 4 Bs (in my HomeTroller Pi and OctoPi) were both running Debian 10 (Buster). I like to be current (as evidenced by my bi-annual Ubuntu upgrades) and realized I’d been lax on the RasPis, both of which were two releases behind. Debian 12 (Bookworm) seemed a little too new, so based on some research on the HomeSeer and OctoPrint forums, I decided to just upgrade them both to Debian 11 (Bullseye).

Since I consider HomeSeer a “production” system (handling all the home automation), I started with the OctoPi … and good thing I did, too! I’m no stranger to Linux upgrades, but following these steps I did the typical pre-upgrade updates to make sure everything was current before switching my sources to the Bullseye repos and executing the dist-upgrade. When the upgrade was complete, I re-applied my customizations to the few affected files and then rebooted. And then couldn’t log in!

I could tell the Pi was booting based on the LEDs, but it wasn’t available on the network for some reason. Oh oh! Unfortunately, I didn’t have a micro-HDMI cable to connect so I ordered one from Amazon and picked up again the next day when it arrived. With the Pi connected to a monitor, I could see it booting but then saw the error: “Failed to start DHCP Client Daemon.” That gave me the Google fuel I needed to quickly find the fix. With a keyboard connected, I made the change to /etc/systemd/system/dhcpcd.service.d/wait.conf (replacing /usr/lib/dhcpcd5 with /usr/sbin) and rebooted. It worked! The Pi was back on the network and accessible. Whew.

With that out of the way I was able to log back in and find the next problem: OctoPrint wouldn’t start. The upgrade had removed Python 3.7 and replaced it with Python 3.9 which broke OctoPrint’s virtual environment so I had to re-install it. Luckily my settings were preserved, but I had to re-install all of my plug-ins (and once they were re-installed they picked up their old settings, so that was lucky). This near-miss made me realize I wasn’t actually making OctoPrint backups, so I added an additional plug-in to handle that on a scheduled basis.

Good thing I tried the upgrade on the OctoPi first, right? 😉 Not that I learned my lesson or tread cautiously, read on!

Emboldened by my “success” I moved on to the HomeTroller. Same steps as before with some additional input from someone else on the HomeSeer forums who had done the same thing. The upgrade process went as expected, but unfortunately I forgot to update wait.conf before I rebooted so I ended up with the same problem with no network connection. Oops! Monitor, keyboard, and micro HDMI cable to the rescue again to log in locally and fix the file. Rebooted, and the HomeTroller was back on the network and I was back in business.

Umm, not exactly. I could see the HomeSeer services were running (and automations and events were running properly), but could not get to the web interface. Instead I was getting a default lighttpd index page. WTF? Performing my usual troubleshooting I figured out that the upgrade had installed apache2 which was preventing HomeSeer’s web service from starting up on port 80. As a result, Apache was serving up the default index page it found under /var/www/html (which happened to be the lighttpd page). Doing a quick removal of the Apache packages resolved the issue and I was able to get back into the HomeSeer web UI again.

What’s an upgrade without a few hiccups, right?

Leave a Reply

Your email address will not be published. Required fields are marked *