Upgrading Embedded Device: Disabling net.ifnames in Debian Bullseye vs Debian Bookworm
In this article, we will discuss the steps required to upgrade an embedded device from Debian Bullseye (v5.x) to Debian Bookworm (v6.x). Specifically, we will focus on disabling the net.ifnames option in both versions to ensure that the somewhat ancient application running on the device continues to expect the Ethernet adapter to be named eth0.
What is net.ifnames?
net.ifnames is a Linux kernel option that changes the naming scheme of network interfaces from the traditional eth0, eth1, etc., to a more descriptive scheme based on the physical location of the interface on the system. This change was introduced in systemd-networkd version 197, which is used by default in Debian Bullseye and later versions.
Disabling net.ifnames in Debian Bullseye
To disable net.ifnames in Debian Bullseye, you can follow these steps:
- Edit the
/etc/default/grubfile and add the following line to theGRUB_CMDLINE_LINUXvariable:
net.ifnames=0- Run the following command to update the GRUB configuration:
sudo update-grub- Reboot the system to apply the changes.
Disabling net.ifnames in Debian Bookworm
To disable net.ifnames in Debian Bookworm, you can follow these steps:
- Edit the
/etc/default/systemd-networkdfile and add the following line:
NetIfNames=0- Restart the systemd-networkd service:
sudo systemctl restart systemd-networkdUpgrading to Debian Bookworm
Once you have disabled net.ifnames in both Debian Bullseye and Debian Bookworm, you can proceed with the upgrade. Here are the general steps:
- Backup your system and data.
- Update the package lists:
sudo apt-get update- Upgrade the system:
sudo apt-get upgrade- Reboot the system to apply the upgrades.
- Repeat steps 2-4 until no more packages are upgraded.
- Upgrade the system to Debian Bookworm:
sudo apt-get dist-upgrade- Reboot the system to apply the final upgrades.
- In this article, we discussed the steps required to upgrade an embedded device from Debian Bullseye (v5.x) to Debian Bookworm (v6.x).
- We focused on disabling the
net.ifnamesoption in both versions to ensure that the Ethernet adapter continues to be namedeth0. - We provided detailed instructions for disabling
net.ifnamesin both Debian Bullseye and Debian Bookworm. - We also provided general steps for upgrading the system from Debian Bullseye to Debian Bookworm.