neige d'aoust

knowledge, art, and other stuff

User Tools

Site Tools


wifi_ap_diskless

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wifi_ap_diskless [2025/06/11 12:09] Yukiwifi_ap_diskless [2025/06/17 13:12] (current) Yuki
Line 1: Line 1:
 ====== Wi-Fi access point on a diskless system ====== ====== Wi-Fi access point on a diskless system ======
  
-So I found a PCI Wi-Fi 5 device, and I decided to put it in my diskless system that boots Arch Linux from NFS, and turn it into a Wi-Fi access point, hoping to improve reception in my living room. Should be easy, right?+So I found a PCI Wi-Fi 5 (802.11ac) device (based on Intel Dual Band Wireless-AC 3168), and I decided to put it in my diskless system that boots Arch Linux from NFS, and turn it into a Wi-Fi access point, hoping to improve reception in my living room. Should be easy, right?
  
 ===== The problem ===== ===== The problem =====
Line 50: Line 50:
 ===== Configure the access point ===== ===== Configure the access point =====
  
-FIXME //5 GHz networking? Can'use it on my end//+Ideally you want to configure ''hostapd.conf'' with ''hw_mode=a'' to use Wi-Fi 5 (aka 802.11ac) capabilities and use the 5 GHz band, for Wi-Fi 4 (802.11n) and the 2.4 GHz band you can use ''hw_mode=g''. Use ''iw list'' to find out which channels you can use, those marked ''no IR'' are unusable.
  
-Ideally you want to configure ''hostapd.conf'' with ''hw_mode=a'' to use Wi-Fi 5 (aka 802.11ac) capabilities but if Wi-Fi 4 (802.11n) is fine you can use ''hw_mode=g''.+<note tip>Seems I can't use the 5 GHz band on my Intel card(( [[arch>Software_access_point#Cannot_start_AP_mode_in_5_GHz_band]])), patch kernel?</note> 
 + 
 +Solution: Apparently ''hostapd'' resets the regdomain before starting and it doesn't scan beforehand so the Intel LAR sets it correctly again, use [[https://tildearrow.org/?p=post&month=7&year=2022&item=lar|this patch]] so the regdomain can be properly set and you can access the 5 GHz band, no kernel recompile needed. Well, unless there's no wi-fi signal around... 
 + 
 +Relevant Arch packages: [[aur>iwlwifi-lar-disable-dkms]], [[aur>hostapd-git-intel-lar]] 
 + 
 +Also, the wireless interface may or may not show up right at boot unless you modprobe ''iwlmvm'', make sure you either add it to ''/etc/modules-load.d'' or also ''/etc/mkinitcpio.conf''
 + 
 +===== Wired ethernet ===== 
 + 
 +For good measure I added PCI card with a couple Ethernet ports, you'll want to add them to the bridge on boot, but of course using any sort of network manager may deadlock the system because it attempted to reconfigure every available interface at boot even though they're already configured. But this time, you don't need to configure them in initramfs, so a systemd unit will be more than enough. 
 + 
 +<file bash /usr/local/bin/bridge-join> 
 +#!/bin/sh 
 +ip link set $1 up 
 +ip link set $1 master $2 
 +</file> 
 + 
 +<file ini /etc/systemd/system/bridge-interface@.service> 
 +[Unit] 
 +Description=Bridge interface %I with br0 
 +Requires=sys-subsystem-net-devices-br0.device 
 +Requires=sys-subsystem-net-devices-enp3s0f0.device 
 +Requires=sys-subsystem-net-devices-enp3s0f1.device 
 +After=network.target 
 +After=sys-subsystem-net-devices-br0.device 
 +After=sys-subsystem-net-devices-enp3s0f0.device 
 +After=sys-subsystem-net-devices-enp3s0f1.device 
 +[Service] 
 +Type=oneshot 
 +ExecStart=/usr/local/bin/bridge-join %I br0 
 +[Install] 
 +WantedBy=multi-user.target 
 +</file> 
 + 
 +<code bash> 
 +# systemctl enable bridge-interface@enp3s0f0 bridge-interface@enp3s0f1 
 +</code>
  
 ===== See also ===== ===== See also =====
  
   * [[https://serverfault.com/questions/602019/booting-a-diskless-debian-system-using-bonding-bridging-and-iscsi]]   * [[https://serverfault.com/questions/602019/booting-a-diskless-debian-system-using-bonding-bridging-and-iscsi]]
 +  * [[https://groupe-tazor.com/notes/a8tbdbcfcjzn035m]]
wifi_ap_diskless.1749658140.txt.gz · Last modified: by Yuki