Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Clarification on which modules I should load
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Bobbbay
n00b
n00b


Joined: 15 Jul 2020
Posts: 49
Location: Everywhere

PostPosted: Tue Aug 25, 2020 6:27 pm    Post subject: [SOLVED] Clarification on which modules I should load Reply with quote

Hello all,

I've recently completed an install of Gentoo ( 8) ) and discovered that when I run ifconfig, I don't have my ethernet or wireless card list (I will be connecting via wireless). FYI I only have the loopback, so I assume this is a driver thing.

Hence, my problem: I'm not sure which drivers to enable/modules to load.

TL;DR I know that I need to load as <M>, etc. Just don't know which options to check :)

P.S. Here's my PC, if needed: https://support.hp.com/ca-en/document/c03791266


Last edited by Bobbbay on Wed Aug 26, 2020 6:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
The_Great_Sephiroth
Veteran
Veteran


Joined: 03 Oct 2014
Posts: 1519
Location: Fayetteville, NC, USA

PostPosted: Tue Aug 25, 2020 7:42 pm    Post subject: Reply with quote

You can figure it out easily. In your live CD/DVD/USB environment, simply type lspci -knn and you will get a list of hardware and what drivers are being used. Search for the driver name in the kernel config. For example, I use the e100e driver on my LAN card. Searching for "e1000e" in the kernel locates the driver location.

*EDIT*

I personally build all hardware drivers which cannot change into my kernel. This includes things on the motherboard such as LAN or USB hubs. I do NOT build in externally connected things like USB devices.

You may also need firmware for a wireless card. You can, from the live environment, do dmesg | grep firm to see if any firmware was loaded by your wireless NIC.
_________________
Ever picture systemd as what runs "The Borg"?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46684
Location: 56N 3W

PostPosted: Tue Aug 25, 2020 8:05 pm    Post subject: Reply with quote

Bobbbay,

You might have the right drivers installed already.
Knowing the make and model is not a lot of help. PC manufacturers keep swapping bits.

We need the output of
Code:
lspci -nnk
and
Code:
lsusb
to know what you have in your system.

If the drivers are there but not configured, the interfaces will show in
Code:
ifconfig -a

The wifi may need firmware but we can cover that.

Boot whatever you like to run
Code:
lspci -nnk
and
Code:
lsusb

You need to boot your own Gentoo to run
Code:
ifconfig -a

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Bobbbay
n00b
n00b


Joined: 15 Jul 2020
Posts: 49
Location: Everywhere

PostPosted: Tue Aug 25, 2020 8:09 pm    Post subject: Reply with quote

The_Great_Sephiroth wrote:
You can figure it out easily. In your live CD/DVD/USB environment, simply type lspci -knn and you will get a list of hardware and what drivers are being used. Search for the driver name in the kernel config. For example, I use the e100e driver on my LAN card. Searching for "e1000e" in the kernel locates the driver location.

*EDIT*

I personally build all hardware drivers which cannot change into my kernel. This includes things on the motherboard such as LAN or USB hubs. I do NOT build in externally connected things like USB devices.

You may also need firmware for a wireless card. You can, from the live environment, do dmesg | grep firm to see if any firmware was loaded by your wireless NIC.


Thank you! I ran lspci -knn, saw my wireless controller, found the module, enabled it, compiled the kernel + installed modules + moved to /boot, added the module to auto-load (/etc/modules-load.d/network.conf), and it's still not working. Additionally, when I lspci -knn, my network controller has both a driver in use and a module in use (both ath9k). Not sure if it should be like that, but FYI :)

Help appreciated! I most probably missed a necessary step in enabling ifconfig, or something of the sorts :wink:

EDIT: oh, didn't see the other message :) reading that now!
Back to top
View user's profile Send private message
Bobbbay
n00b
n00b


Joined: 15 Jul 2020
Posts: 49
Location: Everywhere

PostPosted: Tue Aug 25, 2020 8:18 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Bobbbay,

You might have the right drivers installed already.
Knowing the make and model is not a lot of help. PC manufacturers keep swapping bits.

We need the output of
Code:
lspci -nnk
and
Code:
lsusb
to know what you have in your system.

If the drivers are there but not configured, the interfaces will show in
Code:
ifconfig -a

The wifi may need firmware but we can cover that.

Boot whatever you like to run
Code:
lspci -nnk
and
Code:
lsusb

You need to boot your own Gentoo to run
Code:
ifconfig -a


https://imgur.com/a/aM52oER

Seems like it indeed is a firmware problem. Stupid me, I ran dmesg | grep firm in the Live USB and not in the actual boot, which seems to be why I didn't get output at first and dismissed firmware :wink:

P.S. I have indeed installed sys-kernel/linux-firmware, according to emerge -p sys-kernel/linux-firmware (returns an R).

EDIT: now dmesg | grep firm returns
Code:
platform regulatory.0: Direct firmware load for regulatory.db failed with error -2


EDIT 2: FYI /var/db/pkg/sys-kernel/linux-firmware exists

EDIT 3: What I find weird is that ath9k is supposedly loaded through linux-fw, according to the table of the WiFi wiki page.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46684
Location: 56N 3W

PostPosted: Tue Aug 25, 2020 8:39 pm    Post subject: Reply with quote

Bobbbay,

Your top image shows enps0 and wlp3s0, which are your wired and wifi interfaces respectively.
They have not been configured as the packet counts are all zero.

The wired interface needs the r8169 kernel module and the wifi needs the ath9k module.
The lspci image shows both loaded. So far so good.
As an aside, the Wifi card illustrated in your link to your PC requires the ath5k module, so that would not have worked for you.

The firmware
Code:
platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
tells the kernel what channels are in use in what countries and what Tx powers can be used. We can fix that later. Wifi will still work but not at its best.

Networking configuration is covered in the Gentoo Handbook

Wired networking will probably work if you connect a cable and do
Code:
busybox udhcpc enps0

That will be handy if you need to install more packages to make WiFi work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Bobbbay
n00b
n00b


Joined: 15 Jul 2020
Posts: 49
Location: Everywhere

PostPosted: Tue Aug 25, 2020 9:00 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Bobbbay,

Your top image shows enps0 and wlp3s0, which are your wired and wifi interfaces respectively.
They have not been configured as the packet counts are all zero.

The wired interface needs the r8169 kernel module and the wifi needs the ath9k module.
The lspci image shows both loaded. So far so good.
As an aside, the Wifi card illustrated in your link to your PC requires the ath5k module, so that would not have worked for you.

The firmware
Code:
platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
tells the kernel what channels are in use in what countries and what Tx powers can be used. We can fix that later. Wifi will still work but not at its best.

Networking configuration is covered in the Gentoo Handbook

Wired networking will probably work if you connect a cable and do
Code:
busybox udhcpc enps0

That will be handy if you need to install more packages to make WiFi work.


Sorry, so here's what I understand from what you've said:
- enps0 and wlp3s0 are listed in ifconfig -a and are my interfaces (knew that)
- lspci shows both kernel modules loaded
- The wifi module listed in my PC is ath5k
- Run xxx to start up ethernet

Regarding the ethernet, that's just icing on the cake because I won't be using it, nor do I have an ethernet wire upstairs. Of course I would rather still have it.

Therefore, I believe what I should proceed on with is enabling ath5k. Once done, I can run some commands for ethernet, but without actually using it.

Sorry if I misunderstood :wink:

(compiling kernel with ath5k at the moment)
Update: compiled, trying to enable ath5k and remove ath9k, not working...
(using modprobe -r ath9k && modprobe ath5k)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46684
Location: 56N 3W

PostPosted: Tue Aug 25, 2020 9:22 pm    Post subject: Reply with quote

Bobbbay,

ath5k is what the image at https://support.hp.com/ca-en/document/c03791266 under Wireless LAN 802.11b/g/n featuring Single-band (2.4Ghz) 1x1 shows.
The model number is ar5...

Your lspci image showed that you require and have ath9k. At least, you did have.
I was trying to explain why we needed to know what was fitted to your particular system and not trust what the website said.

I suspect that you don't have wpa-supplicant nor dhcpcd installed, so I suggested
Code:
busybox udhcpc enps0
as a one time get you going measure.
You normally need networking to install things but its not essential.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Bobbbay
n00b
n00b


Joined: 15 Jul 2020
Posts: 49
Location: Everywhere

PostPosted: Tue Aug 25, 2020 9:30 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Bobbbay,

ath5k is what the image at https://support.hp.com/ca-en/document/c03791266 under Wireless LAN 802.11b/g/n featuring Single-band (2.4Ghz) 1x1 shows.
The model number is ar5...

Your lspci image showed that you require and have ath9k. At least, you did have.
I was trying to explain why we needed to know what was fitted to your particular system and not trust what the website said.

I suspect that you don't have wpa-supplicant nor dhcpcd installed, so I suggested
Code:
busybox udhcpc enps0
as a one time get you going measure.
You normally need networking to install things but its not essential.


Ah I see, makes more sense. All good then!

As a matter of fact I do have wpa_supplicant installed, and that's how I would like to connect.

FYI I've followed the docs for Wireless Networking using wpa_supplicant.

busybox udhcpc enps0 returns
Code:
udhcpc: SIOCGIFINDEX: No such device

I'm a strange guy so I tried it with enp4s0 (my interface) and it returned the same thing.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46684
Location: 56N 3W

PostPosted: Tue Aug 25, 2020 9:41 pm    Post subject: Reply with quote

Bobbbay,

You need to share dmesg on a pastebin site,
Your /etc/conf.d/net
and
/etc/wpa_supplicant/wpa_supplicant.conf
Feel free to remove the SSID and PSK.

We need to know if you PSK is a text string, as shown in the handbook or a list of hex digits.
They are entered differently and it matters.

You can save dmesg to a USB stick and pastebin it from elsewhere.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Bobbbay
n00b
n00b


Joined: 15 Jul 2020
Posts: 49
Location: Everywhere

PostPosted: Tue Aug 25, 2020 9:55 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Bobbbay,

You need to share dmesg on a pastebin site,
Your /etc/conf.d/net
and
/etc/wpa_supplicant/wpa_supplicant.conf
Feel free to remove the SSID and PSK.

We need to know if you PSK is a text string, as shown in the handbook or a list of hex digits.
They are entered differently and it matters.

You can save dmesg to a USB stick and pastebin it from elsewhere.


Of course!

dmesg*

/etc/conf.d/net
Code:
# This states for the system to use wpa_supplicant, instead
# of wireless_tools.
modules="wpa_supplicant"


/etc/wpa_supplicant/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0

ap_scan=1

network={
   ssid="somessid"
   psk="somepassword"
   priority=5
}


Thanks!

*Note for dmesg: sdc is the USB I plugged in to throw over the text for pastebin :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46684
Location: 56N 3W

PostPosted: Wed Aug 26, 2020 5:15 pm    Post subject: Reply with quote

Bobbbay,

Code:
[    4.525298] r8169 0000:04:00.0 enp4s0: renamed from eth0
[    4.801996] ath9k 0000:03:00.0: enabling device (0100 -> 0102)
[    4.809781] ath: phy0: Enable LNA combining
[    4.811040] ath: phy0: ASPM enabled: 0x43
[    4.811041] ath: EEPROM regdomain: 0x60
[    4.811041] ath: EEPROM indicates we should expect a direct regpair map
[    4.811042] ath: Country alpha2 being used: 00
[    4.811043] ath: Regpair used: 0x60
[    4.811550] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    4.811793] ieee80211 phy0: Atheros AR9485 Rev:1 mem=0xffffa0c080480000, irq=17
[    4.846001] ath9k 0000:03:00.0 wlp3s0: renamed from wlan0


That's both your interfaces looking good but that's all there is, there is no attempt to start either.

Did you create /etc/init.d/net.wlp3s0 as a symbolic link to net.lo ?
Do that, add net.wlp3s0 to the default runlevel, so it starts on boot, then to save rebooting do
Code:
/etc/init.d/net.wlp3s0 start

That should bring up your wifi.

Code:
[    0.571629] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    0.571943] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    0.571948] ALSA device list:
[    0.571949]   No soundcards found.
[    0.571985] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
...
[    1.003661] VFS: Mounted root (ext4 filesystem) readonly on device 8:4.

You have cfg80211 built into the kernel, so it needs the regulatory.db built in too. /lib/firmware is not available until root is mounted, about 0.5 sec too late.
Alternatively, make cfg80211 a module.
All kernel code that loads firmware, needs the firmware available when the code is initialised.

Code:
[    0.571948] ALSA device list:
[    0.571949]   No soundcards found.

That can be a problem for later :)

-- edit --

[ 0.191935] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
There may or may not be a microcode update from Intel for your CPU.
If there is, the kernel can load it.
Add that to your TODO list.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Bobbbay
n00b
n00b


Joined: 15 Jul 2020
Posts: 49
Location: Everywhere

PostPosted: Wed Aug 26, 2020 6:31 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Bobbbay,

Code:
[    4.525298] r8169 0000:04:00.0 enp4s0: renamed from eth0
[    4.801996] ath9k 0000:03:00.0: enabling device (0100 -> 0102)
[    4.809781] ath: phy0: Enable LNA combining
[    4.811040] ath: phy0: ASPM enabled: 0x43
[    4.811041] ath: EEPROM regdomain: 0x60
[    4.811041] ath: EEPROM indicates we should expect a direct regpair map
[    4.811042] ath: Country alpha2 being used: 00
[    4.811043] ath: Regpair used: 0x60
[    4.811550] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    4.811793] ieee80211 phy0: Atheros AR9485 Rev:1 mem=0xffffa0c080480000, irq=17
[    4.846001] ath9k 0000:03:00.0 wlp3s0: renamed from wlan0


That's both your interfaces looking good but that's all there is, there is no attempt to start either.

Did you create /etc/init.d/net.wlp3s0 as a symbolic link to net.lo ?
Do that, add net.wlp3s0 to the default runlevel, so it starts on boot, then to save rebooting do
Code:
/etc/init.d/net.wlp3s0 start

That should bring up your wifi.

Code:
[    0.571629] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    0.571943] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    0.571948] ALSA device list:
[    0.571949]   No soundcards found.
[    0.571985] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
...
[    1.003661] VFS: Mounted root (ext4 filesystem) readonly on device 8:4.

You have cfg80211 built into the kernel, so it needs the regulatory.db built in too. /lib/firmware is not available until root is mounted, about 0.5 sec too late.
Alternatively, make cfg80211 a module.
All kernel code that loads firmware, needs the firmware available when the code is initialised.

Code:
[    0.571948] ALSA device list:
[    0.571949]   No soundcards found.

That can be a problem for later :)

-- edit --

[ 0.191935] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
There may or may not be a microcode update from Intel for your CPU.
If there is, the kernel can load it.
Add that to your TODO list.


That was it! Writing cd /etc/init.d && ln -s net.lo net.wlp3s0 did the trick. I can finally emerge some stuff!

I will definitely work on cfg80211 as well as fix the soundcard and microde stuff!

Thank you tons for your help! Solved!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum