wlan blocked

Just this week I replaced the hard drive in my laptop with a solid-state drive. As part of the process I did a clean install of Fedora 28 Workstation to the drive.

The install went very smoothly but when got into using the machine (which is now so fast!) I noticed that wi-fi was disabled. I usually use my machine on a wired connection, so it was no biggie but it’s one of those nagging things that I had to fix. I had used wi-fi in the past few weeks, so it was a new problem.

With this kind of thing you work through the list of recent changes and usually it’s one of those. So I plugged in the old drive, booted to that and found that wi-fi was still unavailable. I booted to an older kernel; still nothing.

Scouring the internet for a solution I found some useful commands. This first, iwconfig, I was familiar with. It was giving:

virbr0    no wireless extensions.
virbr0-nic no wireless extensions.
lo no wireless extensions.
wlp9s0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=off
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
enp5s0 no wireless extensions.

So the OS knew about the device. Then lspci -v gives lots of output, but of interest here is:

09:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
Subsystem: Dell Wireless 1702 802.11bgn Half-size Mini PCIe Card [AR9002WB-1NGCD]
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at f7e00000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
Capabilities: [60] Express Legacy Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number [ Redacted ]
Capabilities: [170] Power Budgeting
Kernel driver in use: ath9k
Kernel modules: ath9k

But the command of interest was rfkill which gave:

ID TYPE      DEVICE    SOFT      HARD
0 wlan phy0 blocked blocked
1 bluetooth hci0 blocked unblocked

The device was there, but disabled in hardware. I tried the Fn-F2 key combo and that was switching airplane mode on/off, but it never enabled wi-fi.

Further Googling found a similar problem affecting Asus devices. So following that advice I reset the BIOS (set default values on this machine) and rebooted. This fixed the problem.

sendmail

I have recently been setting up a website for a friend. As part of this process I needed to sort out my mail server so that he could have a pretty email address.

For a long time I’ve been able to receive/access email to accounts on that server, but I’ve never configured it to allow sending via those accounts.

Setting this up took a few evenings of internet research. I found many old posts, most of them relating to old versions of sendmail. These seemed to need additional configuration, often involving SASL and/or cyrus.

My server is running CentOS 6, so sendmail is at version 8.12. It was in such a state that I started by uninstalling email services (sendmail and postfix) and reinstalling just sendmail (also sendmail-cf). It seems that SASL2 is already installed. Cyrus is unused.

The interesting lines from sendmail.mc are as follows:

define(`confAUTH_OPTIONS', `A p')dnl
TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl
define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
define(`confSERVER_CERT', `/etc/pki/tls/certs/server-cert.pem')dnl
define(`confSERVER_KEY', `/etc/pki/tls/certs/server-key.pem')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
MASQUERADE_DOMAIN(channel-e.co.uk)dnl
MASQUERADE_DOMAIN(domain-two.co.uk)dnl
MASQUERADE_DOMAIN(domain-three.co.uk)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

Of note are the authentication mechanisms. The default install lists many and it wasn’t until I reduced the list to the two shown that I was able to log in to send email. I masquerade all of the domains that users need to send from.

Don’t forget to enable ports through the firewall too.

Ubuntu Annoyances

I’ve always been a RedHat man myself. Since around RedHat 3 I’ve run with that, and then Fedora, on my laptop and RedHat/CentOS on my servers.

At work Ubuntu is the choice and so that’s what I’m using there. I have recently found a few annoyances though, that I’ve not come across with RedHat/Fedora.

/boot fills up

It seems that with the default installation of both 12.04 LTS and 14.04 LTS versions the boot partition fills up over time (less than twelve months). The system installs updated versions of the kernel and related files. This continues until the partition is out of space.

I had to Google to find the fix, as root on the command line:

  • determine which kernel version is running with uname -r
  • delete the unused files from /boot
  • prevent this from happening in future with apt-get autoremove
  • you’ll probably need to run apt-get -f install to clean things up

I’ll be checking back on the servers to make sure that I really have fixed the problem.

Upgrade requires interaction

Yesterday/last night I decided to take the plunge and update my desktop machine from Ubuntu 12 to 14. I set it going and it warns that it can take hours. I expect that. When I checked back after a while there was a dialog asking if a file should be replace. Such prompts popped up a few times during the process. This sucks!

With Fedora you set the process running, come back in the morning and it’s done.

Firefox Offline broken

For some time now it seems that Firefox offline mode is broken or borked in some way.

I notice this on the train when I need to refer to Android documentation. Documentation can be downloaded as part of the Android developer kit. This used to work just fine in Firefox on my netbook when offline. Recently though, perhaps two releases of Firefox ago, it utterly fails.

Firefox displays nothing other than a blank white page whilst trying to connect to google.com or googleapis.com. Yesterday/today it has been particularly frustrating as I’ve been trying to work on stuff that I’ve not done before. Documentation was essential.

A search of the internet suggests that it might be add-on related. Some suggest restarting Firefox in safe mode. Disabling add-ons, safe mode make no difference. It is core Firefox that is at fault.

I have now installed Epiphany. It can open the local files, though the search function doesn’t seem to work. Better than nothing.

It looks like Mozilla broke something in Firefox 27?