LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Stuck at "eth0: waiting for carrier" on boot on -current (https://www.linuxquestions.org/questions/slackware-14/stuck-at-eth0-waiting-for-carrier-on-boot-on-current-4175663520/)

CyDFect 11-01-2019 07:37 AM

Stuck at "eth0: waiting for carrier" on boot on -current
 
Whenever I boot up my laptop, I get stuck at
Code:

eth0: waiting for carrier
, and when I'm able to login I have to run
Code:

wpa_supplicant -iwlan0 -B -c/etc/wpa_supplicant.conf
, then
Code:

dhcpcd
. I'm pretty sure this is because I never told /etc/rc.d/rc.inet1 that I want to use wlan0 instead of eth0, but I'm not certain. How would I get wpa_supplicant and dhcpcd to start on boot?

/etc/rc.d/rc.inet1.conf:
Code:

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
IPALIASES[0]=""
USE_DHCP[0]="Terminated


ehartman 11-01-2019 07:51 AM

Quote:

Originally Posted by CyDFect (Post 6052940)
/etc/rc.d/rc.inet1.conf:
Code:

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
IPALIASES[0]=""
USE_DHCP[0]="Terminated


At least the last should be USE_DHCP[0]="" as you're not using eth0 at all.
Terminated means there is a terminator PLUG into the eth0 port, so that it will echo probes TO that port.
And then fill in the fields for wlan0 in that config. I do not have any, so cannot tell you how. Anyway, that is different on each system.

slac 11-01-2019 10:51 PM

Here's the answer to your question
 
Hi. I'm going to help you (I hope)

In order to avoid getting stuck at boot time trying to connect through Ethernet do the following step(s):

Edit the file /etc/rc.d/rc.inet1.conf

> Just comment out the lines that were enabled to connect through Ethernet during your Slackware installation.

Just like this:

Code:

# Config information for eth0:
#IPADDR[0]=""
#NETMASK[0]=""
#IPALIASES[0]=""
#USE_DHCP[0]="yes"
#DHCP_HOSTNAME[0]=""

# Config information for eth1:
#IPADDR[1]=""
#NETMASK[1]=""
#IPALIASES[1]=""
#USE_DHCP[1]=""
#DHCP_HOSTNAME[1]=""

# Config information for eth2:
#IPADDR[2]=""
#NETMASK[2]=""
#IPALIASES[2]=""
#USE_DHCP[2]=""
#DHCP_HOSTNAME[2]=""

# Config information for eth3:
#IPADDR[3]=""
#NETMASK[3]=""
#IPALIASES[3]=""
#USE_DHCP[3]=""
#DHCP_HOSTNAME[3]=""

# Default gateway IP address:
#GATEWAY=""

Once those lines are commented you won't get stuck during boot time trying to connect to Ethernet.


NOW! In order to connect to a wireless network using wpa_supplicant during boot time you need to follow this/these step(s):

Edit the file /etc/rc.d/rc.inet1.conf and enable (remove the '#') these lines, OR you can write directly these lines by your own (just like I did):

Code:

IFNAME[4]="wlan0"
USE_DHCP[4]="yes"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPAWAIT[4]=5

Those lines are pretty explicit. Using wlan0 dev to connect to a wireless network using dhcp trough wpa_supplicant, if the connection is not successful just wait 5 seconds.

NOW! Let's configure which wpa_supplicant config file is going to be used to connect to the wireless network. Edit the file /etc/rc.d/rc.wireless:

Look up for these lines and edit according to your needs, ie:

Code:

WPACONF=${WLAN_WPACONF[$i]:-${WPACONF:="/etc/wpa_supplicant/wpa_supplicant-wlan0.conf"}}
WPAWAIT=${WLAN_WPAWAIT[$i]:-${WPAWAIT:="60"}}

The important line there is WPACONF, there's where you indicate which wpa_supplicant config file you're going to use to connect to the wireless network.

AND THAT'S IT! Let's resume:

Doing the above steps is the same as doing these commands manually:

# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
# dhcpcd wlan0

... but now they're done automatically at boot time! Hope it works, if you are still in doubt you can ask again.

igadoter 11-02-2019 10:13 AM

There is possible switch on your laptop ethernet/wifi. On my laptop this is being set in BIOS: enabling one network interface disables another. So you may have just hardware lock on on your network card: this is why kernel stops and waits. Also you may have a look for kernel boot parameters. There is possible workaround for such lock setting apriopriate boot parameter (there is above 200 of them).


All times are GMT -5. The time now is 07:19 AM.