Sorry for missing last week – there is a good reason. This post is all about it…
TL;DR: One little problem leads to just one problem, leads to another problem, then some learning happens, and everything works out in the end. Thanks for coming to my TED Talk.
I feel bloated…
A few weeks ago, I talked about my laptop problems. I noticed that the keyboard on my Dell XPS 13 laptop was bowed upwards. While the machine was working fine, the bend could only mean one thing — the battery was swelling up inside the case. This is extremely bad news, as a swollen lithium ion battery is a fire and explosion hazard.
This situation led me to two other discoveries, each worse than the last:
- The battery in my laptop is not a user-servicable item, which meant I would have to take it or send it to an authorized Dell facility.
- My machine was out of warranty, which meant I had to pay for the repair out of pocket.
However, there was one piece of good news — I bought it using a credit card which extended the manufacturers warranty, so while I would still have to pay for the repair up front, I would be reimbursed for the cost. After calling Dell, my machine was on it’s way to get repaired.
A new member of the family
After borrowing my wife’s Surface Pro on which to work while my laptop was being serviced, I started thinking about why the battery had swollen.
One of the primary causes of battery failure like this is keeping the machine plugged in and charging 24/7. Since I use this machine all the time, for work and play, I usually keep it plugged in and turned on.
So rather than get the machine back and put it back into the same situation, I decided I would get a new desktop machine designed to be plugged in and turned on all the time.
I wanted something that would be somewhat future-proof, so a close-to-top-of-the-line multi-core processor with plenty of RAM and hard drive space would keep me going for a while. I’m not a hard-core gamer, but there are some games I enjoy, so I figured I would splurge on a decent graphics card as well. I already have a good monitor, a Logitech BT mouse that fits my hand, and a kicking Ergodox keyboard, so all I needed was the tower.
I headed to the Dell website and checked out the deals they had. I got lucky — I found a deal on an XPS 8930 tower, which I configured with an I7 9700 proc, 32 Gb RAM, a 256Gb SSD boot drive, and a 2 Tb spindle drive for data. I splurged a bit for a Radeon RX 5600 GPU with 6Gb video RAM. WiFi and BT were part of the package, and the case has a couple million USB 3.0 connections as well.
I placed the order, then waited to see which would arrive first — the new XPS tower, or my beloved XPS laptop. The tower won, arriving about a week ago and a few day ahead of the laptop. There was just one problem.
It had Windows 10 preinstalled.
A Tale of Two Operating Systems
Don’t get me wrong. Windows is a fine operating system. I should know — I worked for Microsoft for over 20 years, with the last half of my career in the Windows Servicing division. I helped create security and other hotfix packages for Windows on a monthly basis.
But it’s those monthly update packages I don’t like. I don’t like having to reboot once a month, whether I want to or not. And I don’t like the fact that updates are recalled multiple times per year. I did’t like it when I worked at Microsoft, and I certainly don’t like it as a customer.
So, rather than complain about it, I decided to wipe Windows from my machine and install Linux.
I’ve been using Ubuntu Linux for a few years now, and I like it. A lot. I used Unix in college, and had always been a fan of Emacs, so Linux was a no brainer. It’s much easier to install and uninstall software on it cleanly. It’s much more forgiving of older and slower hardware, and has much better performance on new hardware. It runs all the software I used to run on Windows (with one minor exception, but I have an alternative for that).
However, I didn’t want to dismiss Windows out of hand. One thing Windows has come up with lately is the Windows Subsystem for Linux, or WSL. This allows Linux users to use a regular Bash shell (or ZSH in my case) to access their Windows machine. The latest version, WSL2, promises even more capabilities, including the ability to run X programs under Windows sometime in the future.
So rather than wipe Windows right away, I decided to try WSL2 instead.
Vive la difference
After booting Windows and getting to the desktop, I started reading how to get WSL2 installed. But I’m getting ahead of myself…
Getting to the desktop took some time. Of course, there’s the Out of the Box Experience to walk through. And then there were the updates.
So.
Many.
Updates.
After rebooting several times, I was finally at a desktop I could work with, and started reading about WSL and WSL2. Enabling it isn’t difficult, but part of the process requires some Powershell scripting to enable certain features. Here was the first strike against Windows.
After working on Linux for a while, you get used to short commands. For example, listing files in the current folder is done with ls
. Finding the free space on a disk is done with df
, or "disk free". Installing software is done with apt
or my preferred substitute, aptitude
. Administrator mode is just one sudo
away. Command options are given with a leading -
, such as ls -alF
for a nicely formatted folder listing.
So imagine my consternation at having to enable WSL with the Powershell command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Oh well, a long Powershell command or two is a small price to pay to get Linux functionality on my new Windows box, right?
That would be true, except WSL2 wasn’t available to me after running that command. I needed to upgrade to a later Windows 10 build.
I went back to the Windows Update Assistant and checked for updates. I selected all of them, including platform update, and clicked Install All.
After more rebooting, installing, and checking, I went back to Powershell and tried again. No dice. Hmm, what could be wrong?
After some more reading, I discovered that the Windows 10 update I needed to enable WSL2 was only available to Insiders. I know what the Insiders program is. I don’t want to deal with normal updates, so I certainly didn’t want to deal with frequent Insider updates either.
Windows had to go. I created recovery media "just in case", then downloaded the Ubuntu 20.04 ISO to create new Ubuntu media on a small SD card. As an interesting data point, it took less time to download the Ubuntu ISO, download the tool I needed to burn it to the SD card, and create the bootable SD card, than it did to create the Windows recovery media from an already installed system. Go figure.
Not Without a Fight
Of course, Windows wasn’t going without a fight.
My Dell machine came with a setting in the BIOS called RST, for Rapid Storage Technology. Among other things, RST treat multiple disks in the machine as a single disk. Knowledgeable readers may recognize this as a simple RAID array. Since I have two drives (an SSD for booting, and a big spindle drive for storage), this makes sense, especially for Windows, which treats each disk as a separate entity.
The problem is, Ubuntu has problems detecting, using, and installing itself on RAID arrays. It can do it, but there are config changes that need to happen.
The second problem was that I didn’t know anything about RAID, RST, or Ubuntu install problems when I started.
Anyway, after booting to the new Ubuntu install media, I checked to make sure everything worked, then started the install. And that’s when I saw the RST error.
I did some searching. I did a LOT of searching. I found this article, which talks about the problem directly. Mitigation steps included making changes to the Windows registry, and I was unclear how Windows registry changes could impact my Ubuntu install.
Finally, after trying all the changes listed there, I saw this line in the article:
[The RST install problem] can be resolved by either one of the two changes:
- Turning RST off completely in BIOS.
- Changing the storage controller protocol from RST to Advanced Host Controller Interface (AHCI).
There it was, in black and white pixels. After a quick trip to Dell’s website to learn how to get into the BIOS settings, I found the right setting, changed it, rebooted, and was greeted with a boot loader error.
You see, Windows still needs the RST setting. Changing it without changing the boot loader, now means there’s nothing to boot from. And since my previous Ubuntu install had failed, there was no GRUB boot loader.
So, back to the Ubuntu install media I went. Gone was any thought of dual-booting Windows and Ubuntu. I nuked the Windows partitions from both drives, and repartitioned them. Linux can handle different folders on different drives easily, so I put everything except my /home
folder on the SSD, and finished the install.
And now…
I took another day or two to configure my new Ubuntu machine, with the following vital software:
- KDE Plasma desktop with Latte Dock
- ZSH and Oh-My-ZSH for a shell
- VS Code
- Steam — what good is a graphics card without games?
- LibreOffice
- Obsidian for note taking
- Slack for Real Python communities
- KeePass for password management
- RClone for Google Drive and OneDrive syncing
- Krita and GIMP for graphics
I used Flatpaks where I could, Snaps where I had to, AppImages if possible, and the rest were installed with aptitude
. I’m still configuring a few things, and I need to make sure the data from the laptop is safe before I wipe it, but it’s all been good so far.
Next time, more on actual coding…
Dell is known for being Linux friendly, with many machines shipping with Ubuntu already installed. Did they not have your model with 20.04 Focal?
It was odd, and I do know Dell has a reputation for being very Linux friendly. My laptop is a Dell XPS 13, which came with Ubuntu preinstalled so I know it’s possible. When I ordered the new desktop, however, that wasn’t a configurable option. It was listed in their “specials” category, so perhaps that was the limiting factor, although I was able to select the hardware I wanted.
All these problems could have been operator error as well. I’m OK with that — the last time I installed a new operating system over a different one was during the Clinton administration. I stop using a muscle, and when I tried to flex it again, it causes problems.