I have installed or upgraded Linux an uncountable number of times starting when I group of us used to pass around a box of floppy disks. The typical sequence is to backup the world, do the upgrade and if you are lucky and your system still boots, fix all the broken stuff. The Mint 18 upgrade is finally something worth documenting.
Long ago I figured I didn’t want “my files” (that is, anything not related to the OS) on the same disk partition as that which will get “upgraded”. That avoids most problems on simple systems — that is, a laptop or your daughter’s school computer. But this upgrade was for my main system — the one that runs 24/7, exports books, movies and such using NFS, has assorted development software on it from Python to Arduino a web server and much more. There are various old boot partitions on the various disks back to Ubuntu 12.04. So, “just install from scratch” didn’t sound like a lot of fun.
The system was running Mint 17.2. I had previously attempted to upgrade to 17.3 but there was not sufficient space on the root partition. I remember when I created it thinking that 20GB was huge. Well, it was for a while but now it was almost full. Time for a hardware upgrade.
The system had a 500GB SSD for / and /home, a 1TB disk with a couple of dead partitions and one with assorted old files and a 2TB disk that is mostily the files I NFS export. (There are more disks including more “occasional use” store and a backup drive but these are off-line most of the time. I bought a new 1TB SSD which would initially replace the 500GB. My initial plan was to load Mint 18 onto this new disk, create two 400+GB partitions — one for /home and one where I would convert /home from an ext4 file system to btrfs and be set to go.
After a couple of false starts I created a Clonezilla live CD. It’s basically Debian Linux with Clonezilla as the only application. I picked a CD over a USB stick because the disk I would be cloning to would be mounted on a USB port so it felt cleaner. Plus, I wondered if my DVD drive still worked. 🙂 Anyway, easy if you are used to a Debian non-GUI install and totally intuitive. I created the partitions on the new drive and then used Clonzilla to copy over partition contents. No issue with size — as long as stuff fits, Clonzilla then fixes things up.
I then realized what a mess it would be to catalog all the software I had added and install it on the new system. As I was contemplating the situation I read that there was a way to upgrade Mint 17.3 to Mint 18. Surprising for the Mint “don’t do upgrades” community. Time to investigate.
Mint 18 Upgrade Method
As I said earlier, upgrades tend to be a process where you create lots of backups to CYA and then hope for the best. Reading about the Mint 18 method impressed me. It appeared to be designed to actually work. Rather than being a one-step, hope and pray process, there are four pieces:
- Try running Mint 18 off a USB stick on the hardware. While this is really a possible step with most systems, suggesting it makes so much sense.
- Run a check step where the installer decides if it thinks things will work. Repeat as necessary.
- Download the new packages. The installer is pointed at the new repository and everything is downloaded. This being a separate step is really important — particularly if you have a sucky internet connection. If it fails, you can just restart it and it takes up where it left off. All this time your system is still “as it was”. That is, when you start the download the script changes which repositories you are using and when it terminates it changes them back.
- Once you are happy with step 3, you start the upgrade. If this step fails you can have a disaster but short of a power failure, you really should be OK.
OK, I did it and, so far, all seems under control. Conversion to btrfs is on my “later” list.