Linux – Install Drivers Offline Arch Linux

arch linuxdriverslinuxsoftware installationwifi

I have been attempting to install Arch Linux on my Macbook Pro but the wireless and ethernet drivers don't work. Because of this, I cannot access the internet on it. So whilst searching for a solution I downloaded these drivers: http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2 (I got the link for the drivers from this AUR repo: https://aur.archlinux.org/packages/b43-firmware/)

The problem is though, is that I have absolutely no idea how to install the drivers from the command line during the install procedure.

To make myself absolutely clear, I do not have an internet connection of any sort on said MacBook, nor do I have a working install. So because of this every solution must be able to be done from the installation media command line.

NOTE: I have also noticed that during startup I get a brief message about wireless drivers not found but it goes by so fast I cannot properly read it.

Best Answer

From the live CD

You seem to be able to get a working connection on the installation media, so here is one idea: Start the arch live CD and setup your network. Then mount your newly installed partition (for example on /mnt) and chroot into your system using

# arch-chroot /mnt

From there, you will be able to update pacman's database and install the desired packages. For broadcom, you will need to install from AUR:

# pacman -Syy base-devel
# pacman -S b43-fwcutter
# curl https://aur.archlinux.org/cgit/aur.git/snapshot/b43-firmware.tar.gz | tar xzf -
# cd b43-firmware
# makepkg --asroot --install

Note: never use --asroot in normal situation.

Without network connection

This is a little bit more tricky here. Compiling from AUR will be harder, so if you can first setup the ethernet using official packages, that will be better. The idea is to let pacman prepare a list of downloads, use another PC and a USB stick to convey the packets to your install. Mount the USB stick on your fresh install and create a list of packages to download.

# cd /mnt/usbstick
# pacman -Sp your_ethernet_driver > pkgs_list.txt

If you really want to install the broadcom drivers (or your ethernet card is also an unofficial packet) also issue

# pacman -Sp base-devel b43-fwcutter >> pkgs_list.txt

Unmount the key and find an internet connection on another PC. Download all the packets using for example curl, wget or simply your browser. If you are really unlucky, the pacman database may be too old and you will not find the packets in their indicated version. You will have to search a little bit round to find the right package. Save all the packets on the stick.

If you go the unofficial way, find the page on the AUR and download the tarball for the packet, but also all dependencies and all sources. For broadcom, for example download the b43-firmware tarball but also the http://www.lwfinger.com/b43-firmware/broadcom-wl-{xyz}.tar.bz2 source tarball.

Go back to your arch and from your stick run

# pacman -U *.pkg.tar.*

For broadcom, (or similar for unofficial packets)

# tar xzf b43-firmware.tar.gz
# cd b43-firmware/
# mv ../broadcom-wl-{xyz}.tar.bz2 .
# makepkg --asroot --install

Note: the third step moves the sources into the build directory so that makepkg finds it locally and do not attempt to download them. And same, do not use --asroot in normal case.

Related Question