Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lukacat10/1442e3f4b71440f34f67170f6f5a4161 to your computer and use it in GitHub Desktop.
Save lukacat10/1442e3f4b71440f34f67170f6f5a4161 to your computer and use it in GitHub Desktop.

Time to end this Proprietary Internet Drivers phenomena

Yes, @Lenovo, I'm talking to you! I'm sleeping in my tent outside your office with my Torches lit and my Pitchforks ready (its a bad joke).

The problem: distros like debian don't include proprietary network drives as part of the operating system installation, causing it to remain offline after installation

  1. Find a computer with an operating system similar to the one you are trying to install (debian in my case) that has good internet connection.
  2. Run the commands suggested below in the Package download section.
  3. Put the resulting .deb files in a usb drive.
  4. Install the .deb files using the command mentioned in the Installation section.

Package download

Option 1:

(Create a folder and cd to it before running this commands. In some cases, you will have a lot of dependencies.

apt install apt-rdepends
apt-get download $(apt-rdepends MYPACKAGE|grep -v "^ " |grep -v "^libc-dev$")

Replace MYPACKAGE with the package you wish to install offline

Option 2:

PACKAGES="MYPACKAGE"
apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests \
  --no-conflicts --no-breaks --no-replaces --no-enhances \
  --no-pre-depends ${PACKAGES} | grep "^\w")

Possible apt packages containing drivers for some lenovo laptops:

Finding out what network cards your laptop has and what package has the correct drivers for it is outside the scope of this gist (for now).

Adding the repo containing the non-free packages

Before downloading the packages themselves, please include the correct repo.

sudo nano /etc/apt/sources.list

Add the following line to the file:

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

broadcom-sta-dkms

https://packages.debian.org/bullseye/broadcom-sta-dkms
Some laptops have broadcom interfaces and this package includes the required drivers.

linux-headers problems

Sometimes, when you try to install broadcom-sta-dkms on a target machine, you will encounter issues related to broadcom-sta-dkms not matching installed linux-headers. Just use the computer with the internet to download the correct linux-headers package and install them on the offline computer.

firmware-iwlwifi

https://packages.debian.org/bullseye/firmware-iwlwifi
Some laptops have intel interfaces and this package includes the required drivers.

Installation

On the target, offline computer, simply go to the folder containing all the .deb files, and run:

sudo dpkg -i *.deb

Should work well on the first try. Look for errors though, and try to run this command multiple times before looking up the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment