Skip to content
Snippets Groups Projects
Commit 240368eb authored by Martin Pitt's avatar Martin Pitt
Browse files

udev README.Debian: Include initrd rebuild and some clarifications in migration

While initrd update is already being mentioned in the introductory
section, it is easy to miss when going through the migration steps, so
explicitly mention it again. Also add a warning about keeping a fallback
on misconfigurations, and the possibility to migrate one interface at a
time.

Thanks to Karl O. Pinc for the suggestions!

Closes: #881769
parent dc426c37
No related branches found
No related tags found
No related merge requests found
......@@ -9,14 +9,16 @@ falls back to slot names (PCI numbers, etc., in the spirit of
/dev/disks/by-path/), and then optionally falls back to MAC address, and
generates names based on these properties. This provides "location oriented"
names for PCI cards such as "enp0s1" for ethernet, or wlp1s0" for a WIFI card
so that replacing a broken network card does not change the name. As location
so that replacing a broken network card does not change the name (as long
as the new card is fitted into the bus in the old card's slot.) As location
based naming does not work well for USB devices, these use a MAC based naming
schema (see /lib/udev/rules.d/73-usb-net-by-mac.rules).
This has been enabled by default since udev 220-7, which affects new
installations/hardware. Existing installations/hardware which already got
covered by the old 75-persistent-net-generator.rules will keep their interface
names, see below.
covered by the old 75-persistent-net-generator.rules may keep their existing
interface names until the release of Debian 10 / Ubuntu 18.04 LTS; see
below.
You can disable these stable names and go back to the kernel-provided ones
(which don't have a stable order) in one of two ways:
......@@ -46,16 +48,20 @@ environments.
This old schema is deprecated in Debian 9 ("Stretch"), and will not
be supported any more in Debian 10.
Migration to the current network interface naming
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On package upgrade systems will keep their current names, but they will need to
be manually migrated by Debian 10 / Ubuntu 18.04 LTS. If you rely on the old
names in custom ifupdown stanzas, firewall scripts or other networking
configuration, these need to be updated to the new names.
Migration to the current network interface naming scheme
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Interface names must be be manually migrated to the new naming scheme before
upgrading to Debian 10 / Ubuntu 18.04 LTS. If you rely on the old names in
custom ifupdown stanzas, firewall scripts, or other networking configuration,
these will eventually need to be updated to the new names.
WARNING: This process may render your machine inaccessible through ssh. Be sure
to have physical or serial console access to the machine or a way to revert to
your existing configuration.
First, determine all relevant network interface names: those in
/etc/udev/rules.d/70-persistent-net.rules, or if that does not exist (in
virtual machines), in "ip link" or /sys/class/net/.
the case of virtual machines), in "ip link" or /sys/class/net/.
Then for every interface name use a command like
......@@ -64,12 +70,23 @@ Then for every interface name use a command like
to find out where it is being used.
Then on "real hardware" machines, rename the file to
70-persistent-net.rules.old; on VMs remove the files
/etc/systemd/network/99-default.link and
/etc/systemd/network/50-virtio-kernel-names.link (the latter only exists on
VMs that use virtio network devices).
70-persistent-net.rules.old; alternately, if you have multiple interfaces,
instead of renaming you may wish to comment out specific lines to convert a
single interface at a time.
On VMs remove the files /etc/systemd/network/99-default.link and
/etc/systemd/network/50-virtio-kernel-names.link (the latter only exists on VMs
that use virtio network devices).
Rebuild the initrd with
update-initramfs -u
and reboot. Then your system should have a new network interface name (or
names). Adjust configuration files as discovered with the grep above, and test
your system.
Reboot, adjust configuration files, and test your system.
Repeat for each network interface name, as necessary.
Custom net interface naming
~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment