It turns out that I'm trying to create a portable distro while getting prepared for any kind of hardware failure.
I'm creating (or restoring) a Debian distro by multistrap (or from my backups) and requiring the resulting disk to be bootable on a new (mostly compatible) hardware, including a VirtualBox machine.
As I asked before, one of the few required things for a "portable distro" is handling the network interfaces' names.
For example, on the real machine, first ethernet device is named as enp2s0
and in VirtualBox, it's named as enp0s3
. How am I supposed to generate a /etc/network/interfaces
file on boot?
Is there a more generic way to remap the network interface names (by symbolic links, maybe) and let every application use those names (the role names) without the necessity to know the real network interface names of the underlying hardware?
ifupdown
is pretty inept at handling it nicely.touch /etc/udev/rules.d/80-net-setup-link.rules
trick didn't work on Debian 10.ifconfig
output after a reboot: gist.github.com/ceremcem/fe29b009ba02f283bf34abe55b9dee27 What is the black magic behindtouch .../80-net-setup-link.rules
?