After OS update, the IP address is lost

After a long time, I found its time to update my PiKVM V3.

I did it according the explanation here: https://docs.pikvm.org/\_update_os/

The cmd “pikvm-update” failed, so I did:

  • rw
  • pacman -Syy
  • pacman -S pikvm-os-updater
  • pikvm-update

All looks good, but it took a while, so I left it.
Back, I’ve seen at least one error: "Job for dbus-broker.service failed "

At end, it reboots, and from now on, it was no more reachable by its original IP (V4).

Amazingly, I can reach it by its name “pikvm”. Pinging it, it shows an IP V6 address.

On my DHCP, which only has an V4 interface, the pikvm is not visible (but I used before a fixed IP address).

Here my questions:

  1. How can I set again the fixed IP? I cannot remind me how I did it years ago…

  2. Or shall I directly rewrite the SD card with a new OS (because maybe there raised more errors while update)?

Thank a lot for help

Henri

Added:

On the little display, I can see flashing the old IP-Address V4 … but I cannot ping it.

Hi Henri,

First, a quick check: since it answers by name, try opening https://pikvm/ in your browser. If the web interface loads, open the Terminal there and run (if you get any errors, use su - and then your root password to elevate and try again):

ip a
pacman -Q kvmd

ip a shows exactly which addresses the PiKVM has right now. If eth0 lists an IPv4 address from your DHCP server, you can simply use that address (and reserve it, see below). If eth0 only shows IPv6 addresses, it isn’t getting IPv4 at all. pacman -Q kvmd tells us which version you’re on, which matters for option 2.

Option 1: fix it in place from the web terminal.
The static IP is stored in /etc/systemd/network/eth0.network:

su -
rw
nano /etc/systemd/network/eth0.network
systemctl restart systemd-networkd
ro

If ro complains that the mount point is busy (likely after an interrupted update), just reboot instead.

Option 2: set it from the SD card with a card reader.
The PiKVM FAQ covers this: FAQ & Troubleshooting - PiKVM Handbook, which points to On-boot configuration & production deployment - PiKVM Handbook

With the PiKVM powered off, put the microSD card in a card reader, open the first (FAT32) partition, and add these three lines to pikvm.txt (create the file if it isn’t there, and don’t add FIRST_BOOT=1 unless it was already in the file):

ETH_ADDR=192.168.0.100/24
ETH_DNS=8.8.8.8
ETH_GW=192.168.0.1

Swap in your own values. The address needs the /24 (or whatever your subnet is) on the end, and all three lines must be set together. Put the card back and power it up; PiKVM applies the settings on boot and then deletes the file. This needs a reasonably recent kvmd (roughly 3.184 or newer); on older versions these lines are silently ignored, so check pacman -Q kvmd first if you can.

Our recommendation:
Leave PiKVM on DHCP (the default) and create a DHCP reservation for it on your router instead. The address then lives on the router, so it survives OS updates, reflashing and card swaps. To switch back to DHCP, use ETH_DHCP=1 in pikvm.txt instead of the three lines above.

If it still won’t come up, a fresh flash of the card is the clean reset, especially given the dbus-broker error during the update: Flashing PiKVM OS image - PiKVM Handbook

Before reflashing, back up your customizations so you can put them back afterwards. These are the usual ones (skip any that don’t exist on your system):

  • /etc/systemd/network/eth0.network (your current network settings)
  • /etc/kvmd/override.yaml and anything in /etc/kvmd/override.d/ (configuration overrides)
  • /etc/kvmd/tc358743-edid.hex (your EDID, if you changed it)
  • /etc/kvmd/meta.yaml (the server name and info shown in the web UI)
  • /etc/kvmd/web.css, /etc/kvmd/shortcuts.json and /etc/kvmd/janus/*.jcfg, if you customised them
  • /etc/hostname and /root/.ssh/authorized_keys
  • Tailscale: /var/lib/tailscale, plus any certificates you installed in /etc/kvmd/nginx/ssl/ and /etc/kvmd/vnc/ssl/
  • /var/lib/kvmd/msd (your mass-storage images, can be large) and /var/lib/kvmd/pst/data
  • Passwords and 2FA: /etc/kvmd/htpasswd, ipmipasswd, vncpasswd and totp.secret. Keep these private and never post them. Without totp.secret you’d have to re-enroll 2FA.

Tip: pacman -Qii kvmd lists the kvmd config files and marks the ones you’ve modified.

One catch: these files live on the card’s Linux (ext4) partition, which Windows and macOS can’t read with a plain card reader. Only the small FAT32 partition with pikvm.txt shows up. If the web UI or SSH works, copy them off that way before you pull the card. Otherwise you’ll need a Linux machine (or an ext4 driver) to read the card.

Hello @ewspikvm

thank you very much for the detailed response.

Short before your response, I decided and started to re-flash the card - so unfortunately, I could’nt see what “ip a” shows in the failing situation … yes, the courious point was, that the small display of PiKVM shows the correct IP (alternating with other things), but the NIC did not handle it.

Anyway - the flashing of the card was easy and fast - maybe faster than trying to recover the system.

For flashing and setting the IP, I used these docs " https://docs.pikvm.org/\_update_os/ " and “systemd-networkd - ArchWiki”, and it worked fine for me.

(And for this time, I documented what I did - for next time :blush:)

Now the PiKVM is working again on my internal IP.

Only one surprising point: still, when I do on my PC a “ping pikvm”, then I will get back an IP V6 address - the same address I can see when I do now “ip a” on the PiKVM. And, the pikvm is not held in my local DNS … I feel, some kind of broadcast did find and get back the IPV6 address, but I do not understand this mechanism.

.

Again, thank you very much for your response.

Regards, Henri

If you happen to have any Apple devices on your network (or other Matter routers), they really like to hand out IPv6 to ANYBODY that asks, which causes things to get IPs you wouldn’t expect.

Personally I disable IPv6 per the FAQs because it causes more headaches sometimes for internal stuff, but I did some investigating when I was seeing a similar thing and it turned out to be the Apple stuff.