Upgrading Linux Mint 20 to Linux Mint 21.1
Greetings!

Today I’ll show you how you can upgrade from Linux Mint 20 to the current latest version, Linux Mint 21.1, using built-in tools, without reinstalling the system.

Updating the current system, preparation

Before starting the transition to the new version of Linux Mint 21, you need to update the current system to its latest state.

To do this, launch the “Update Manager” from the main menu and update as usual:

I also recommend disabling third-party repositories right away, since when upgrading to the new system version they become outdated, and can later cause an error.

This is also done via the “Update Manager”, menu “Edit”, item “Software Sources”. Here we remove the additional repositories, after which we confirm the package cache update:

Creating a system snapshot (backup)

Now let’s back up using the utility built into Linux Mint: Timeshift.

I described the setup of this utility in more detail in a separate step of the post — Initial setup of Linux Mint 20: Step 2. Setting up operating system backup with Timeshift

If you don’t do the backup now, the system upgrade utility to version 21 will still make you do it.

Don’t forget that people are divided into two types: those who make backups, and those who will make them 😉

Launch Timeshift and create a new system snapshot:

Installing the upgrade utility and running it

After we’ve made the backup, we can safely install and run the upgrade utility to version 21 of the system. Open a terminal and enter this command:

BASH
sudo apt update && sudo apt install -y mintupgrade
Click to expand and view more

After it finishes, run the installed utility as an administrator:

BASH
sudo mintupgrade
Click to expand and view more

Performing the upgrade to Linux Mint 21

After running the command in the terminal, the graphical window of the upgrade utility will open:

Confidently click the “Let’s go!” button.

At this stage, the further actions boil down to the principle of “click Next, Next, Next”.

After clicking, the utility will check the state of your system, and during the analysis it will inform you of possible nuances and offer solutions. For example, this could be:

Just save the list of programs you need so you can install them manually after the update.

Next, the system will run a series of tests and simulate downloading packages and installing the update:

If everything is fine, the program will offer to proceed with the actual update:

The whole process can take a long time, especially if you have an HDD.

Finishing the update and rebooting

After a successful update, you’ll see the corresponding message offering to reboot the system.

The same text will be printed in the terminal window:

Reboot the system:

BASH
sudo reboot
Click to expand and view more

If the stars align and everything went smoothly, you’ll see your usual desktop ;) You can check that the update to the latest version of Linux Mint was successful in two ways:

BASH
cat /etc/os-release
Click to expand and view more

Updating from Linux Mint 21 to Linux Mint 21.1

At the time this post was published, the Linux Mint 21.1 update was released with a lot of interesting new features. You can read the patch notes and learn more at the resources listed at the end of the post.

Let’s get started. Launch the “Update Manager” again, menu “Edit”, and the last line will be the item: “Upgrade to Linux Mint 21.1 Vera”:

Click “Next” (probably referring to the page :)), then check the box that you accept the possible risks and start the update by clicking the “Apply” button:

This update will also take some time. Once finished, you’ll get this message:

Follow the recommendation and reboot the system.

You can check your OS version the same way we did earlier: in the “About the system” program from the main menu, or with the cat /etc/os-release command in the terminal:

Chief, everything’s gone!

Working with Linux systems regularly, you have to deal with various quirks in how they behave. Especially when it comes to global changes.

A bit of troubleshooting 🙂

The system doesn’t boot (emergency console mode)

In this case, you can look for the problem and try to solve it yourself, or simply roll back to the last state of the system from the backup we made at the very beginning with Timeshift.

For example, after the update, my system booted into emergency mode:

The shell kindly suggested I run the journalctl -xb command to view the system boot log.

To avoid reading the whole log, I searched by keywords: error, failed, warning.

Here’s how to do it: while viewing the log, press the slash / and you’ll enter the input mode for search values in the log.

Remember that Unix-like operating systems are case sensitive.

So I searched for several values separated by a vertical bar, for example:

UNDEFINED
failed|Failed
Click to expand and view more

Then you need to press Enter. The found matches will be highlighted. Pressing the n key will move the search cursor forward through the text, and pressing N (Shift+n) will search backwards.

It turned out that during system startup there was a problem mounting an external folder specified in /etc/fstab. I had mounted this folder into the system to exchange files with a virtual machine.

To check, I commented out the line mounting this folder in the /etc/fstab file and rebooted the system. After that, everything started up successfully 🙂

The reasons for the system not starting can vary. So it’s often necessary to simply roll back changes.

Restoring the system from a Timeshift backup

If you also ended up in the emergency console, run this command to start the restore process from a Timeshift backup:

APPLESCRIPT
timeshift --restore
Click to expand and view more

Next, in interactive mode, select the backup number and confirm reinstalling the Grub bootloader, pointing to the partition where it was previously installed (or press Enter to select the default value), usually this is the disk or partition where the OS itself is installed. Confirm the disclaimer, after which the system rollback process will start:

After the restore, the system will reboot on its own.

If your OS doesn’t boot at all, you need to boot from a USB flash drive with a Linux Mint LiveCD image and run the Timeshift utility there in graphical mode. I described how to create such a flash drive in the article: Installing Linux alongside Windows.

When restoring the system this way, in the Timeshift program you’ll need to specify the partition with the backups, as well as the mount points and where to install the Grub bootloader (or leave all values at their defaults).

I’ll make a separate post about backup and recovery in the future.

Conclusions

Today we performed an upgrade of Linux Mint 20 to Linux Mint 21.1 using the OS’s built-in tools — the official mintupgrade update utility.

We also did a bit of debugging and looked at how to restore from a backup.

Of course, it’s always more correct to do a clean install, but there isn’t always time or opportunity for that. Especially if you have two OSes on one disk and don’t really want to repartition the disk again.

Study Linux. Good luck 😉

Useful sources

Copyright Notice

Author: Ivan Cherniy

Link: https://r4ven.me/en/linux/obnovlenie-linux-mint-20-do-linux-mint-21-1/

License: CC BY-NC-SA 4.0

Blog materials may be used with attribution to the author and source, for non-commercial purposes, and under the same license.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut