[SOLVED] How to provide non-free firmware files to the Debian Jessie Installer.

User Name

Remember Me?

Password

DebianThis forum is for the discussion of Debian Linux.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

How to provide non-free firmware files to the Debian Jessie Installer.

When I attempted to install Debian 8 (jessie) on my laptop, I could not get a network connection, because the installer told me that it was missing the required firmware files for my network interfaces:

Code:

Some of your hardware needs non-free firmware files to operate. The firmware can be loaded from
removable media, such as a USB stick or floppy.
The missing firmware files are: iwlwifi-7260-9.ucode iwlwifi-7260-8.ucode
If you have such media available now, insert it, and continue.
Load missing firmware from removable media?

Initially, I assumed that this was just a minor issue: Instead of the wireless interface, I could use wired ethernet to get a network connection, and get the wireless interface in an operational state after installation was completed.

However, when I continued, I got another, similar message about another firmware file:

Code:

The missing firmware files are: rtl_nic/rtl8411-2.fw

That was a bigger problem: Even the wired ethernet interface required firmware files that the installer could not find.

I tried to provide the required firmware files to the installer, but it kept complaining that it could not find them. It seems to me that the exact procedure to provide the firmware files to the installer, is not particularly well documented (at least, not at a place where I could find it), so quite a bit of experimentation was required for me to overcome this issue. In this post, I will explain what worked for me.

First, of course, I had to actually find the required firmware files. To that end:

The lib directory, in turn, contained a further subdirectory, firmware, that held all firmware files extracted from both packages―including, but not limited to, the files that I (or, rather, the Debian installer) was looking for.

I copied the entire contents of the firmware subdirectory to a USB stick that was formatted with a FAT filesystem.

Note, in particular, that the USB stick included the contents of the firmware directory, not the directory itself!

Finally, the time had come to retry the Debian installation. I simply booted the computer off the Debian 8.0.0 medium, and when it complained again about the missing firmware files, I took the following steps:

I inserted the USB stick.

I pressed the <CTRL>+<Alt>+<F2> key combination, to switch to the second virtual terminal.

I ran the blkid command, to find out under which device name the USB stick was known: /dev/sdc. Its FAT filesystem, which contained the firmware files, then, was /dev/sdc1.

I mounted the FAT filesystem under the /lib/firmware mountpoint―which, however, I had to create first:

Code:

mkdir /lib/firmware
mount /dev/sdc1 /lib/firmware

I pressed <CTRL>+<Alt>+<F5> to continue the installation process.
The firmware files were successfully loaded, and I got prompted for my wireless networking parameters.

Yes, thanks, I've been through that same process so I know it could help others.
I do, however, seem to recall that my wired network card worked without the non-free firmware despite the complaint -- did you try to install regardless?
Mine was on a desktop PC so I was doubly surprised when the network card was said to need firmware!

I do, however, seem to recall that my wired network card worked without the non-free firmware despite the complaint -- did you try to install regardless?

Yes, I did try to continue, since I was surprised that even the ethernet interface would require non-free firmware. It didn't work—no network hardware was available. Had it worked, then I don’t think I would have gone through the trouble of figuring out how to load the firmware during installation.

Yes, I did try to continue, since I was surprised that even the ethernet interface would require non-free firmware. It didn't work—no network hardware was available. Had it worked, then I don’t think I would have gone through the trouble of figuring out how to load the firmware during installation.

Good to know, thanks, I was doing other things during my install and really did not recall exactly what I did.

ADDENDUM: Downloading new Firmware Files after upgrading to Debian Testing

Some time ago, I upgraded Debian 8 (“jessie”) on my laptop to Debian Testing (cfr. my sources.list). At the time, Debian Testing was running Linux Kernel 4.1, and whenever I booted Debian, the following messages appeared:

Apparently, the iwlwifi module under Linux Kernel 4.1 went looking for a “iwlwifi-7260-13.ucode” firmware blob, which wasn’t available on my system. Fortunately, however, it would fall back to the earlier “iwlwifi-7260-10.ucode” file, which was provided by the “firmware-iwlwifi” package, and, as a result, my wireless networking interface remained operational after all.

Even so, I decided to download the new firmware as suggested by the text, and copied it to the “/lib/firmware” directory. That got rid of the warning messages.

Recently, Debian Testing was upgraded to Linux Kernel 4.2, and that expected an even newer firmware file, as evidenced by the following messages:

I could, of course, have ignored these messages, since the absence of the “iwlwifi-7260-15.ucode” file didn’t prevent my wireless networking interface from working. Alternatively, I could manually download the new file—but when I tried that, I found that the file wasn’t yet listed as a production-ready firmware version.

Since the firmware file that I was looking for, wasn’t available yet, I decided to try and cobble up a bash script to automate the download and install process (I’m a strong proponent of automating repetitive tasks), so I could simply run the script every now and then, to verify if the new firmware file had already arrived. The result, i.e., the “get-iwlwifi-firmware” script, which I attached to this post, takes the following steps:

It creates a directory, “opt/firmware-iwlwifi”, under your home location. The firmware files will be downloaded into this newly created directory.

It gets the web page that lists the available firmware files, and extracts the names of the “iwlwifi-7260” archive files from it. It subsequently downloads all of these archive files.

After the download completes, it looks for any archives that have a “.1” filename extension. It assumes that such files are new downloads of files that were already downloaded on an earlier occasion.
If the newly downloaded copy is identical to the earlier one (i.e., the one without the “.1” extension), then the new copy is simply deleted.
If, on the other hand, the new copy is different from the earlier one, then the old one is deleted (along with the contents that was extracted from it), and the new one is renamed to take its place.

Each of the downloaded archive files is then processed. If the contents of an archive has not yet been extracted, then it must be new; its contents is then extracted, and the extracted firmware blob is installed to the “/lib/firmware” directory.

Even though the script is not particularly fail-safe (one of the most obvious issues against which it doesn’t guard, is the presence of a stray “.tgz.1” file when it is run), it works well enough under normal circumstances. Feel free to use it, or to adapt it to your own needs, if you consider it useful.

It's simpler in hindsight, but not to those who downloaded an official images and are then faced with downloading again on reading this kind of advice. Debian don't really advertise those, so it's not really that helpful to just keep posting links to unofficial images whenever this kind of thing crops up (as it always has).

The situation regarding firmware during the install was never documented very clearly, but the Debian wiki has always covered it (since squeeze was testing). This is because DFSG regards Linux kernel firmware as closed source blobs (a la FSF) and won't redistribute it as part of the 'main' distribution without accompanying source (of which there is none). So in other words it doesn't get discussed much - it's up to the user to find it and install it (yet the whole approach to non-free in debian has slackened of late - and last time I checked, you do get offered the chance to enable those source and contrib sources at install time).

So in view of all that, reading the relevant Debian wiki page isn't a bad idea:

I have multiple computers that require different types of firmware blobs. What I've found that works with Debian systems is to put all of your firmware on a USB stick, then when the installer enters the detecting network stage and complains requesting firmware, you back out to a shell. In the shell you need to mount your usb stick by making a /firmware directory under the root and mounting the stick there. When you go back to detecting network and he finds it in the /firmware directory, under the root. This is actually documented in the boot or installation setup about how it searches for these files. It specifically looks into a /firmware under the root for the blobs.

My particular stick has the normal files and some directories as suggested by the error message, such as an rtl_nic/ directory for those firmware blobs. I do believe that they should make some kind of mechanism for new users to have available to at least get them on-line. One of the attractions of the other flavours load the non-free blobs. At least let you stick in a USB stick and use that without knowing about making directories and mounting to a file system. I have yet to have one that would release the DVD drive to allow for changing it to the next DVD. A few items to change... Such is life..

As for other Linux variations, try a bunch of them via the 'live' type DVD, so you can run it and see if you like it. Most also give you the option of installation. Live DVD's with the installation option may be the way ahead for installations.

The second paragraph and link to the firmware tarball should be relevant. Usually extracting the tarball to a directory called /firmware on the flash stick will work.

That's actually one of the things that I had tried, but it didn't work for me. It did eventually help me come up with the idea to copy the firmware files (which I extracted from the ".deb" packages) to the root directory of the stick, and mount it under "/firmware".

Quote:

The third paragraph suggests manually mounting the flash drive to /media , if it's not mounted automatically by the installer. check-missing-firmware.sh should look for it there.

That's another thing that I had tried, and that also was unsuccesful for me.

Quote:

The mailing list link on the aforementioned wiki page seems to suggest that the .deb in the / of the flash memory stick can also work - maybe it does, can't remember.

Again, something that I had tried, without success.

Perhaps these things should have worked, and something went wrong on my side (I'm not excluding a bad case of PEBKAC or PICNIC either...); I just don't know.