Athena-OS / athena

Athena OS is a Arch/Nix-based distro focused on Cybersecurity. Learn, practice and enjoy with any hacking tool!
https://athenaos.org
MIT License
992 stars 75 forks source link

[ENHANCEMENT]: AthenaOS Live environment and OS installer really should have a simple wifi setup and the method properly documented #126

Open bcheeves opened 1 month ago

bcheeves commented 1 month ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

The problem is that I'm using a Lenovo T470s laptop, with an Intel Pro Wireless 8260 WIFI card and after booting off the live environment, I'm greeted into the desktop, but with no internet connection. As soon as I launch just about any program, to do testing, perform updates, run the live installer environment, or anything - it wants to connect to the internet and fails. I try to launch my browser, no internet.

I find this to be a poor out of the box user experience, especially for someone who has a learning curve in coming over to Linux and learning all of the hacking tools on Linux, and first they have to spend several hours trying to figure out why the wifi card isn't working. I've been using Linux, as an enthusiast, for over 20 years now. I've been working on mainly NIX (MacOS, FreeBSD, OpenBSD, various flavors of Linux including Arch and Gentoo linux) and even I found the wifi setup experience to be daunting.

First things first, I tried hunting all over in the control center/menus/etc, including the AthenaOS online documentation and live CD environment documentation for anything about wifi setup/networking. I couldn't find anything. I then started messing with the menus in the MATE desktop environment adding control center/proxy setup/networking, etc to see if I can configure it in a GUI utility (I'm thinking maybe Network Manager??). Nothing available.

So, alas, time to drop to a terminal...

I started out by checking with journalctl to see if the wifi driver was initialized, and what lspci detects for the hardware. Because I know that wifi can be a PITA on Linux sometimes, believe me. What I found was the iwlwifi driver was already detected and running! YAY! Now that that part is down, I even checked if the firmware was being properly loaded. That all looked fine, but when I tried to run wpa_passphrase to configure a wpa_supplicant.conf file for wifi networking. Then manually run wpa_supplicant, that failed, it was generating errors and wouldn't load the networking stack.

I finally found a forum thread discussion( on the NixOS forums) about a similar issue and suggested solution: https://discourse.nixos.org/t/set-up-wifi-minimal-system/8554

I followed in his footsteps and tried using the command he listed, using nmcli (network manager CLI tool) nmcli device wifi connect password

It then connected with success and I had a working internet connection, with that one command, in less than 20 seconds. Man, I wish I would have seen that solution sooner...

Describe the solution you'd like A clear and concise description of what you want to happen.

I think it would be useful to start with a simple addition to the documentation on using Network Manager CLI, to setup wifi, in case it's not working on bootup. I think it's pretty safe to say that the majority of users, using a Live USB/Live CD environment, are working on a laptop, and not always tethered to their desk/home office with an ethernet cable...

Having an short startup wizard when you boot into the Live environment, to help you configure a few additional system tweaks (including wifi setup) would be really helpful as well. But I'd just be happy with the documentation for now. even if it's just a small paragraph about "Configuring Wifi networking" with that one command. Maybe some tips on troubleshooting section if it fails for some reason, for now.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Using a different Live USB, Kali Linux (used to be Backtrack) works fine with the wifi card out of the box So does Ubuntu Linux The only other Live boot i've seen take as long, or longer, to recognize that wifi is not working and set it up/configure it, is using Gentoo Linux or Linux from scratch :-)

I don't believe its a restricted driver issue, Intel is pretty open with their drivers on wifi, at least hands down better than Broadcom, and I don't believe that Kali or Ubuntu would be working without using another utility like restricted driver manager, or at least installing some additional firmware packages and copying a firmware image from the windows driver or downloading it.

Good news is that the iwlwifi driver seems to be performing pretty well so far, I haven't tested the wifi hacking tools yet, but I will, and I'm happy to post my results and offer help where I can..

Additional context Add any other context or screenshots about the feature request here.

Here is the output of some of the commands that I used to help troubleshoot the issue, and diagnose the problem, in case it helps.

[root@athenaos:~]# lspci 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08) 00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07) 00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) 00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21) 00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21) 00:16.3 Serial controller: Intel Corporation Sunrise Point-LP Active Management Technology - SOL (rev 21) 00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1) 00:1c.2 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #3 (rev f1) 00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1) 00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21) 00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21) 00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21) 00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21) 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection I219-LM (rev 21) 3a:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a) 3c:00.0 Non-Volatile memory controller: Toshiba Corporation XG4 NVMe SSD Controller (rev 01)

[root@athenaos:~]# lspci -v | grep wifi Kernel driver in use: iwlwifi Kernel modules: iwlwifi

output of following commands masked for privacy: [root@athenaos:~]# nmcli device wifi connect ****** password ******* Device 'wlp58s0' successfully activated with 'ff6f1c55-66aa-490c-bcda-******'.

[root@athenaos:~]# iwconfig iwconfig: command not found

`[root@athenaos:~]# ifconfig enp0s31f6: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 54:e1:ad:2f:1c:9a txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 16 memory 0xec200000-ec220000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 34555 bytes 2716503 (2.5 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 34555 bytes 2716503 (2.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp58s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450 inet 192.168.87.236 netmask 255.255.255.0 broadcast 192.168.87.255 inet6 fe80::9fd8:8947:b2b5:15e1 prefixlen 64 scopeid 0x20 ether 14:ab:c5:b8:9d:c7 txqueuelen 1000 (Ethernet) RX packets 28540 bytes 22899204 (21.8 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 14105 bytes 2496437 (2.3 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0`

[root@athenaos:~]# journalctl --system -g wifi May 08 11:04:30 athenaos kernel: Intel(R) Wireless WiFi driver for Linux May 08 11:04:30 athenaos kernel: iwlwifi 0000:3a:00.0: enabling device (0000 -> 0002) May 08 11:04:30 athenaos kernel: iwlwifi 0000:3a:00.0: loaded firmware version 36.ca7b901d.0 8000C-36.ucode op_mode iwlmvm May 08 11:04:31 athenaos kernel: iwlwifi 0000:3a:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x201 May 08 11:04:31 athenaos kernel: iwlwifi 0000:3a:00.0: base HW address: 14:ab:c5:b8:9d:c7, OTP minor version: 0x0 May 08 11:04:31 athenaos kernel: iwlwifi 0000:3a:00.0 wlp58s0: renamed from wlan0

[root@athenaos:~]# journalctl --system -g firmware May 08 11:04:26 athenaos kernel: ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored May 08 11:04:30 athenaos kernel: Bluetooth: hci0: Minimum firmware build 1 week 10 2014 May 08 11:04:30 athenaos kernel: iwlwifi 0000:3a:00.0: loaded firmware version 36.ca7b901d.0 8000C-36.ucode op_mode iwlmvm May 08 11:04:30 athenaos kernel: Bluetooth: hci0: Found device firmware: intel/ibt-11-5.sfi May 08 11:04:31 athenaos kernel: i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/skl_dmc_ver1_27.bin (v1.27) May 08 11:04:31 athenaos kernel: psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 3/3 May 08 11:04:32 athenaos kernel: Bluetooth: hci0: Waiting for firmware download to complete May 08 11:04:32 athenaos kernel: Bluetooth: hci0: Firmware loaded in 1810398 usecs May 08 11:04:32 athenaos kernel: Bluetooth: hci0: Firmware revision 0.0 build 14 week 44 2021 May 08 11:04:39 athenaos systemd[1]: Startup finished in 12.134s (firmware) + 11.508s (loader) + 2min 7.323s (kernel) + 16.484s (userspace) = 2min 47.45>

[root@athenaos:~]# journalctl --system -g "iwlwifi" May 08 11:04:30 athenaos kernel: iwlwifi 0000:3a:00.0: enabling device (0000 -> 0002) May 08 11:04:30 athenaos kernel: iwlwifi 0000:3a:00.0: loaded firmware version 36.ca7b901d.0 8000C-36.ucode op_mode iwlmvm May 08 11:04:31 athenaos kernel: iwlwifi 0000:3a:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x201 May 08 11:04:31 athenaos kernel: iwlwifi 0000:3a:00.0: base HW address: 14:ab:c5:b8:9d:c7, OTP minor version: 0x0 May 08 11:04:31 athenaos kernel: iwlwifi 0000:3a:00.0 wlp58s0: renamed from wlan0 [root@athenaos:~]# lsmod | grep iwlwifi iwlwifi 462848 1 iwlmvm cfg80211 1130496 3 iwlmvm,iwlwifi,mac80211 firmware_class 49152 15 btrtl,snd_soc_avs,snd_hda_intel,xhci_pci_renesas,btmtk,snd_sof,drm_display_helper,btintel,btbcm,iwlwifi,btusb,snd_soc_skl,i915,cfg80211,drm

wpa_passphrase ***** ****

[athena@athenaos:~]$ wpa_supplicant -iwlp58s0 -c /etc/wpa_supplicant.conf Successfully initialized wpa_supplicant l2_packet_init: socket(PF_PACKET): Operation not permitted nl80211: Failed to open /proc/sys/net/ipv4/conf/wlp58s0/drop_unicast_in_l2_multicast: Permission denied nl80211: Failed to set IPv4 unicast in multicast filter wlp58s0: CTRL-EVENT-DSCP-POLICY clear_all nl80211: Failed to open /proc/sys/net/ipv4/conf/wlp58s0/drop_unicast_in_l2_multicast: Permission denied nl80211: Failed to set IPv4 unicast in multicast filter wlp58s0: CTRL-EVENT-DSCP-POLICY clear_all nl80211: deinit ifname=wlp58s0 disabled_11b_rates=0

D3vil0p3r commented 1 month ago

One step at time. Did you click on the left vertical bar, on the connection icon?

D3vil0p3r commented 2 weeks ago

@bcheeves can this issue be closed?

bcheeves commented 2 weeks ago

I'm sorry, i lost access to the computer that I was testing this on and my priorities have shifted to trying to provide a means to pay my bills this month while I'm out of work still, and trying to take on odd end jobs and gigs to survive. If you need to close it out, due to priorities, I'm fine with that. I can always refile the enhancement after I've had a chance to test this out. I don't recall seeing the dots that you talk about. In fact, I don't recall seeing a connection icon anywhere in the quick launch/system tray whatever it's called on this Desktop environment. That is part of the problem...What utility/package does AthenaOS use to manage the network connections? I tried to find that info, and it doesn't seem like Network Manager (Gnome environment) is what i'm most familar with, or KDE. I'm an old school UNIX/LINUX/SOLARIS guy...

D3vil0p3r commented 2 weeks ago

NetworkManager