Installing non-free network drivers on Debian

As you might have seen, I've been building, and setting up my home server, and during that time, I had a lot of issues getting things working.  Some were from my own stupidity (like installing the GRUB loader on the wrong hard drive so it wouldn't be read at boot time) and others weren't so much my fault, but the fact some of the hardware I have doesn't have open source drivers.

In this post, I'll go through the steps to get network drivers working from a source which isn't included in Debian 8 (Jessie), which was a lot of fun for me to work out, despite there being numerous posts online about it.  Because none of them worked 100% for me, I've compiled my steps here in the hope they help.  Before we begin, This was made a lot easier for me as I have two machines, so I could read guides online as I was going, but also download the relevant drivers when it came to them.  You might need to download the drivers ahead of time.

That said, here goes:

Load a live Debian system from bootable media.  Once running, open the terminal and find out what hardware you have by running lspci.  You might need to be an administrative user to run it.  When the terminal outputs the list of hardware, you're going to look for "Ethernet Controller" and "Network Controller" items.  Mine showed up as the following:

  • network controller Ralink corp RT3090 wireless 802.11n 1t/1t PCIe
  • ethernet controller: realtec semiconductor co., limited RTL8111/8168/8411 pci express gigabit ethernet controller (rev 06)

Check the devices with the Debian hardware list to see if the drivers are available, and if they need to be installed from an external source.  Mine were available from the wireless wiki kernel.org, so I downloaded them on my other machine and copied them to a USB drive.

Once that was done and out of the way, I installed Debian to the machine.  Debian 8, as has been noted in a few places, seems to take about an hour to install what it needs.  Time for a nap, some TV, food in general or playing on another machine.

When Debian is finally installed and you've logged in, load the Synaptic package manager and find "make", then mark for installation.  Once that's done, hit Apply and let it install the Make application, and any dependencies.  I was installing from USB stick (my laptop doesn't have a DVD drive, so I had to do it the hard way).  If you're installing from USB, you'll still be prompted to install packages from CD.  That's not a problem, as all we need to do is mount the USB stick as a CD drive.  To do this though, we first need to unmount the USB stick from the machine:

umount /media/USER/usb_label

Where USER is the username of the user logged in, and usb_label is whatever shows up for the USB drive.  Once that's done, we can mount the USB drive to the CD drive by doing the following:

mount -t auto /dev/sdx /media/cdrom

In this instance /dev/sdx is whatever the USB is actually linked to.  If this is successful, as message will show that "/dev/sdx is write protected, mounting read only", go back to synaptic package manager and click "ok".  This will then use the built in packages on the CD/USB to install the basic package.

Now that make is installed, we can copy the drivers we want to install from USB (or wherever they were stored) onto the Debian machine.  Once in a location which is accessible easily (I copied mine to ~/Downloads), use the terminal and navigate to that location.  Once there you can install the firmware by running the following command:

dpkg -i firmware_file_name.deb

If all has gone well, there will be some output stating what drivers have been installed.

Once that's completed and the terminal is free to run other commands, the drivers will be installed and everything should work fine.  You should be able to connect to the network without issue.

Now, if only I could get a hold of the correct drivers for my laptop...