Ubuntu 18.10 install notes
I’m updating my venerable home Linux server to Ubuntu 18.10. Installing on an SSD, and I figured I’d take the advantage to start over rather than bring along this Ubuntu install I’ve been coddling since 2011. Nothing like a little spring cleaning.
It’s remarkably tough to tell what all is running on a crusty old barnacle server like mine. I found the output of “ps -xaf” and looking at crontabs to be most useful. systemctl’s output is so noisy to not be very helpful. nmap is a good backstop for checking out network services.
All told it took about 2 hours to get the software environment set up more or less like I used to have it. That seems incredibly fast to me! It took 2-3 more hours to install more persnickety things and I am still apt installing various random command line tools I’m missing.
Boy SSDs are nice. The machine boots in about 6 seconds. Really 3, but then we waste 3 seconds (or more) waiting on the buggy r8169 Realtek driver for the ethernet to come up. I tried ordering a replacement Intel NIC but the one that arrived from Amazon was counterfeit.
The drive I’m replacing has run for 61289 hours, or just about 7 years. Been turned off and on 41 times. Smart has logged 0 errors for it. Not bad, li’l WD Blue!
Things I did and random notes
“curtin” is the name of the Ubuntu installer. It leaves a couple of little named turds behind in /etc/apt/, /etc/cloud, and /etc/default/grub.d.
A lot of Ubuntu wiki docs are seriously outdated, often describing things that were only relevant in 2014 in the pre-systemd days. Caveat lector.
Configuration change
Immediately run apt update; apt upgrade. No idea why this isn’t done automatically.
Add a static IP configuration in /etc/netplan, removing the old 50-cloud-init.yaml that was there. The default DHCP configuration is perfectly reasonable but I want my server to work even if DHCP is down.
Edit /etc/default/grub to add fsck.repair=yes to the kernel command line. I’m not certain but I think this is the systemd way to ensure the boot disk is really fscked at boot time. Note there’s a bug in Ubuntu where /etc/default/grub.d/50-curtin-settings.cfg overrides the setting of GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub. I swore a little and then edited the offending 50-* file. This bug may be fixed in December 2018.
Stuff I installed
python3.7 and python3.7-venv. Cosmic (18.10) defaults to 3.6.
chrony to replace the crappy systemd NTP implementation.
plexmediaserver from their Ubuntu repo. Bless their hearts, this is still buggy so many years later, but it mostly works. Ignore any weird warnings about “Conflicting distribution”.
postfix as a local machine. this means mail stays entirely local, so mostly useless, but lets cron errors get through
munin. good ol’ system monitoring. I love the inscrutable graphs.
rsnapshot for backups both local and remote. I like the idea of Duplicati but after its last install corrupted itself I’m not in a hurry to install it again.
samba. This just worked?! I borrowed bits of my config from before but that was pretty simple, just set up a couple of shares. Samba used to be such a heartache to get working, amazing.
SABnzbd for Usenet downloads. This turned out to be remarkably complicated. Ubuntu 18.10 has a recent version in the repo, but the setup script is not great.
- Install sabnzbdplus. Ignore the suggested packages
- Create a nzb user. useradd -r nzb; usermod --lock -s /usr/sbin/nologin nzb
- Edit /etc/default/sabnzbdplus. You have to change USER. Default port is localhost:8080, I changed that too.
- service sabnzbdplus start
- point a web browser at the instance, use the configuration wizard
- if you had an old config, it’s stored in ~nzb/.sabnzbd/sabnzbd.ini. Server passwords are helpfully in plaintext.
Stuff I didn’t have to do
Some things I’m used to doing on new systems, but weren’t necessary.
Install locate, the doodad that lets you do a fast find for a filename. Ubuntu 18.10 comes with mlocate already installed.
Set up unattended-upgrades for security fixes. It was already installed for me.
Set up powersaving. The default configuration is powersaving for the CPU, you can verify via cat /sys/devices/system/cpu/cpu$FIRSTCPU/cpufreq/scaling_available_governors. (To configure this see systemd ondemand or else cpufrequtils).
Change the I/O scheduler. CFQ looks to be the default now.
Comments
Not only was samba easy to set up, it now supports Time Machine, in case you use that for Mac backups. https://kirb.me/2018/03/24/using-samba-as-a-time-machine-network-server.html