[SOLVED] Getting Ethernet card enabled at startup...
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
I searched around here and on the web for problems similar to this, got some good info, but my problem seems to be somewhat unique...
I've been trying to get my Ethernet card to auto-enable when the computer boots up, but so far, all I can manage to do is get it to not error out.
I'm using Slackware 12.2 with KDE. I got into the Network Settings app in KDE and got it configured and all that, but when I click "Activate when the computer starts" it puts:
eth_up 0
eth_up 0
at the very beginning of my /etc/rc.d/rc.inet1 file, even before #!/bin/sh.
This doesn't work so well. Originally, it had "eth_up 0" 50 or so times, i guess from me clicking that check box over and over because it always goes back to unchecked. But, when it had the 50 lines, it would enable the card at boot-time, but it would give me 50 errors saying "eth_up command not found".
So I removed the lines and now it doesn't want to enable it. I've gotten into the rc.inet1.conf file and put USE_DHCP="yes" for the net card, but it didn't do much. and I tried using static settings, but same deal. It works just fine with those settings, like i can browse the internet and stuff, but I can't figure out how to make it enabled during bootup.
I read that eth_up was replaced by if_up after slackware 10.2, and my rc.inet1 is stamped v10.2... like this:
# @(#)/etc/rc.d/rc.inet1 10.2 Sun Jul 24 12:45:56 PDT 2005 (pjv)
In case that may help...
But, I tried putting if_up 0 at the beginning, and then i tried it right after #!/bin/sh but it didn't do anything either time.
I don't know... I know I'm missing something, but I can't figure out what.
I've gotten into the rc.inet1.conf file and put USE_DHCP="yes" for the net card, but it didn't do much. and I tried using static settings, but same deal. It works just fine with those settings, like i can browse the internet and stuff, but I can't figure out how to make it enabled during bootup.
You should not mess with rc.inet1. The network configuration is written in rc.inet1.conf. If you have backups of these files revert back to the backups and use
Code:
netconfig
to configure your network.
To bring the nic up at system startup just make sure that rc.inet1 is executable:
umm ... hope this will guide you in the right direction: (this is how it can be done on a redhat box, i am sure the file location will be pretty much the same in ur OS as well).
Though this is not a GUI based solution, this is what really happens when you do it via the GUI as well.
Open a console to your system, become root and look for the file /etc/sysconfig/network-scripts/ifcfg-eth0 - basically your interface config file.
The contents of the file will look something like this:
DEVICE=eth0 # the name of interface
BOOTPROTO=static # whether ur inteface is set for DHCP or static
ONBOOT=yes # this is the value that you should change - it means bring up interface when system boots (like enable on boot)
IPADDR=10.1.1.1
NETMASK=255.255.255.0
You should not mess with rc.inet1. The network configuration is written in rc.inet1.conf. If you have backups of these files revert back to the backups and use
Code:
netconfig
to configure your network.
To bring the nic up at system startup just make sure that rc.inet1 is executable:
Code:
chmod +x /etc/rc.d/rc.inet1
Well, like I said,
Quote:
Originally Posted by ryan858
when I clicked "Activate when the computer starts" it put:
eth_up 0
eth_up 0
at the very beginning of my rc.inet1
So I removed the lines ... and got into the rc.inet1.conf file and put USE_DHCP="yes" for the net card, but it didn't do much.
I'm not messing with the actual script, just the config file. But KDE's net config app decided to put that those lines in before #!/bin/sh in the script, and that led to 50 "command not found" errors, as well as, when i put those lines back, it didn't even load the file because it didn't recognize it as a shell script, since those lines were in before#!/bin/sh. So I'm just going to leave those lines out because i doubt they're supposed to be there. I'm sure they weren't there before I messed with the GUI app.
But still, as for actually getting it working, I haven't seen anything in the conf file that will help. But I'll try netconfig. And make sure the script is executable.
Quote:
Originally Posted by sigey
Open a console to your system, become root and look for the file /etc/sysconfig/network-scripts/ifcfg-eth0 - basically your interface config file.
The contents of the file will look something like this:
DEVICE=eth0 # the name of interface
BOOTPROTO=static # whether ur inteface is set for DHCP or static
ONBOOT=yes # this is the value that you should change - it means bring up interface when system boots (like enable on boot)
IPADDR=10.1.1.1
NETMASK=255.255.255.0
Hope this helps.
thanks
I don't even have that sysconfig directory. But I think that's basically what my /etc/rc.d/rc.inet1.conf is. Unfortunately, it has nothing about ONBOOT or anything about boot-time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.