Disabling "Predictable" Network Interface names
Introduction
Network interface names in linux are generally named something like eth0, eth1, wlan0, wlan1 and so on...
however with some recent changes, some Operating systems may have this slight annoyance baked in called "Predictable Network Interface Names" or in my book, making my experience worse
This guide will cover two ways to disable ifnames and is mainly aimed at Proxmox VE and Debian
GRUB method
For Proxmox VE, we have two choices for boot methods. We have the traditional Legacy BIOS boot which is usually accompanied by GRUB and the second option is EFI boot which is usually handled by efibootmgr
to disable "Predictable" Names, use your text editor of choice, in my case it's nano, we will edit the default GRUB configuration which is usually found in the /etc/default directory
nano /etc/default/grub
my configuration looks like this
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
However what we're really interested in is the following lines
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""
We want to add net.ifnames=0
to GRUB_CMDLINE_LINUX_DEFAULT
which handles the default commandline options and passes it to our Proxmox GRUB entry. Your new config should look something like this
GRUB_DEFAULT=0
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet net.ifnames=0"
GRUB_CMDLINE_LINUX=""
After applying these changes, you have to update your GRUB entries by using the following command
update-grub
After applying the changes using the update-grub
command you should apply some changes to your Proxmox VE node before rebooting, this will be outlined on the last step on this guide.
EFI method
If you are using UEFI then this guide is for you.
The guide for EFI is pretty simple as well. just like before It involves just editing a single config and updating boot entries
For EFI boot on Proxmox VE, We need to edit the /etc/kernel/cmdline
config. use your choice of text editor.
nano /etc/kernel/cmdline
Upon viewing the file you should see your default config. In my case it contains ZFS entries as I used ZFS as the boot filesystem
root=ZFS=rpool/ROOT/pve-1 boot=zfs
We only need to append to the end net.ifnames=0
like so
root=ZFS=rpool/ROOT/pve-1 boot=zfs net.ifnames=0
After making this change, since we're on Proxmox VE just use the built in command which is
proxmox-boot-tool refresh
This should automatically update entries for you