Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When i say “all eth0 goes bad" i mean who there isnt network,and i think the archive ifconfig.eth0 is bad writed.
Yes,i booted lfs for first time and there isnt network,but in the host distro (xubuntu live) there was network,my resolv.conf file looks like:
Now i think a new theory,the error will be in ifconfig.eth0.
Well okay, but that's a very simple config file. I will tell you how to square that away right now and eliminate it from this puzzle once and for all. Start with the book's example, but it's only a template. You almost certainly will need to change the IP, GATEWAY, and BROADCAST values. Start with GATEWAY...
GATEWAY=xxx.xxx.xxx.xxx
This usually is just the IP address of your router. If you don't know it, you can find the router's default IP address in the router's manual or the manufacturer's web site. You may have changed the router's IP address from the default value, but then you will know what it is.
BROADCAST=xxx.xxx.xxx.255
The standard value for this is the router's IP address with the last octet changed to 255.
IP=xxx.xxx.xxx.yyy
This is the static IP address to be acquired from the router. Again, this is the router's IP address but with the last octet (yyy) changed to any number that is in the IP address range for clients that is set in the router. If you don't know that IP address range, then boot into the host system and enter the router's config utility. You will find it somewhere in there. Look for an IP start address and end address, or sometimes it's a start address and number of allowed clients. With that information, you can set a valid IP value.
There. The ifconfig.eth0 file is fixed and can be set aside. Onward to more common Ethernet problems.
The Kernel Driver
Fortunately, and unlike wireless devices, almost all wired Ethernet adapters "just work" in Linux. But the kernel has to be configured to build its driver. Some drivers are set by default, others are not. You may need to do that. Usually the host system used to build the LFS system is the best source of information about the Ethernet driver you need. That driver is usually easy to figure out by studying the host system's lspci -k output as someone above already mentioned. It will tell exactly which kernel driver module the host system is using to operate the Ethernet device. For that kernel driver to be built, its kernel config symbol (e.g., CONFIG_SOMETHING) needs to be set to y or m in your LFS kernel configuration. It's usually not obvious what a driver's kernel config symbol is. I usually find out the config symbol for a module at www.cateee.net. There may be some better way, but I just enter a Google search for the module and add site:cateee.net right after the module name. For my Ethernet driver module, as an example, I would enter in Google... tg3 site:cateee.net. And I would see the following and learn that my tg3 driver module's kernel config symbol is CONFIG_TIGON3...
Okay? Now you can find out your Ethernet kernel module and discover its kernel config symbol. Then see if it is set to y or m in your LFS kernel's config file by simply using grep on the config file in /boot of your LFS system for that config symbol, like this for my Ethernet module's config symbol...
So for example, my kernel Ethernet module in lspci is tg3, and its config symbol is CONFIG_TIGON3, and it is set to m. If yours is not set to y or m, then you need to recompile your kernel and make it so.
The Udev Rule
Usually, a udev rule magically appears in /etc/udev/rules.d/70-persistent-net.rules. See if one is there for your device. If not, then try running this command as root...
Code:
/lib/udev/init-net-rules.sh
It probably will create one.
Conclusion
These are some common Ethernet issues that I have seen around here and experienced myself. I think if you do the stuff above, good things will happen. No promises though.
I doed all, but, I DONīT HAVE GATEWAY?!?. Windows cmd tells me who i havent gateway in the virtual machine.
There are any program who configures that automaticaly? I am truelly desesperated.
The rest of the thinks (kernel options, udev rule) are corrected and ok, but it still no working.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.