4

I know I can use net.ifnames=0 biosdevname=0, with grub, 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?

6
  • If possible you should avoid doing this entirely. Predictable network device names have many advantages over the old system, especially for administrators. – Michael Hampton May 19 '15 at 0:46
  • @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 – Dru May 19 '15 at 0:49
  • All of those comments applied (1) to the beta, and (2) to virtual machines. They have long since been fixed. – Michael Hampton May 19 '15 at 1:11
  • @MichaelHampton I'm still getting enp0s3, enp0s8, enp0s9, enp0s11 using vagrant/virtual box as of CentOS 7.1 (1503). – Dru May 19 '15 at 1:14
  • Well, you can't expect VirtualBox to be consistent. It's not like that's a serious virtualization platform. – Michael Hampton May 19 '15 at 1:17
5

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
4
  • Are the rhgb quiet crashkernel... parameters necessary or can I just do --append="net.ifnames=0"? – Dru May 19 '15 at 0:56
  • I have not tested it without rhgb quiet crashkernel, as they were defaults, but none of them should be required to have a booting install. – jscott May 19 '15 at 1:00
  • Worked with just --append="net.ifnames=0" and -biosdevname under packages. – Dru May 19 '15 at 1:24
  • @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. – mvillar May 19 '15 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.