linux

Set a static IP address with nmtui on Raspberry Pi OS 12 'Bookworm'

Old advice for setting a Raspberry Pi IP address to a static IP on the Pi itself said to edit the /etc/dhcpcd.conf file, and add it there.

But on Raspberry Pi OS 12 and later, dhcpcd is no longer used, everything goes through Network Manager, which is configured via nmcli or nmtui. If you're booting into the Pi OS desktop environment, editing the IP settings there is pretty easy.

But setting a static IP via the command line is a little different.

First, get the interface information—you can get a list of all interfaces with nmcli device status:

$ nmcli device status
DEVICE         TYPE      STATE                   CONNECTION         
eth0           ethernet  connected               Wired connection 1 
lo             loopback  connected (externally)  lo                 
wlan0          wifi      disconnected            --                 

In my case, I want to set an IP on eth0, the built-in Ethernet.

Learning about ZFS and efficiency on my new Arm64 NAS

HL15 with Ampere Altra and ASRock Rack motherboard - NAS fully built

I've been building out a new Arm-based NAS using ASRock Rack's new 'Deep Micro ATX' motherboard for Ampere Altra and Altra Max CPUs.

I posted about the hardware earlier, in Building an efficient server-grade Arm NAS. Go check that out if you want details on the specific hardware in this setup.

But at the end of the build, I installed Rocky Linux, and found the power consumption to be a bit higher than expected—over 150W at idle!

As it turns out, the NAS must've been doing something when I took that initial measurement, because after monitoring it for a few more days, the normal idle power usage was around 123W instead.

Mounting an ext4 linux USB drive on macOS in 2024

I recently pulled a SATA hard drive out of a Linux box that I wanted to grab some files off of. I only had my Mac on hand, and I had a USB 3.0 to SATA hard drive adapter at the ready.

But when I plugged in the hard drive, macOS said it couldn't recognize the disk.

Disk unreadable by macOS

Makes sense, because macOS includes support for Apple's filesystems, not Linux (or even NTFS, Windows' preferred filesystem). There are commercial solutions you can buy, like Paragon Software's extFS for Mac, but that costs $39, and I don't want to deal with the licensing issues that may exist there if I just want to grab a few files off one hard drive.

Luckily, there are some open source libraries that allow at least read only access to ext4-formatted disks on macOS. Let's install them and use them to mount the drive:

First, install macfuse, using homebrew:

MNT Reform - a hackable laptop, not for everyone

MNT Reform bottom with purple battery cells

The MNT Reform's design, the components, everything—is open source. If iFixIt did a teardown, they'd probably give it an 11 out of 10.

You can replace individual battery cells! Some people with these laptops hacked in their own speakers, added more internal Ethernet, or even swapped out the CPU itself.

Does that mean I think you should buy it? No, probably not. It's expensive (starting at €1199), and it's built for a certain type of person. It's not gonna replace a MacBook or a cheap Chromebook.

But why does this exist, and why am I excited about it?

Disclaimer: The reform used in this review was sent to me for testing; it's already been shipped back to MNT Research. They haven't paid me anything, and they have no input into the content of this blog post.

HTGWA: How to completely erase a hard drive in Linux

This is a simple guide, part of a series I'll call 'How-To Guide Without Ads'. In it, I'll show you how I completely initialize a hard drive so I can re-use it somewhere else (like Ceph) that doesn't like drives with partition information!

First, a warning: this blog post does not show how to zero a hard drive, or secure erase. That's a slightly different process.

But as someone with way too many storage devices (from testing, mostly), I find myself in the position of trying to use a spare drive in some place where it expects a brand new drive, but winds up failing because the drive had a partition, or had valid boot files from an SBC or something.

I wanted to document the easiest way in Linux to completely reset a hard drive—at least from Linux's perspective.

The impetus was when I was trying to get some hard drives added to a Ceph OSD, and the process that tried adding them ran into an error stating RuntimeError: Device /dev/sda has partitions.

How to customize the dtb (device tree binary) on the Raspberry Pi

Every so often, when you're debugging weird hardware issues on SBCs like the Raspberry Pi, it's useful to get way down into the guts of how the Pi represents its hardware to Linux.

And the Linux kernel uses a method called Device Tree overlays to do it. On the Pi 5 (and other Pis), these overlays are stored as .dtb files inside the /boot/firmware directory, and there's an overlay for every major Raspberry Pi hardware model.

I've had to modify the dtb files in the past to increase the PCIe BAR space for early GPU testing on the Compute Module 4. And recently I've had to mess with how the PCIe address space is set up for testing certain devices on the Raspberry Pi 5.

Getting RISC-V (again): Milk-V's Mars CM

Milk-V Mars CM with Box

tl;dr: No, it's not a replacement for a Raspberry Pi Compute Module 4. But yes, it's an exciting tiny RISC-V board that could be just the ticket for more RISC-V projects, tapping into the diverse ecosystem of existing Compute Module 4 boards.

This tiny computer is the Mars CM. It's the exact same size and shape as the Raspberry Pi Compute Module 4. It should be a drop-in replacement. And on its box it says it supports 4K, Bluetooth and WiFi, and has gigabit Ethernet. It's also supposed to have PCI Express!

Configuring wifi headless with connmanctl on LibreELEC via SSH

Because I love doing things quite backwards, I found myself in a predicament: I had only a wired direct connection between my laptop and the Raspberry Pi where I was running LibreELEC. Using mDNS I could connect to it directly connected at LibreELEC.local, and that's great...

But I wanted to join it to a WiFi network, and I only had a not-great 6-button remote control to plug into the Pi, so entering in long passwords via the UI (if that's even possible without a keyboard?) was not something I wanted to attempt.

Since I could ssh [email protected], I figured I'd connect to the available WiFi network, so it would be more convenient to update the device and put more content on it. Not to mention it expands Kodi's capabilities if you give it an Internet connection!

Enter ConnMan

LibreELEC uses ConnMan to manage network interfaces, and setting WiFi is a little strange, but doable:

While logged into the LibreELEC machine, enter connmanctl to get into the ConnMan shell.

Then do the following:

Forcing PCI Express Gen 3.0 speeds on the Pi 5

The Raspberry Pi 5 includes 5 active PCI Express lanes—4 go to the new RP1 chip for I/O like USB, Ethernet, MIPI Camera and Display, and GPIO, and 1 goes to a new external PCIe connector:

Raspberry Pi 5 PCIe connector

By default, all PCIe lanes operate at Gen 2.0 speeds, or about 5 GT/sec per lane. Currently there's no way to change that default for the RP1 chip's 'internal' lanes, but on the external connector, you can add the following lines inside /boot/firmware/config.txt (and reboot) to upgrade the connection to Gen 3.0 (8 GT/sec, almost double the speed):