Wireless Interface Information using nl80211/Arch Install
Just copying this over from one of my previous projects. It goes over my experience with low-level network programming using Linux network interfaces and Go. Along the way, I was having issues battling Network Manager when I had Fedora Linux installed, so I switched over to Arch and decided to just use iwd instead. It has proven to be must better in my experience and essentially remains out of the way.
Guess what? Not a whole lot of documentation for nl80211! Yayyyyy :)
Not super surprising after working with netlink being that it uses the netlink protocol. Anyways, mdlayher has already created an implementation in Go, so I should be able to get my footing. Looks like the implementation is only available for Linux, so I won’t be able to do a whole lot today(possible open source contribution opportunity).
Will I work on this before I try to install Arch on my laptop? I don’t know, but I feel like the Fedora OS is just draining my yoga x86.
Digging Deeper
nl80211 is the userspace interface for the configuration API cfg80211. This was made to replace the deprecated Wireless Extensions.
Reimage usb on Linux with Arch ISO
Reformat the usb
- find the usb drive with
sudo df -Ti - unmount usb to prep for reformat with(ex mount @ /dev/sda1)
sudo umount /dev/sda1 - reformat to FAT32 filesystem:
sudo mkfs.vfat /dev/sdb1 - verify usb formatting:
sudo fsck /dev/sdb1
Side Note: Reasons why FAT32 is a good choice; here are the filesystem comparisons:
| File System | Supported File Size | Compatibility | Ideal Usage |
|---|---|---|---|
| FAT32 | up to 4 GB | Windows, Mac, Linux | For maximum compatibility |
| NTFS | 16 EiB – 1 KB | Windows, Mac (read-only), most Linux distributions | For internal drives and Windows system files |
| exFAT | 16 EiB – 1 KB | Windows, Mac, Linux (requires extra drivers to access) | For files larger than 4 GB |
Download Arch ISO
Just ran:
wget -v https://mirrors.umd.edu/archlinux/iso/2024.04.01/archlinux-2024.04.01-x86_64.iso
Then get the gpg file:
wget -v https://mirrors.umd.edu/archlinux/iso/2024.04.01/archlinux-2024.04.01-x86_64.iso.sig
Validate the package signature with gpg by running after both are downloaded:
gpg --keyserver-options auto-key-retrieve --verify archlinux-2024.04.01-x86_64.iso.sig
Should return something like:
gpg: assuming signed data in 'archlinux-2024.04.01-x86_64.iso'
gpg: Signature made Mon 01 Apr 2024 01:00:16 PM CDT
gpg: using EDDSA key 3E80CA1A8B89F69CBA57D98A76A5EF9054449A5C
gpg: issuer "pierre@archlinux.org"
gpg: Good signature from "Pierre Schmitz <pierre@archlinux.org>" [unknown]
gpg: aka "Pierre Schmitz <pierre@archlinux.de>" [unknown]
gpg: WARNING: The key's User ID is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 3E80 CA1A 8B89 F69C BA57 D98A 76A5 EF90 5444 9A5COnce validated, copied the iso over to my mounted drive with the following:
dd bs=4M if=/home/louislefebvre/Downloads/wget-arch/archlinux-2024.04.01-x86_64.iso \
of=/dev/disk/by-id/usb-SanDisk_Ultra_4C531001380617112524-0:0 \
conv=fsync oflag=direct status=progresArch finally installed
After about a month or so of messing around with the Arch install and figuring out how to install all the necessary components, I have finally, successfully installed Arch Linux whoop whoop. So, after all of those learnings and take-aways, I feel that I am in a spot where I can pick this back up.
Understanding what drivers are and what driver I would needto install for the wireless adapter is pretty simple now. Maybe I would pick that up if I’m going to be messing around with that racekit stuff. Anyways, maybe I should document all the changes I made to get Arch setup? The hardest part was getting LVM setup with GRUB. I also got hung up on the GUI and initially tried out LXDE but then switched to GNOME. LXDE was just so gross to look at and it used XORG instead of the improved display server Wayland.
Anyways, it feels like I have the exact same laptop I had with Fedora OS, I just understand my OS much better with Arch. Nothing lost, only gained(except for the 4k Alaskan surfing photo).