I know that the upcoming Linux Mint release will be based on the just-released Ubuntu 19.04, but just couldn't wait this long to try Ubuntu 19.04 and all the improvements it brings. So my past few week's project has been to install Ubuntu 19.04 on my Dell XPS 13 9380 laptop.
My Linux reinstall checklist
This is the first time I'm reinstalling Linux on the laptop, so it's not a terribly comprehensive list – but it covers basics:
- ensure my (encrypted) homedir is going to survive the reinstall
- copy SSH keys from server and key users, if required
- capture list of installed packages (just in case)
- capture list of running processes (just in case)
- screenshot the status bar (to make sure the same things get autostarted after reinstall)
I also decided to use this opportunity to do the following:
- check if Linux 5.0.0 helps with boot times (Linux Mint 19.2 was taking 25+sec to boot from super-fast SSD – clearly taking time to initialise some devices)
- configure BTRFS to be the default operating system for most of storage – should be great for snapshots!
- see if I can migrate the user profile for Brave browser when installing Brave from official repos (I compiled Brave from source on Linux Mint as you might remember)
- check if there's better support for sleep/hybrid sleep behavior
Migrating Encrypted Home Directory to New Linux Install
I had hoped for the Ubuntu 19.04 Live CD to have support for encrypted filesystems (it does offer encryption for your new install, after all), but couldn't easily make it work – so I decided to take an ensier approach: just copy encrypted homedir to another (unencrypted) partition for now – will do further testing next time I reinstall.
Capture Currently Installed Packages as a List
Since Ubuntu and Linux Mint are ultimately based on Debian Linux, I still find dpkg command the easiest way to get packages list:
[email protected]:/ $ dpkg -l > /storage/dpkg-l.txt
First few lines will look like this if you check the file:
[email protected]:/ $ head -10 /storage/dpkg-l.txt Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==========================================-====================================-============-=============================================================================== ii accountsservice 0.6.50-0ubuntu1 amd64 query and manipulate user account information ii acl 2.2.53-4 amd64 access control list - utilities ii acpi-support 0.143 amd64 scripts for handling many ACPI events ii acpid 1:2.0.31-1ubuntu2 amd64 Advanced Configuration and Power Interface event daemon ii adduser 3.118ubuntu1 all add and remove users and groups
Capture Process Listing as a File
This was also easy:
[email protected]:/ $ ps -aef > /storage/ps-aef.txt
Burn Ubuntu ISO onto USB stick
I have followed my bootable USB from ISO in MacOS steps for this after downloaded the Ubuntu 19.04 ISO image. Because it's not a Windows image, there are less steps and you can use Etcher to make bootable USB procedure as well.
Install Ubuntu 19.04, Replacing Existing Linux
Although procedure is mostly the same as in the Ubuntu 19.04 release post of mine back in April, I wanted to share exact steps of installing things on laptop:
COOL FACT: Because you install using the USB-based live-DVD approach, you can make screenshots as you normally would in Ubuntu. BUT you need to copy these somewhere before you reboot the live-DVD.
Update File/Directory Ownership (If Necessary)
It's not uncommon that after OS reinstall you end up with a bunch of files from previous installation that don't have correct ownership details: they have (and show) user IDs and group IDs as numbers – meaning your new install doesn't have the match user or group. Since I'm only concerned with migrating my username greys and its home directory, my task was simple: compare userIDs/groupIDs and make sure they match.
If they don't, the fix is simple: once your new install is completed, log in and run the following command with sudo:
[email protected]:/ $ sudo chown -R greys:greys /storage
This will make my new user greys and its group greys to be the new owners of everything under /storage. You should specify your own username and group name, of coruse. The point is, this approach doesn't really need to know which numeric userid or groupid you have – it just updated ownership info so that your newly created user is definitely the owner of the files under /storage or whatever directory you specify.
Laptop Performance with Ubuntu 19.04
I'm happy to report that Ubuntu 19.04 brings a number of most welcome improvements to my Dell XPS 9380 setup:
- Much faster boot time – there's less than 15 seconds of cold boot time now which is pretty great. I think it's due to better device support in 5.x Linux kernel – it recognises and initialises devices much better.
- Noticeably better suspend/resume behavior – better power management must be at play, because now I have a pretty good chance of my laptop falling asleep upon closing lid. On 4.x kernel it pretty much always stayed awake and resulted in overheating laptop and draining the battery dry.
- Better WiFi support – although WiFi driver/kernel module keeps crashing every few days and this means a reboot if I want to get back online.
Project Follow Up
I have a number of things to research based on this Unix Tutorial project:
- Get to the bottom of WiFi driver/kernel module issue – rebooting laptop every few days is not acceptable. I will at the very least find which module to reload without reboot, but ideally need to find out if a better driver is awailable to avoid all this maintenance altogether.
- Snap apps don't seem to work on my external homedir based on btrfs filesystem. Could be a problem with btrfs, could be a problem with non-standard homedir localtion – either way Snaps don't work, so I had to migrate my homedir to standard /home/greys location for now.
- Graphics performance seems improved but still not as snappy as I would expect. Must investigate further – I know my XPS laptop doesn't have a discrete graphics card but still expect it to be powerful enough to handle normal daily use and interface elements in Ubuntu 19.04 like showing tasks or searching for an app.
- Improve the Dell XPS keyboard backlight situation – specifically, automate keyboard highlight for Dell laptops in Linux with a cron script.