Linux From Scratch for Newbies - Part 1
by vsayanam from LinuxQuestions.org on (#4XTJT)
TIP 2:
Various Linux distributions name the ethernet and wireless cards differently. The conventional names such as eth0 or wlan0 are convenient in LFS where we have to create a few files like ifconfig.eth0 etc. LFS Book suggests in Chapter 7.4.1.1 to add net.ifnames=0 on the kernel command line. Google search says we need to add biosdevname=0 for distributions like Ubuntu. This has worked in my case earlier but not now, What I do is to change ethernet name to eth0 in the file
/etc/udev/rules.d/70-persistent-net.rules. In case you add the second ethernet card or wireless dongle, running
bash /lib/udev/init-net-rules.sh
will not produce new result. What I do here is to rename 70-persistent-net.rules and then run the bash script. You will now find the new card which can be renamed as eth1 or wlan0. Please reply if you have any other idea.


Various Linux distributions name the ethernet and wireless cards differently. The conventional names such as eth0 or wlan0 are convenient in LFS where we have to create a few files like ifconfig.eth0 etc. LFS Book suggests in Chapter 7.4.1.1 to add net.ifnames=0 on the kernel command line. Google search says we need to add biosdevname=0 for distributions like Ubuntu. This has worked in my case earlier but not now, What I do is to change ethernet name to eth0 in the file
/etc/udev/rules.d/70-persistent-net.rules. In case you add the second ethernet card or wireless dongle, running
bash /lib/udev/init-net-rules.sh
will not produce new result. What I do here is to rename 70-persistent-net.rules and then run the bash script. You will now find the new card which can be renamed as eth1 or wlan0. Please reply if you have any other idea.