NUC and 7260 Wifi - Debian Jessie Install

So I acquired a Intel NUC the other day and paired it with a Intel 7260 Wifi card. It’s been years since I’ve gone to install a Linux OS and have it not be able to detect and bring online a network device. It’s rather painful especially when one only has a single monitor, keyboard and mouse on hand.

As it turns out the Intel 7260 card I chose requires binary firmware to be loaded in order to bring the device online. Here’s how.

Grab the DEB with the binary firmware blobs

The 7260 card uses the iwlwifi module, but we need a bit of binary firmware magic before it can initialise the card. Luckily Debian provides the firmware within an appropriately named deb package in the non-free repos,

  1. Get the deb

    $ wget http://http.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-iwlwifi_0.43_all.deb
    
  2. Obviously, we can’t install it, so lets unpack it instead

    $ ar vx firmware-iwlwifi_0.43_all.deb
    x - debian-binary
    x - control.tar.gz
    x - data.tar.xz
    
  3. The goodies is in data.tar.xz

    $ tar -xvJf data.tar.xz
    
  4. You should now have a lib dir with the firmwares

    $ ls -1 lib/firmware/
    intel
    iwlwifi-1000-5.ucode
    iwlwifi-100-5.ucode
    ...
    iwlwifi-7260-7.ucode
    iwlwifi-7260-8.ucode
    iwlwifi-7260-9.ucode
    ...
    

Start the Debian netinst

The installer will detect the WiFi card, but fail to initialise it, instead prompting to load the firmware via use intervention. The installer suggests popping in a USB key with the files, but I only had one on hand and it was being used to boot the installer.

Apparently, the installer doesn’t try to scan the install disk as popping the files on a separate partition didn’t work for me.

Whats maybe not overly obvious is that the installer attempts to search for firmware files under /lib within the install environment.

Thus the quick fix,

  1. Activate a spare console via + +

  2. Temporarily mount the partition of the USB key with the firmware some place (my USB flash drive was detected as sdb and sdb3 had the files),

    $ mount /dev/sdb3 /mnt
    
  3. Copy the firmware across to the installer filesystem,

    $ cp -r /mnt/firmware /lib
    
  4. Unmount the partition now that we no longer need it,

    $ umount /dev/sdb3
    
  5. Go back to the install and tell it to try and find the firmware. I was doing a graphical install, which was using the 5th terminal - + +

  6. With luck, the installer should proceed and be able to bring up the wlan0 device.

Post-installation tasks

So now we have the firmware loaded and managed to install Debian successfully. There are a few post install tasks related.

  1. We may as well install the firmware package now if it isn’t already,

    $ apt-get install firmware-iwlwifi
    
  2. Now, if you’re like me and want/need to auto-start the wlan0 interface on boot. You will run into a funny issue where the kernel isn’t able to bring it up at boot time because the firmware isn’t included in the initramfs. Let’s fix that,

    $ echo "iwlwifi" >> /etc/initramfs-tools/modules
    $ echo "iwlmvm" >> /etc/initramfs-tools/modules
    $ update-initramfs -u -k all
    

What the last step above did was tell the initramfs generation scripts to include the kernel modules required for our WiFi device as part of the initramfs. This will also pull in the required firmware files. It’s nice the authors of that tool thought of this.