Ubuntu 18.04LTS on the HP boat anchor

Some time ago, we bought three HP laptops. One had a failure we were never able to resolve, and another was replaced by an ASUS desktop. The last was decommissioned back in January. So I decided to try installing the most recent Ubuntu 18.04LTS on one of them. Here’s my notes from the process.

First, re-read this explanation of UEFI Secure Boot and Windows.

download an ISO and verify it

turn the ISO into a bootable USB stick

boot it up and answer lots of questions

wait while everything gets installed

then install Dropbox and Google Chrome

$ apt install ssh # to get the OpenSSH server

$ ssh some-machine # then copy any data not in Dropbox

$ apt install telegram-desktop

$ apt install gnome-tweak-tool  # to enable permanent workspaces

$ apt install colordiff antiword jhead csvtool ffe poppler-utils

$ apt install sqlite3 sqlite3-pcre

$ apt install git curl libreadline-dev

$ apt install vim vim-gtk

$ apt install build-essential

$ apt install libssl-dev zlib1g-dev

$ cd ; git clone git://github.com/sstephenson/rbenv.git .rbenv

$ rbenv -l # to find what version to install

$ rbenv install 2.5.1 # or whatever

mounting disks at the Ubuntu command line

Thirty years ago I used to know how to use mount and /etc/fstab and things like that to mount disk drives. But nowdays, it’s all too hard to remember. Especially now that we use UUIDs.

So here are some things to remember:

$ lsblk # a very pretty way to see block devices (like lsusb for usb devices)

$ sudo e2label /dev/sdb1 # to see what I called the device

Clobbering my Dual-Boot Laptop

I clobbered my dual-boot laptop. I ought to have clobbered it long ago, so it was uni-boot Linux, but that whole secure-boot UEFI firmware business scared me too much to do that without knowing more, and who has time to learn more, or a test-bed on which to make mistakes.

I was running Ubuntu 17.10 for awhile, but [I made, over a period of two months, a long list of trivial changes that made me decide the simplest thing would be if] I decided to reinstall the OS. And that didn’t work. Or, it sorta kinda worked once or twice, then quit working completely.

Did I run into the Ubuntu BIOS bug? I don’t know. But I was installing Ubuntu and I couldn’t get past the BIOS. So maybe I did. But I don’t know.

For the time being, I’m using my Macs and some older (pre-UEFI Secure Boot) hardware. Here’s an article about how to fix the Ubuntu BIOS bug. Here’s some more about the provenance of the bug.

Ubuntu 16.10 and Zeroconf

I don’t do enough system admin to enjoy it when I do. (Does anyone?)

When you upgrade Ubuntu, you lose a lot of the software you’d installed. There’s a list of system admin tips that I try to remember here. (Which reminds me, I should find a better home for it for when Twitter dies.)

I couldn’t resolve names of Macs in my local network. I should point out what a shame it is that Mac addresses aren’t the same thing as MAC addresses, since Google as my primary system admin resource.

That’s the work of avahi-daemon and friends (a/k/a Zeroconf and Bonjour). For awhile I thought that something had broken there. But eventually, I figured out that was working, i.e., the problem lay elsewhere.

I wondered if they’d added a firewall to 16.10. They did (or, for all I know, they’ve always had one) called ufw (more here), but it’s (still) not enabled by default. If that ever changes, I can learn what to do about it here.

After about an hour, I found out there is something called nss-resolve. Which is actually a pretty clever idea. Except it wasn’t working. Its configuration file is well documented here. Good luck figuring that out.

Finally, I just compared my 16.10 /etc/nss-switch.conf file with the one from a working installation of 16.04.1. HAH!

Not only was there a difference, it gave me a string I could Google. That brought me to this: http://askubuntu.com/questions/837982/how-to-configure-local-dns-lookup-in-ubuntu-16-10

It also brought me to this: https://github.com/systemd/systemd/issues/4157, which (if I read it correctly) says that I should go ahead and use the string from 16.04.1 that works instead of the one from 16.10 that doesn’t.

ttf-mscorefonts

I had to reinstall Linux on my laptop and ran into some trouble with the ttf-mscorefonts package. (It runs some text-mode click-wrap license agreement, except in my case, there was a problem where it didn’t run properly. I probably hit the wrong button at some point.) Anyway, this is not a new problem:

I picked the latter one because it didn’t involve dpkg.

 

System Admin Notes

Windows 10 is, in some ways, worse(!) than 8.1 was. (Really!)

Since I don’t have time to keep sinking into Windows, here’s what I’ve been doing:

Once you’ve done all that, remember to install an ssh server:

sudo apt-get install openssh-server

Also, install rbenv (and ruby-build) and a ruby or two. Plus your favorite gems.

Tech Tab Sweep

It’s time to upgrade your Ubuntu machines.

8 things to do after installing Ubuntu 15.04. One of the items is to add a tweak tool, which reminded me of Unsettings.

I’m working on a similar list for Windows, except (a) nobody gets to install Windows, you have to buy a PC with it preinstalled, and (b) there are about 300 things you have to do next.

Speaking of Ubuntu…. I barely know what a .deb is, so this article was complete gibberish to me, with all this talk about Snaps and Snappy for future releases of Ubuntu.

Bjarne Stroustrup outlines changes in store for C++ in v17. I can barely remember how awesome I used to think C++ was back in 1986. And compared to C, I guess is was, then. Today—forget about it. Just give me a scripting language.

Finally: During the 1990’s I used to be a DIY system builder, but the past decade or two I’ve been too busy and too impoverished. And there’s a lot to be said for buying something small. Still, I might get around to building something again someday. This sounds like fun: