8 years ago
The 17.x releases of Linux Mint which began with Qiana (will) share with each other not only the long term support until 2019, but also the easy upgradability from such a point release to another: as the software base remains the same (namely Ubuntu 14.04 Trusty Tahr), so do your user environment, and therefore all of your data will remain in place. In other words, you’ll have to adapt to the new features in Cinnamon or MATE only.
But next year at the latest, there will be an updated software base for Linux Mint, so we’ll have to face again that nasty problem of how to avoid copying (maybe) gigabytes of data from users and losing their beloved settings — a problem that everyone switching from another (working) distro or from an older, major release of Linux Mint is still confronted with.
That is, we want to save us from as much work as possible, as opposed to try to save and then to restore lots of data and personal settings which might be very time consuming and might also cause permission issues within the new system… This tutorial simply presumes that you made conscientiously your backups any time in the past , just in case something would go wrong, but we don’t want to bother ourselves with that while we’re installing an exciting new version of Linux Mint…
As you’d probably guess, you must have an external boot medium in order to install a new Linux system. This is the easiest thing in the world:
…$ md5sum ~/iso/*.iso
…$ gedit ~/iso/checksum.md5
As far as the live DVD is concerned, you have to ensure that the ISO image is transferred to the disk by your preferred burner application, e.g. brasero, xfburn, etc.
…$ md5sum -c MD5SUMS
We must now collect some bits of information that we will need in order to conserve the current state of our data before we can definitely freeze the old system for the installation process.
…$ mkdir ~/iso/apt …$ cp -R /etc/apt/sources* ~/iso/apt
…$ cat /etc/passwd | grep 100.: > ~/iso/users.list
Each line of of the resulting ~/iso/users.list will contain one line for each real user account on the system, with seven fields delimited by colons (‘:’) which store the user’s login name, an ’x’, his numerical user ID, his numerical group ID, his full name, the path to his home folder and his command interpreter. Please write down these data for the very first user, as you will need them during the installation, just in a moment when you won’t be able to access that file.
…$ gedit ~/iso/old_groups.shFill this command file with the following contents:
#!/bin/bash # iso/old_groups.sh (MagicMint) O0202 # Writing out old users’ groups USERS=~/iso/users.list echo -n > ~/iso/groups.list for user in `cat "$USERS" | cut -d':' -f1`; do echo -n "$user": >> ~/iso/groups.list sudo -u "$user" groups | tee -a ~/iso/groups.list done #End of scriptSave the script and run it by typing:
…$ source ~/iso/old_groups.sh
There are certainly some corrections or improvements you made to your old system. If you had respected some rules, you could re-apply your changes to the new system without hassle (if not, keep those rules in mind until the next upgrade ):
Now, reboot into a live session with the medium prepared in Step 1. This is the stage where you should thoroughly test whether the new release of Linux Mint works out for you and your hardware, even in the case you had a well working system, since there could be regressions in a new release. Anyway, you should focus on the following points, because in general the newer the hardware, the likely it is to come across something that declines service yet (but conversely, chances are that old annoyances are gone ):
Once you’ve made your decision, you should freeze the system. Thereafter, you ought not reboot into that old Linux on the hard disk, because there will be be no place where to login to :
This step is totally unnecessary , but only if the /home directory aforesaid has its own partition. Although this sounds logical, because you wish to keep all your data and settings apart while at the same time you’re craving for a newer system which would be more state-of-the-art, the tradition of Windows and other poorly bred distros often misleads people to store anything in the same partition on the disk. However, if you want to separate the data from the rest, the best is to put /home on a partition of its own.
Actually, the whole step above is the only one where things can really go wrong , if you don’t pay attention, so only do it once for good to never have to re-do it again: in the only case you had made the mistake of installing on a single partition. It’s always better to avoid it altogether by making up the following partitioning scheme (beside the partitions possibly reclaimed by other operating systems):
Now comes the moment that you had so much longed for: the installation of your new Linux Mint — but you should do it by trying not to erase your old data. If you proceed like the following, the tenet of a fresh upgrade won’t be violated, although you’ll preserve your personal data while getting it done way much faster:
Something else You can create or resize partitions yourself, or choose multiple partitions for Linux Mint
Before rebooting, you must implicitly restore the first user’s data yet:
After having rebooted into your brand new release of Linux Mint, you can proceed with restoring the old state of your user environment. Again, there is a determinate sequence of moves to follow:
First, Add the users one by one in Menu› Administration› Users and Groups› Users. Then, click on each user in turn to verify that their Groups match those in groups.list (from the same backup folder as above). If not, click on the user’s groups list and rectify it — the correct user groups have a meaning inasmuch as certain features like folder sharing or printer administration won’t work without them. After that, you can quit the Users & Groups application, and open My Computer› File System in the file manager.
Here, Open As Root the /home folder, and as such, make sure that View› Show Hidden Files is still ticked, and click View› Extra Pane or press [F3]. For each user you’ve just created, you must select all the contents in its user_folder, delete it, and replace it with the contents of the corresponding user_folder.old. After which you can delete all the *.old folders in /home (all this is essentially the same procedure as in Step 6 for the first user);
The PPAs (Personal Package Archives) are specific to Ubuntu as they depend on its particular releases most of the time, and they need Authentication keys from the Ubuntu key servers;
…$ sudo apt-get update
If any of the repositories generates a “Packages 404 Not Found” message, then you ought to correct its address, if you can. If not, then you should deactivate that repository altogether for now.
Now, click on the Update Manager in the panel, Edit› [its] Preferences, most notably the Auto-Refresh period which is unnecessarily short in general, and Install [the] Updates.
…$ sudo apt-get install localepurge
At the very last, start Menu› Administration› Backup Tool, click on Restore software selection, and choose the software_selection_…_package.list from the iso folder. This operation will re-install all of your previously used packages as a whole — and that’s it .
Be aware that depending on your formerly installed applications, the very last step above can take a very long time to complete: while the installation from the USB stick has more of a coffee break, the software restoration feels more like installing Windows (without repeated restarts, however ), i.e. in my case a ¼ of an hour vs. 1½ hours. But you should realize (what software reviews usually don’t) that all things considered, twice (or more times) the contents of the live DVD worth in packages must be downloaded and installed at once, whereas this process was evenly stretched over the whole lifetime of your previous system.
As a final touch, you could re-work your customizations from the old system, insofar as you had saved them after Step 2. Remember, however, that we didn’t saved anything from the old /root folder which is the place for custom settings for any administrative task performed as a super user, like system profiles of luckyBackup, e.g. Such settings can only be restored from external backups with the right permissions.
Before you can fully enjoy your shiny new Linux Mint, you should fix as yet the problems you ran into in Step 3. But that’s what the Community is for …
This tutorial is just a detailed synthesis from my own experiences, a lengthy discussion on the forums and another resource that didn’t work satisfactorily for me .
Great article, but was written a year ago. I am wondering if it will apply to going from Linux Mint 17.3 to 18.1? Th
Great article, thanks for your hard work in compiling it.
I also agree with http://community.linuxmint.com/idea/view/4728 that mounting /home on different partition during installation of Linux Mint should be the default option. I think it would save people a lot of grief.
its a great howto.
(in my personal opinion, which does not matter at all,
I find it a bit old school - No, dont shoot at me, please.
I imagine, how long it will take by your description given -
and if it is really worth all that time spending.
I love solutions with a (modern) graphical interface doing the job;
I worked with aptik and mint backup - for me it was fine that way.
Of course, on your way as per your description, you have much more control
all over - but you need also a deeper knowledge, which most people does not have ... as said before - just my personal opinion)
In any case: This is a super how2 with deep background: +
@zman58: That’s exactly what’s you’re supposed _not_ to do. Here is why:
1. In case of multiple users, you’re more than likely to run into permission issues, as external media are of type FAT32 or NTFS most of the time;
2. Even Clem recommends a separate home (data) partition in his MacBook installation guide (http://community.linuxmint.com/tutorial/view/1643);
3. You must still know the _order_ of creation of your users;
4. This operation might be lengthy if you have lots of data (think of pictures, music, videos, etc.), and awful if you have multiple users. The aim of this tutorial is just to _avoid_ this really unnecessary (and repeated) step, all the more as it’s unwise to mix old and new settings;
5. How do you know the permissions of _each_ file you’ve swapped out and back?
I personally would just:
1. Move my, and other users, personal data to external storage media.
2. Install Linux Mint 17.1 from scratch. Reclaim all hard drive space.
3. Create users as before.
4. Restore users data from external storage media.
5. Restore proper permissions on imported user data.
Bookmarks and email are easy to move this way.
I'm not skilled with using the terminal. So I will save all I want to keep, on another medium. Flash drive of some type.
I was hoping I could fix my freezing up problem,by using my 17 Qiana DVD.
Guess it don't work that way. Thanks
+1. A lot of work went into presenting this detailed step by step Guide. Thanks.
@Hammer459: That’s why I mourn my past Gentoo days sometimes, although its first and only install wiped out my RH 6 and Windows partitions ;-)
@MagicMint I agree mostly with what you say. I am a strong proponent of incremental install upgrades. Redhat has used that since RH 5. Never had problems. HPUX had that with no problems since before 94. and so on....
But Ubuntu and Mint claims it is too much risk and that the destructive reinstall is a safer method. I have not have any problems with upgrades of Unix/linux between 1985 and 2010. I have not upgraded Mint easily and safely, not even once with Mint.
@Hammer: You should read more carefully. This tutorial is linked in above. The problem with those tutorials from the beginnings of Linux Mint is that they do _not_ treat the problem fixed here: retaining both settings _and_ data. The question of the permissions in case of external backups is an important one, and the restoring of gigabytes of data is _never_ trivial nor fast as lightning. If it was, mintBackup would receive more positive reviews, I think ;-)
By the way, I hate loosing years of work, just because nobody cares about updating data… It’s always a risky job to upgrade, and as far as I saw it, even the installer of LM 17.1 cannot be trusted truly :-(
Or you could use this _Official_ tutorial on the subject...