<$BlogRSDUrl$>

Wednesday, June 27, 2018

Remediation of systemd issues on malus 

As per my previous post, I have added the services to systemd to allow automatic networking from the new USB connection.  All is partially well.  However, systemd randomly does not properly initialize the appropriate daemons.  Approximately one-third to one-half of the time, networking does not work.  The following algorithm is sufficient to restore networking.

  1. sudo systemctl stop wpa_supplicant
  2. sudo systemctl restart systemd-networkd
  3. sudo systemctl restart systemd-resolved
 At this time I cannot confirm if all steps are necessary.

Monday, June 18, 2018

Installation of malus 

Install of new computer malus mostly fine.  Will link to HW install later.  The USB wireless adapter is a major sticking point however.  Debian (buster/testing) installer does not detect, perhaps due to non-free issues, perhaps because I performed install without network and tried using rescue mode after the fact.  Here are the main points:

  1. Firmware was not installed automatically.  This might work correctly with a full re-install but I am too lazy (tm).
  2. Running lsusb confirms that usb device detected.  Running networkctl does not show wifi link.
  3. Fully open source firmware exists, and that is what I want (firmware-ath9k-htc ADD LINK).  Download pkg to USB and install.  Easy-peasy.  Reboot.  Link found when running networkctl.  However, link not available yet.
  4. Try to get iwconfig for more information.  This requires two packages: libiw30 and wireless-tools.  Manual download and install.  Now iwconfig works fine.
  5. The above was not made easy due to the fact that I could not load packages from the USB stick that I used to install the base OS.  Multiple attempts were unsuccessful due to errors (unsigned packages, obsolete packages, unexpected syntax rules in sources.list, etc.).  I wish I had time to debug and send feedback, but life is short.
  6. When I run NetworkManager, it does nothing.  Why?  Is the package not installed?
  7. Apparently netctl is not installed. Sure.
  8. To be continued.
Next try, two weeks later.

  1. wpa_supplicant is running, and seems to accept my passphrase.  But save_config does not seem to work, because it was not started using a config file that has update_config=1. 
  2. I think systemd is using both NetworkManager and systemd-networkd. Not sure yet how to figure what it thinks it is doing.
  3. Adding /etc/wpa_supplicant/wpa_supplicant.conf and restarting systemd puts my wlan link into "OPERATIONAL: no-carrier" / "SETUP: configuring" status. 
  4. Killing wpa_supplicant and restarting allows configuration to be saved in /etc/wpa_supplicant/wpa_supplicant.conf, albeit with passphrase in plain text. This puts link in "OPERATIONAL: carrier" / "SETUP: configuring" state.  However, doing something like systetmctl restart wpa_supplicant.service does not work well, because two wpa_supplicant processes are run, and the working one is not being used.
  5. After rebooting my computer, I found that the default debian install launches wpa_supplicant.service, and NetworkManager.service.  Let's try to get that way working first.
  6.  I was able to create the wpa_supplicant-interface.conf file, and start the wpa_supplicant@interface service.  AFAIK, the authentication was successful.  However, networkctl still shows "OPERATIONAL n/a", "SETUP unmanaged".  This is because this command is not used with NetworkManager.  It is only used for systemd-networkd.
  7. I can't seem to figure out how to get NetworkManager to use the device.  It might be because dhcp has not yet been run.  The default debian install contains isc-dhcp-client, which has a client named dhclient.  There appears to be no systemd wrapping for this.  Running the client on the command line does not work; DHCPDISCOVER repeats without succeeding.
  8. Let's try systemd-networkd.  I disabled wpa_supplicant and NetworkManager, and enabled wpa_supplicant@interface and systemd-networkd.  Rebooted to be sure.  For some reason, NetworkManager didn't disable.  After stopping it, and randomly stopping and restarting systemd units, I have achieved "OPERATION routable" / "SETUP configured" state!
  9. I can ping my router!
  10. I can ping the outside world (www.oracle.com == 104.96.175.193)!!
  11. The default debian install does not contain nsloookup, but it does have a utility called host.  This utility suggest that I am not resolving hostnames.  Starting systemd-resolved is insufficient for the host program to resolve names. However, using "systemd-resolve --status" does show that my link properly got the right DNS server (good 'ole cdns01.comcast.net).
  12. The final ingredient is to perform "ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf" as recommended.  Now, everything works.
  13. However, it didn't stick on the reboot.  I have two wpa_supplicant running.  
  14. For reasons I don't completely understand, I have a working system with networking.  A few cleanup ops like NetworkManager is still running, but generally good results

New problem on reboot.  "nourveau DRM: failed to create kernel channel"
  1. Rebooted, and still the same problem.  
  2. Comment out mount  of previous SATA drives.  Problem resolved.
  3. Random?  We'll see.
I rebooted the computer, and now it boots. However, resolved now newly not working, just like before, with "Temporary failure in name resolution" error.

  1. This time the error is different, "Host www.oracle.com not found: 2(SERVFAIL)"
  2. Looking at journalctl, they suggest that I should delete /run/wpa_supplicant/interface
  3. Let it be done. Reboot.  All seems OK.
x



This page is powered by Blogger. Isn't yours?