Tuesday, February 2, 2016

networking - CentOS 7 disable predictable network interface names during install



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?


Answer



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


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...