Before I get to the meat of this post I’d like to introduce what I’m hoping will be an ongoing series here I’m calling “Learning Linux.” I’ve been using Linux (Ubuntu, to be specific) as my main OS for some time now, but my approach to learning Linux tools and internal details has been fairly haphazard. In order to make my learning more effective I’ve decided to apply some structure based on a trick for learning foreign languages I learned from my dad. I’ll be keeping track of both things I learned serendipitously and through necessity, and writing short explanations of them here in order to reenforce the learning. If you see anything wrong, please say so in the comments.
Recently I upgraded my Ubuntu installation to the latest release (12.04, Passionate Panda). As often happens after an Ubuntu upgrade, my wireless card stopped working. In order to feed my addiction to cat pictures without being chained to a router I had to switch out the wireless driver I was using (bcmwl) for a new one (b43). I looked at a couple different solutions, but this is the one that ended up working for me. In the process I learned about a couple new commands.
modprobe: modprobe is used to add or remove modules from the kernel. It’s smart enough to know about dependencies, so if you tell it to add a module you shouldn’t need to also specify its dependencies. The author of the link above uses modprobe to remove the wl module and add the b43 module using the -r flag. I had already uninstalled bcmwl via apt-get, so I only used modprobe to add b43. The modprobe utility also has a couple of related files.
- /etc/modules: tells Ubuntu which modules should be loaded automatically at boot time. I had to add b43 to this file otherwise I would have to use modprobe manually each time to load the correct wireless driver.
- /etc/modprobe.d/blacklist.conf: is exactly what it sounds like. Any module on this list will not be loaded. I added my old driver on here, as well as a couple other drivers that other articles suggested might be causing conflicts.
lspci: you can use lspci to find out information on the pci devices your system is aware of. I used lspci to determine that the problem was in fact the wireless driver (my assumption) because lspci showed that the system was aware of my wireless card.
lsusb: similar to lspci, lsusb lists information about your USB devices. Handy if a USB device isn’t available for some reason and you want to check if your computer is aware of it at a low level.