Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save niftylettuce/5619c2be9906bcbd893e1e1a25b9d795 to your computer and use it in GitHub Desktop.
Save niftylettuce/5619c2be9906bcbd893e1e1a25b9d795 to your computer and use it in GitHub Desktop.
How to Enable Wi-Fi on MacBook, Mac Mini, MacBook Air for Ubuntu/Linux/Debian/Mint/Mate OS ---- If you liked this, check out my email forwarding service at https://forwardemail.net 🎉 🎉 🎉

How to Enable Wi-Fi on MacBook, Mac Mini, MacBook Air for Ubuntu/Linux OS

By default older Mac computer models have driver issues with the Broadcom Wi-Fi chip. Most instructions online (such as this one from the official Ubuntu docs @ https://help.ubuntu.com/community/Macmini5-1/Precise) suggest to use sudo apt-get and install these packages from the PPA.

BUT you don't have Internet so you can't use apt-get! Instead you can use a different computer to download the packages, then transfer them over.

In the instructions below, you will need to replace sid in the download URL's with the proper version of Debian your version of Ubuntu/Linux is using. To find which version you should use, you can view the chart at https://askubuntu.com/questions/445487/what-debian-version-are-the-different-ubuntu-versions-based-on#445496. If you're using jessie for example, then replace all sid with jessie in the links below.

  1. Download b43-fwcutter @ https://packages.debian.org/sid/b43-fwcutter (replace "sid" in the URL as needed -- scroll down to "Download" section and choose based off your architecture, and then select a mirror/FTP link to download from on the next page that appears).
  2. Download firmware-b43-installer @ https://packages.debian.org/sid/firmware-b43-installer (repeat same note as above)
  3. Download webfs @ https://packages.debian.org/sid/webfs (repeat same note as above)
  4. Download http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2 (e.g. using wget http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2)
  5. Save these downloaded files to flash storage and then insert flash storage into your Ubuntu/Linux machine.
  6. Copy the files from the flash storage to your Ubuntu/Linux machine's desktop.
  7. Open a terminal and run the command echo '127.0.0.1 www.lwfinger.com' | sudo tee --append /etc/hosts
  8. Run the command sudo dpkg -i ~/Desktop/webfs.deb (replace webfs.deb with the webfs deb file name)
  9. Run the command sudo mkdir -p /var/www/b43-firmware
  10. Run the command sudo mv ~/Desktop/broadcom-wl-5.100.138.tar.bz2 /var/www/b43-firmware/
  11. Run the command sudo sed -i -e 's/web_root="\/var\/www\/html"/web_root="\/var\/www"/' /etc/webfsd.conf
  12. Run the command sudo sed -i -e 's/web_port=""/web_port="80"/' /etc/webfsd.conf
  13. Restart the web server sudo /etc/init.d/webfs restart (you may need to use sudo systemctl restart webfs if your system uses systemd)
  14. Run the command sudo dpkg -i ~/Desktop/b43-fwcutter.deb (replace b43-fwcutter.deb with the b43-fwcutter deb file name)
  15. Run the command sudo dpkg -i ~/Desktop/firmware-b43-installer.deb (replace firmware-b43-installer.deb with the firmware-b43-installer deb file name)
  16. Run the command echo 'blacklist ndiswrapper' | sudo tee --append /etc/modprobe.d/blacklist.conf
  17. Run the command echo 'SUSPEND_MODULES="b43 bcma"' | sudo tee ---append /etc/pm/config.d/modules
  18. Run sudo reboot and then check if you can connect to Wi-Fi.
  19. See https://help.ubuntu.com/community/MacBookPro8-2#Wireless for other instructions, such as enabling Sensors. Also see https://askubuntu.com/questions/334561/problems-with-broadcom-bcm4311-wireless-card-on-hp-pavillion-dv6000#667832 for reference.
  20. Remove webfs and the temp dir by typing sudo apt-get remove -y webfs and sudo rm -rf /var/www/b43-firmware/ on your Ubuntu/Linux machine afterwards.
@ip-rookie
Copy link

Hi all,
i got to step 13 , I used ¨sudo systemctl restart webfs¨and got the following message ¨Job for webfs.service failed because the control process exited with error code. See ´systemctl status webfs.service´and ´journalctl -xe´¨

when running those commands I got this
buntu@ubuntu:~/Desktop$ systemctl status webfs.service
● webfs.service - LSB: Webfs simple HTTP server
Loaded: loaded (/etc/init.d/webfs; generated)
Active: failed (Result: exit-code) since Mon 2020-10-05 22:18:05 UTC; 2min 41s ago
Docs: man:systemd-sysv-generator(8)
Process: 6986 ExecStart=/etc/init.d/webfs start (code=exited, status=2)
Tasks: 1 (limit: 4538)
Memory: 2.4M
CGroup: /system.slice/webfs.service
└─6648 /usr/bin/webfsd -k /var/run/webfs/webfsd.pid -r /var/www/html -u www-data -g www-data

Oct 05 22:18:05 ubuntu systemd[1]: Starting LSB: Webfs simple HTTP server...
Oct 05 22:18:05 ubuntu webfs[6986]: /etc/init.d/webfs: 48: /etc/webfsd.conf: Syntax error: Unterminated quoted string
Oct 05 22:18:05 ubuntu systemd[1]: webfs.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Oct 05 22:18:05 ubuntu systemd[1]: webfs.service: Failed with result 'exit-code'.
Oct 05 22:18:05 ubuntu systemd[1]: Failed to start LSB: Webfs simple HTTP server.
ubuntu@ubuntu:~/Desktop$ journalctl -xe
Oct 05 22:18:05 ubuntu systemd[1]: webfs.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support

-- An ExecStart= process belonging to unit webfs.service has exited.

-- The process' exit code is 'exited' and its exit status is 2.
Oct 05 22:18:05 ubuntu systemd[1]: webfs.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support

-- The unit webfs.service has entered the 'failed' state with result 'exit-code'.
Oct 05 22:18:05 ubuntu systemd[1]: Failed to start LSB: Webfs simple HTTP server.
-- Subject: A start job for unit webfs.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support

-- A start job for unit webfs.service has finished with a failure.

-- The job identifier is 2724 and the job result is failed.
Oct 05 22:18:05 ubuntu sudo[6983]: pam_unix(sudo:session): session closed for user root

I am very new to this and have no idea what to do. if anyone can help i would be very grateful :)

@dakos-abyss
Copy link

Hello, installing Debian 10 on my 2011 Mac Mini (Mac Mini 5.2), and I've run into an issue on Step 15:

sudo dpkg -i ~/Desktop/firmware-b43-installer_019-6_all.deb
(Reading database ... 257324 files and directories currently installed.)
Preparing to unpack .../firmware-b43-installer_019-6_all.deb ...
Unpacking firmware-b43-installer (1:019-6) over (1:019-6) ...
dpkg: dependancy problems prevent configuration of firmware-b43-installer:
 firmware-b43-installer depends on wget; however;
  Package wget is not installed.

dpkg: error processing package firmware-b43-installer (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 firmware-b434-installer

@zfortier
Copy link

zfortier commented Jan 6, 2021

@dakos-abyss

Hello, installing Debian 10 on my 2011 Mac Mini (Mac Mini 5.2), and I've run into an issue on Step 15:
[...]

The error is telling you what you need to do...

firmware-b43-installer depends on wget; however;
Package wget is not installed.

I think you should try installing wget first....

@zfortier
Copy link

zfortier commented Jan 6, 2021

This can be done much easier by using netcat to serve the file. That way you don't need any of the web server steps.

  1. Download all the files (b43-fwcutter, firmware-b43-installer and http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2)
  2. Open a terminal and run these commands:
cp /etc/hosts /etc/hosts.bak
echo 127.0.0.1 www.lwfinger.com >> /etc/hosts
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c <broadcom-wl-5.100.138.tar.bz2)\r\n\r\n"; cat broadcom-wl-5.100.138.tar.bz2; } | nc -l -p  80 &
dpkg -i ~/Desktop/b43-fwcutter.deb
dpkg -i ~/Desktop/firmware-b43-installer.deb
cat /etc/hosts.bak > /etc/hosts

Worked for me 💯

@aditya9710
Copy link

aditya9710 commented Mar 5, 2021

Hi, installed Ubuntu 20.04 on my Macbook Pro 2019. I'm facing some issues in the procedure. After package warnings from dpkg, it displays this:

Preparing to unpack .../webfs_1.21+ds1-12+b1_amd64.deb ...
Unpacking webfs (1.21+ds1-12+b1) over (1.21+ds1-12+b1) ...
Setting up webfs (1.21+ds1-12+b1) ...
dpkg: error processing package webfs (--install):
 installed webfs package post-installation script subprocess returned error exit status 10
Processing triggers for systemd (245.4-4ubuntu3.4) ...
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
 webfs

Would appreciate any help in resolving the issue.

@krimlon
Copy link

krimlon commented Apr 3, 2021

Hi, installed Ubuntu 20.04 on my Macbook Pro 2019. I'm facing some issues in the procedure. After package warnings from dpkg, it displays this:

Preparing to unpack .../webfs_1.21+ds1-12+b1_amd64.deb ...
Unpacking webfs (1.21+ds1-12+b1) over (1.21+ds1-12+b1) ...
Setting up webfs (1.21+ds1-12+b1) ...
dpkg: error processing package webfs (--install):
 installed webfs package post-installation script subprocess returned error exit status 10
Processing triggers for systemd (245.4-4ubuntu3.4) ...
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
 webfs

Would appreciate any help in resolving the issue.

ya I'm having the same issue. hopefully someone can assist with this.

@orbanbalage
Copy link

@ashutoshmjain
Copy link

I am using Air 2012 . I installed Debian (full DVD on USB) wiping off Catalina completely. Everything worked great except for the WiFi. Getting WiFi needed some research but it is as simple as downloading two files ... Details on the page here https://wireless.wiki.kernel.org/en/users/Drivers/brcm80211

Most of the information on internet is quite outdated .. Now we have fully open sourced drivers for most of the older Broad-com WiFi cards. Just download Linux firmware from the link https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git ; expand the archive on some internet connected machine . Copy brcm/bcm43xx-0.fw and brcm/bcm43xx_hdr-0.fw to /lib/firmware/brcm (or wherever firmware is normally installed on your system) via a usb .. and reboot

@petercorke
Copy link

Hi, nice procedure but like some others I got stuck at step 15. I'm working with Ubuntu 22.04, and dpkg is doing an https (not http) request to the webserver which it can't handle, it gives a 443 error. Not sure if there's an easy way around this, webfsd has no support for https and I can't see anyway to make dpkg to use http instead of https. Also, for 22.04 the version number used at step 4 is different.

@ghbry
Copy link

ghbry commented May 6, 2023

I installed the oem version of Xubuntu on my Macbook Air (2016). It found the wifi connection during the setup without problems. After that i changed the oem to a custom version by dblclicking the shortcut on the desktop for redistribution to users. Restarted and wifi works. Hope it will help others.

@cajsamra
Copy link

I gave this a try when I discovered my entire Broadcom device was not working for my new ubuntu install - both for wired and wireless were not working. It failed at step #8 because of missing dependencies. After trying to resolve them briefly, I decided to re-install from scratch. This time, I had a wired connection, and I checked all the boxes for third party software and updates. This ensured that all required packages would be downloaded. That worked. After the install, the wired connection worked but the WiFi did not. I found a fix for that here: https://www.linuxfordevices.com/tutorials/ubuntu/no-wi-fi-adapter-found-error

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