22 Dec 2021 - Thomas Lake
Upgrading a Linkstation 220D from Buster to Bullseye
My current home network storage solution is a Buffalo LinkStation 220D running Debian (installed using the tools and instructions from the Debian_on_Buffalo repository). I recently upgraded it from Buster to Bullseye using the instructions in the release notes and discovered (the hard way!) that a broken networking script will stop the ethernet interface being brought up when rebooting after the upgrade. This left the device offline without no way to log back in and repair it.
/etc/network/if-pre-up.d/ifup_mac_custom script fails because the
fw_printenv tool has moved from u-boot-tools in Buster to liubootenv-tool in Bullseye.
N.B. On my machine, the new tool just doesn’t work. Further investigation is on the TODO list.
How to fix it
After upgrading (but before rebooting!), edit
/etc/network/if-pre-up.d/ifup_mac_custom and comment out the contents. Add the following at the end of the file:
ip link set dev eth0 address "18:c2:bf:xx:yy:zz"
replacing the MAC address with the appropriate value for your device.
You might also be able to delete the
ifup_mac_custom file and add the command directly to
/etc/network/interfaces, but that isn’t something I’ve tried.
If you only find out after the reboot that something has gone wrong, then you need an alternative way to access your device. One option is to use the recovery / emergency mode firmware on the device to boot into the Debian installer using TFTP.
- Set up a TFTP server on a machine that can be connected to the Linkstation
- Download the relevant kernel and initrd files from Debian_on_Buffalo
- Place these in the right folder for your TFTP server (On my Fedora machine, this was
/var/lib/tftp) and rename them to
- Make sure your TFTP server has the IP address 192.168.11.1
- With the Linkstation powered off, remove the hard drives
- Turn the Linkstation on. Wait for the flashing red light, then push the button on the front panel to trigger the TFTP boot process
- Use the details here to connect to the installer
- Once the installer has loaded, reconnect the drives
- Follow the installer as far as the disk partitioning screen (so that all the hardware detection etc. is complete), then drop to a shell (“Go Back” and select the relevant option)
- Mount your root partition and edit the offending file, as above.
Aside from this minor bump, my LS220D is quite happily running Bullseye without any other faffing about required.
The recovery process used was put together using information from the following pages, as well as those already linked above: