2

I am running Debian 10 (Buster). I would like to run a 100% free system. However, I need a few non-free firmware packages, because my hardware is not free.

Therefore, I would like to install the non-free firmware packages that my hardware needs, but no more. This may mean I will have non-free hardware and firmware, but everything above this will be free.

How do I enable non-free for these packages, but not have the package manager tell me about, or install other non-free packages?


I have also been using equivs-control to create debs. Therefore, my preferred answer will be how to create a non-free deb that depends on the desired firmware. I can then install that package and it will pull in the firmware packages. However, other solutions will also be accepted.

  • 1
    I use this approach, I could expand on that if you’re interested. – Stephen Kitt Aug 6 '19 at 14:07
  • @StephenKitt it looks like the right thing, but a lot of the answer I need seem to be in the question. I you but it all in one place, then I will issue a bounty in a day or two (when it is allowed). – ctrl-alt-delor Aug 7 '19 at 9:27
0

Thanks to @StephenKitt, question/answer How to block non-free with apt preferences? and the manual, I discovered how to block installation of the non-free, except the specified ones. However they are still listed in search and in apper.

Create a file apt-preferences-non-free-policy (note it contains the packages that I want/need), with content

#Explanation: don't install non-free, except some firmware

Package: *
Pin: release c=non-free
Pin-Priority: -10

Package: *
Pin: release c=contrib
Pin-Priority: -10

#################################################
#Specify individual packages

Package: intel-microcode
Pin: release c=non-free
Pin-Priority: 101

Package: firmware-iwlwifi
Pin: release c=non-free
Pin-Priority: 101

#This is a dependency of intel-microcode
Package: iucode-tool
Pin: release c=contrib
Pin-Priority: 101

Create file apt-source-list-non-free.list (change for your distro/release), containing

deb http://deb.debian.org/debian/ buster non-free contrib

Copy into place

sudo cp -t /etc/apt/preferences.d/ apt-preferences-non-free-policy
sudo cp -t /etc/apt/sources.list.d/ apt-source-list-non-free.list

check

apt-cache policy

Then install

sudo apt install intel-microcode firmware-iwlwifi
| improve this answer | |
  • @StephenKitt did I do it correct? Did I miss anything, or do anything wrong? – ctrl-alt-delor Aug 7 '19 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.