Make a full backup before you start. The easiest way might be an exact copy of the hard drive where Mint is installed (like
/dev/sda
), which can be copied back if something goes wrong and you won't have to manually find and copy personal files because the full drive is copied. The downside is that the image file will be quite large (500 GB hard drive -> 500 GB image file, in such a case compression might be used). Since this drive must not be mounted, boot from a live system like Parted Magic, connect an external drive, mount it (i.e., in/dev/usb-hdd
) and run dd (will take a while, maybe hours).# dd if=/dev/sda of=/mnt/usb-hdd/os.sda.dd.img
Or using compression (will take even longer):
# dd if=/dev/sda | gzip -c >/mnt/usb-hdd/os.sda.dd.img.gz
Depending on your setup, there may be more efficient ways.
Locate all source files (/etc/apt/sources.list /etc/apt/sources.list.d/*) and make sure that only one contains the official Mint sources. If this file is not called "sources.list.d/official-package-repositories.list" on your system, replace the file name in the following command.
Update the official source file to point to the version 17 repository instead of 16.
# sed -i -e 's/saucy/trusty/' -e 's/petra/qiana/' /etc/apt/sources.list.d/official-package-repositories.list
Before you start the upgrade process, double-check that the sources are okay. Do not continue if it doesn't print "sources okay" at the end (some sources may be wrong, fix them or comment them out before the upgrade). This will pull the package lists for Mint 17 (so the upgrade routine knows what packages are to be installed) and throw an error if it can't download them, but it won't change/update any installed packages.
# apt-get update && echo sources okay
Perform the actual upgrade (-y to answer some of the rather basic questions with yes).
# apt-get -y dist-upgrade
deb http://packages.linuxmint.com qiana main upstream import
deb http://extra.linuxmint.com qiana main
deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ trusty partner
Update:
I've just tried this (upgrade from 16 to 17) using "apt-get -y dist-upgrade" (it still asked a few questions, like if /etc/issue should be updated, default was no) and it eventually failed:
...
Setting up kmod (15-0ubuntu6) ...
Installing new version of config file /etc/init/kmod.conf ...
dpkg: dependency problems prevent configuration of initramfs-tools:
initramfs-tools depends on udev (>= 147~-5); however:
Package udev is not configured yet.
dpkg: error processing package initramfs-tools (--configure):
dependency problems - leaving unconfigured
...
Errors were encountered while processing:
procps
udev
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
This is probably why the community tutorial page on upgrading recommends a "fresh upgrade" (a misleading term for "wipe everything and reinstall from scratch", followed by manually copying back some of the important files) and advises against a package upgrade ("This is something we do not recommend"). Following this recommendation, Mint users would reinstall their system every year (or whenever a new release comes out).
So you better have a full backup before you start. And get ready to fix dependency issues.
In my case (error mentioned above), the following commands fixed the issues (this, again, asked if files should be replaced or not - select Y (yes) unless you're really sure you don't want to keep them for some reason).
# dpkg --configure -a && echo OK
# apt-get -f install && echo OK
# apt-get dist-upgrade && echo OK
Once everything is done, you should be on the new version (reboot for all changes, including new kernel, to take effect):
# cat /etc/issue
Linux Mint 17 Qiana \n \l