Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

Install wireless driver, 'chroot'-ing from Kubuntu





I have a working Funtoo system (thanks to nrc and sputnik). Unfortunately my usb wireless card was not recognized. ifconfig shows only the lo interface.


Now I would like to install the wireless driver from a working Kubuntu system.


When I 'chroot' into Funtoo, will the wireless connection remain alive?


I tried this but I get an error at the chroot command:


mount /dev/sda2 /mnt/funtoo

mount /dev/sdb2 /mnt/funtoo/home

cd /mnt/funtoo

mount -t proc none proc

mount --rbind /sys sys

mount --rbind /dev dev


env -i HOME=/root TERM=$TERM chroot . bash -l

env: chroot: No such file or directory


Any idea?



Link to comment
Share on other sites

21 answers to this question

Recommended Posts

  • 0

This is really weird, try to see if udev report any error, run as root 'udevadm monitor' and plug the device, and watch the contents of /proc/net/dev and /proc/net/wireless, I don't think the problem is the kernel, but can try using sys-kernel/gentoo-sources, and use iwconfig from wireless-tools, and ip from iproute2, instead of ifconfig, there might be a bug that's causing this, in which case I can only help you find out what is causing it, it's up to you to report it to the proper people.

Link to comment
Share on other sites

  • 0

You don't need to boot other OS in order to get a new driver, you should already have the kernel source code on your system, first find out which driver supports your device(google might help you with that) and the name of the kernel configuration variable that enables it, should be something like 'CONFIG_YOURMODULE', then verify its compiled and supported for the specific kernel version you are using, if your hardware is new you might need the latests version you can get.
modprobe 'module_name'

If  you don't have it,  you can compile it you just need to enable it in your kernel .config, rebuild and reinstall, no need to reboot if you build it as a module and not inside the kernel image.
If you need further help post the hardware model and version, and your kernel configuration.

Link to comment
Share on other sites

  • 0

Hello benzolius!


As j-g- mentioned, you don't have to boot into another system, unless that's the only way to download the driver because of your wireless connection.


My question would be, what wireless card do you have. If the wireless card is so new that it's not in the kernel (as happened with my new laptop recently), you'll have to do some research to find and compile the module yourself.


could you post the output of :

sudo lspci
Link to comment
Share on other sites

  • 0

Previous responses contain good information about identifying the correct driver.  But the comment that he has only the loopback interface suggests that he needs to run Kubuntu to have the network connection he needs to get the driver.


Yes, when you chroot your network connection will remain active.


On your chroot command, try using the full path to your chroot executable, possibly '/bin/chroot'.

Link to comment
Share on other sites

  • 0

If you haven't found out yet you need, to enable 'CONFIG_RT2800PCI_RT35XX' to build it, see [1], the easiest way is to run 'make menuconfig' on your kernel source directory, and use '/' and search for 'RT2800PCI_RT35XX', or go:


  ?     -> Device Drivers 
  ?       -> Network device support
  ?         -> Wireless LAN
  ?           -> Ralink driver support
  ?             -> Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support 


I'm running a 3.15.3 gentoo-sources kernel, and when I searched with menuconfig, this particular config was marked as 'EXPERIMENTAL', so it seems like recently added, make sure it is actually supported if you're planning to run an older kernel.

[1] http://cateee.net/lkddb/web-lkddb/RT2800USB.html

Link to comment
Share on other sites

  • 0

Sorry, is not a trivial task for me, to configure the kernel. I did it only once with Gentoo.


I read here: http://www.funtoo.org/Funtoo_Linux_Kernels


"It is necessary to name the kernel configuration file something other than ".config" to avoid errors with genkernel."


Should I do that after "make oldconfig" and "make menuconfig"?


I suspect, yes and so I screwed up things, but I learnt a lot now.


I'll try again.


Thanks for the help.

Link to comment
Share on other sites

  • 0

I didn't compile the default funtoo kernel, but I bet it has CONFIG_IKCONFIG enabled, so look for /proc/config.gz and copy it anywhere, as a backup of your current kernel, if you are going to use the same version you can try building a new configuration to use with genkernel, if you already have the source under /usr/src/linux, you might do something as follows:

# zcat /proc/config.gz > /usr/src/linux/.config
# cd /usr/src/linux
# make menuconfig

Using '/' you can get a search dialog, and you can search for 'RT2800PCI_RT35XX'.

You'll get something like this:

 Symbol: RT2800PCI_RT35XX [=y]                                                                                                                            
 Type  : boolean                                                                                                                                          
 Prompt: rt2800pci - Include support for rt35xx devices (EXPERIMENTAL)                                                                                    
     -> Device Drivers                                                                                                                                    
       -> Network device support (NETDEVICES [=y])                                                                                                        
         -> Wireless LAN (WLAN [=y])                                                                                                                      
           -> Ralink driver support (RT2X00 [=m])                                                                                                         
 (1)         -> Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support (RT2800PCI [=m])                                                                    
   Defined at drivers/net/wireless/rt2x00/Kconfig:87                                                                                                      
   Depends on: NETDEVICES [=y] && WLAN [=y] && RT2X00 [=m] && RT2800PCI [=m]                                                                              

you can hit '1' (or if you got more options the number you want) and it will take right to the config section, if you have the Dependencies already enabled, Notice:

  Depends on: NETDEVICES [=y] && WLAN [=y] && RT2X00 [=m] && RT2800PCI [=m]                                                                              

I Had to enable first those, to be able to see 'CONFIG_RT2800PCI_RT35XX', in my case(I build a only-what-i-need kernel) so my desktop had wireless completely disabled, I don't think that is your case, but, make sure the dependecies for the module you are building are enabled , in this case the last three if you notice  above are in the location in cascade, so if you navigate through menuconfig when you enable CONFIG_WLAN you get a submenu where CONFIG_RT2X00 is available, as 'Ralink driver support' :

< >   Softmac Prism54 support                   
<M>   Ralink driver support  --->               
< >   Realtek rtlwifi family of devices  ----   
[ ]   TI Wireless LAN support  ----

And in there is what you need, you can also change 'CONFIG_LOCALVERSION' to something you like, so your anything you have now stays untouched(kernel-image and modules), when you finish save your config, you will be asked for a name, defaults to .config. Then recompile I've never used genkernel to build my kernels so I really don't know it but, funtoo wiki says this should do the work:

# genkernel --kernel-config=$YOUR_CONFIG_NAME all

I hope this helps you, and give it a read at 'make help' in the kernel source directory, all the 'make *config' and building/packaging options are described there, if you are more curious unpack a kernel tarball under any directory you want as an unprivileged user copy your running config file as mentioned above to the as .config, run make menuconfig and start tweaking, you can even build binary tarballs of your  kernel image and modules with 'make tarxz-pkg' as an example before installing anything for real in your system.

Link to comment
Share on other sites

  • 0

Hi j-g-,


Many thanks for the detailed explanation.

Unfortunately I screwed up my systems a bit and I don't like it. I'll not detail the issues now. Perhaps I'll start from scratch again.

Now I've found how can I set the wireless from systemrescuecd graphical environment and I can reinstall the system anytime.

I'm in the process of learning, it's a fun experience.


I'll announce the result.

Best regards.


Link to comment
Share on other sites

  • 0



I'm very grateful for the Funtoo community. I learnt to configure the kernel with config-extract, menuconfig, genkernel.


Unfortunately the wireless card doesn't appear yet.


@j-g-    It seems that the mentioned config values were 'y' by default, I didn't change them:


cat .config | grep RT2


# CONFIG_RT2800USB_UNKNOWN is not set
# CONFIG_RT2X00_DEBUG is not set
I am going to investigate the working kernels (Kubuntu, systemrescuecd).
Best regards
Link to comment
Share on other sites

  • 0

This is starting to sound like a firmware problem, you should have then the module rt3573 in /lib/modules/${kernel_version}/, search with `find` in that directory for "rt3573*" just  to confirm the *.ko file exist, if is there try to load it, if still nothing, this might be a firmware problem, do you have sys-kernel/linux-firmware installed in your system? I had a problem with firmware not being available to load for a Linksys card too some time ago(I just recalled this, though that was in debian).

Link to comment
Share on other sites

  • 0
Hi j-g-,


I checked the rt3573* file, is missing, but is missing even in Kubuntu. I think I don't need it.


I'm sure I emerged linux-firmware during install, but I did it again from chrooted environment.



I compared the output of lsmod in SystemRescueCd, Kubuntu and Funtoo.


It seems the only modules I don't have in Funtoo (and SystemRescueCd, Kubuntu both are using it) are:





I suspect the ccm module.


Do you have idea how to configure the kernel in order to include this module?


In any case, thanks for all your help. 

Link to comment
Share on other sites

  • 0

What kernel version are you using? 

You should also search the specific firmware you need and check it is in /lib/firmware, and boot the kernel to test.


I found that blog, when I googled a bit about your device, but it's from 2012, and things have changed since, don't try it, you won't  even find the file it's said to edit, anyway a couple of "grep -rin" inside drivers/net/wireless/rt2x00/, in the kernel sources, got me to:

drivers/net/wireless/rt2x00/rt2800usb.c, see line 1216, your device its already there.




#ifdef CONFIG_RT2800USB_RT3573
	/* AirLive */
	{ USB_DEVICE(0x1b75, 0x7733) },
	/* ASUS */
	{ USB_DEVICE(0x0b05, 0x17bc) },
	{ USB_DEVICE(0x0b05, 0x17ad) },
	/* Belkin */
	{ USB_DEVICE(0x050d, 0x1103) },
	/* Cameo */
	{ USB_DEVICE(0x148f, 0xf301) },
	/* D-Link */
	{ USB_DEVICE(0x2001, 0x3c1f) },
	/* Edimax */
	{ USB_DEVICE(0x7392, 0x7733) },
	/* Hawking */
	{ USB_DEVICE(0x0e66, 0x0020) },
	{ USB_DEVICE(0x0e66, 0x0021) },
	/* I-O DATA */
	{ USB_DEVICE(0x04bb, 0x094e) },
	/* Linksys */
	{ USB_DEVICE(0x13b1, 0x003b) },
	/* Logitec */
	{ USB_DEVICE(0x0789, 0x016b) },
	/* NETGEAR */
	{ USB_DEVICE(0x0846, 0x9012) },
	{ USB_DEVICE(0x0846, 0x9013) },
	{ USB_DEVICE(0x0846, 0x9019) },
	/* Planex */
	{ USB_DEVICE(0x2019, 0xed19) },
	/* Ralink */
	{ USB_DEVICE(0x148f, 0x3573) },
	/* Sitecom */
	{ USB_DEVICE(0x0df6, 0x0067) },
	{ USB_DEVICE(0x0df6, 0x006a) },
	{ USB_DEVICE(0x0df6, 0x006e) },
	/* ZyXEL */
	{ USB_DEVICE(0x0586, 0x3421) },


As previously said I'm running a 3.15.* gentoo-sources kernel.

Since its a usb device, try when running funtoo(not in chroot), run dmesg without the device, imediatly plug it in, run dmesg again, and see what happened, or post it here.

EDIT: I enabled the options you need in my kernel config, basically RT2x00, RT2800USB, RT2800USB_RT3573, and build a tarball, then looking at the drivers built here is a list of the relevant files, created:






So what you need to load is rt2800usb, not rt3573 nor rt3573sta as we were thinking.

Link to comment
Share on other sites

  • 0

I'm using debian-sources 3.14.4-1


In lib/firmware I have only rt2860.bin, rt2870.bin (from rt28xx)


Here is a diff of dmesg before and after device plugin:


> [  190.525760] usb 7-1: new high-speed USB device number 2 using ehci-pci
> [  190.674366] usb 7-1: New USB device found, idVendor=13b1, idProduct=003b
> [  190.674373] usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [  190.674377] usb 7-1: Product: Linksys AE3000
> [  190.674380] usb 7-1: Manufacturer: Linksys
> [  190.674383] usb 7-1: SerialNumber: 1.00
> [  190.731057] cfg80211: Calling CRDA to update world regulatory domain
> [  190.921385] usb 7-1: reset high-speed USB device number 2 using ehci-pci
> [  191.062978] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3593, rev 0402 detected
> [  191.092671] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 000d detected
> [  191.100782] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> [  191.101337] usbcore: registered new interface driver rt2800usb
modprobe loads rt2800usb, too.
I have all the rt2*00*.ko files you mentioned in /lib/modules/3.14.4-1/kernel/drivers/net/wireless/rt2x00
I don't understand why the interface doesn't show up.
Link to comment
Share on other sites

  • 0

At least we know now the kernel is detecting it, What's the output of 'rfkill list' is phy0 blocked?


PD: If you ever need to troubleshoot a wireless adapter again, go from bottom to top in this thread, we did it all backwards haha, sorry for that. I really thought from the beginning you didn't even had your driver compiled.

Link to comment
Share on other sites

  • 0

Hi j-g-,


You are very steadfast to solve this issue, I appreciate it very much.


Output of rfkill list:


0: phy0: Wireless LAN

             Soft blocked: no

             Hard blocked: no



In the dmesg log the RT chipset is 3593 not 3573, couldn't be the problem?


But in SystemRescueCd and Kubuntu ( kernel) works with the same rt2800usb module.


I compared the firmware files rt28*0.bin from Kubuntu, they are the exact same files in Funtoo.

Link to comment
Share on other sites

  • 0

Hi j-g-,


iwconfig and 'ip a' shows wlan0. Fantastic!


Sorry, I could not imagine this.


I realized only now that ifconfig didn't show eth0 either.


Should I file a bug report for ifconfig? Unfortunately I could not find where to do that.


I'm going to emerge NetworkManager with --autounmask-write and I'll configure the network.


I learnt a lot with this issue, kernel configuration, about modules and a lot of commands to investigate these kind of problems.


Thanks a lot.

Link to comment
Share on other sites

  • 0

You should read the ifconfig manpage and learn a bit more about it, you're missing some basics, run now 'ifconfig -a' the problem is your interface was down, and don't assume the worst first, anyway you cannot really configure a wireless interface with ifconfig, and I have yet to find out if it's possible with iproute2, so use wireless-tools for testing/configuring wireless interfaces. You really seem to have not configured network interfaces with CLI tools before, do some read, or stick to GUI tools before assuming something is wrong with a tool you don't know.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...