Pidsec

Wifi Enablement Methods for Arch Linux On Mac and PC

archwifi

I should clarify some prerequisites that this article is technically a culmination of various notes I've taken for myself throughout my arch deployments on various machines. Thus this is a hodge podge post aimed really just to document the bulk of my notes into a post, not necessarily a dedicated research on what will work or wont. The second thing to keep in mind is that this is not limited to vanilla arch, but other arch based derivatives. Hence I will highlight which distro and on what machine it was deployed at.

Bluestar linux getting wireless network running

Bluestar first steps. This was deployed on a Lenovo Thinkpad w520. It may be useful to run this command.

  1. $ sudo systemctl list-units --type service --no-pager

If I remember correctly, Bluestar had two network service managers operating simultaneously which is what I believe caused it to not login into the wifi. So I chose to stop and disable dhcpcd.

  1. $ sudo systemctl stop dhcpcd.service

then I ran the following

  1. $ sudo systemctl disable dhcpcd.service

That pretty much got wifi working and I was able to connect using the wifi card.

Arch Deployed on Mac

This is mainline vanilla arch I've deployed on Mac

a first step to getting wifi connectivity up and running on a mac could be to run the following command in terminal

$ nmtui

Running this command will bring up an ncurses like menu inside the terminal where you can choose the wifi network and input the credential there.

If this does not work, run the following command.

$ lspci -k

this particular comnman lists all your pci cards chips and data about them.

here is an example

"02:00.1 SD Host controller: Broadcom Inc. and subsidiaries BCM57765/57785 SDXC/MMC Card Reader (rev 10)
Subsystem: Broadcom Inc. and subsidiaries Device 0000
Kernel driver in use: sdhci-pci
Kernel modules: sdhci_pci
03:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4331 802.11a/b/g/n (rev 02)
Subsystem: Apple Inc. AirPort Extreme
Kernel driver in use: wl
Kernel modules: bcma, wl
04:00.0 FireWire (IEEE 1394): LSI Corporation FW643 [TrueFire] PCIe 	1394b Controller (rev 08)
Subsystem: LSI Corporation FW643 [TrueFire] PCIe 1394b Controller
Kernel driver in use: firewire_ohci
Kernel modules: firewire_ohci
05:00.0 PCI bridge: Intel Corporation CV82524 Thunderbolt 	Controller [Light Ridge 4C 2010]
Kernel driver in use: pcieport

Notice the reference to broadcom. Broadcom is the particular chip that older Macs uses for its wifi networking. Thus if you install arch linux traditionally from scratch, then upon building your machine, you'll have to include the broadcom package into your build. For those who just ran a pre-configured script to install vanilla arch, installing base line arch by default will NOT include that package from the repo. Thus after install, you'll have to run the following command

$ sudo pacman -S linux-headers broadcom-wl-dkms

Notice that the above are actually two packages. Thats what I ran to get my wifi running on my old 2010 macbook pro. the first package being "linux-headers" and the actual package needed being "broadcom-wl-dkms"

Once completed, you can run the following command

$ ip link

You should get an output similar to this

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp2s0f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DORMANT group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

Prior to running this command, I believe that the third listed item "wlan" did not even show up when running this command, but after installing the broadcom package, it should then display the wlan. Since it displays the mac address for each card, I substituted my actual mac address for x's, but your system will display the actual mac address of your particular card.

After running all of this, its a pretty good idea to reboot the system, just run the command in the terminal and you should be up and running.

If you come across other wireless connectivity issues try searching if you have networkmanager package. Search with this command

$ pacman -Ss networkmanager

if NOT installed, then install with this command

$ sudo pacman -S networkmanager reboot

then run it with this command

$ start/enable NetworkManager.service

to check if its running, run the following command

$ systemctl --type=service

If not, then you can run it with this command

$ start NetworkManager.service

and you can stop it with this command if needed

$ enable NetworkManager.service

Blackarch Linux Wifi Enabling

Blackarch is a pentesting distribution similar to Kali linux, but its based on arch. To get6 wifi enabled, then

  1. open terminal
  2. type following command

$ wifi-menu

the terminal will scan for networks. Once detected, an ncurses menu pops up which provides available wireless (wlan) networks

  1. select the one you wish to connect.
  2. Input credentials

You should be connected from that point.

Artix Linux on Toshiba

Artix Linux is another arch based distro I had set up on an old toshiba laptop with decent specs, but it would always shut off with other distros including low spec distros. So I guessed maybe my problem would be eliminated if I ran a distro running other than systemd that seems to be standard iteration for most linux distros. So I chose artix, which I believe I chose openrc as the innit system. It has been running fabulously ever since.

I think, if I remember correctly, trying to get wifi running from the gui access point on the system tray did not work, I simply ran the following command

$ nmtui

which opens up an ncurses like menu in which you'll be able to input your wifi login credentials and you should then be up and running pretty easily.

Update

Athena os

Athena is another penetration hacking distro based on arch and utilizes the black arch repos. I installed it on bare metal on a gaming pc with 2 gpus, since its a direct layer 2 connection, there was no issue. I deployed it on a Macbook Pro and came across the same issue as with the vanilla arch install. Just run this to install this package.

$ sudo pacman -S broadcom-wl-dkms

you "may" have to install linux-headers as well, depends on if your distro compiled it at source into the iso.

and reboot, and the system should have wifi networks enabled and you will be able to log into your wireless network.

#arch #linux #networking #wifi