CentOS 7 disable predictable network interface names during install
9,068
You may use the bootloader section in the kickstart file to suppress predictable network interface names. Adding net.ifnames=0
and [if needed] biosdevname=0
to the --append
should do what you're asking.
bootloader --location=mbr --append="net.ifnames=0 biosdevname=0"
Note that I've excluded the defaults rhgb quiet crashkernel=auto
from the --append
, it will work with or without them. You may also exclude the biosdevname package from install and use only net.ifnames=0
in the above.
bootloader --location=mbr --append="net.ifnames=0"
...
%packages --nobase
@core --nodefaults
-biosdevname
%end
Related videos on Youtube
Author by
Dru
Updated on September 18, 2022Comments
-
Dru over 1 year
I know I can use
net.ifnames=0 biosdevname=0
, withgrub
, to disable predictable network interface names. This names the first interface as eth0 instead of enp0s3, or whatever. How do I specify this at install time using a kickstart file?-
Michael Hampton almost 9 yearsIf possible you should avoid doing this entirely. Predictable network device names have many advantages over the old system, especially for administrators.
-
Dru almost 9 years@MichaelHampton Right but currently the consistent naming is far from consistent. There's some interesting discussion here but I couldn't find my specific answer on this thread: access.redhat.com/discussions/644133
-
Michael Hampton almost 9 yearsAll of those comments applied (1) to the beta, and (2) to virtual machines. They have long since been fixed.
-
Dru almost 9 years@MichaelHampton I'm still getting enp0s3, enp0s8, enp0s9, enp0s11 using vagrant/virtual box as of CentOS 7.1 (1503).
-
Michael Hampton almost 9 yearsWell, you can't expect VirtualBox to be consistent. It's not like that's a serious virtualization platform.
-
Hai Nguyen about 8 yearsMaybe you could try with my the answer at: stackoverflow.com/questions/25671396/…
-
-
Dru almost 9 yearsAre the
rhgb quiet crashkernel...
parameters necessary or can I just do--append="net.ifnames=0"
? -
jscott almost 9 yearsI have not tested it without
rhgb quiet crashkernel
, as they were defaults, but none of them should be required to have a booting install. -
Dru almost 9 yearsWorked with just
--append="net.ifnames=0"
and-biosdevname
under packages. -
mvillar almost 9 years@jscott rhgb provides splash screen. quiet provides you a "silent" boot, if you remove it from bootloader, boot will be more verbose. crashkernel is used by kdump, you can remove it if you have kdump disabled or uninstalled.