10

Could anyone advise on the correct terminal commands to upgrade from Linux Mint Petra to Linux Mint Qiana?

4
  • What have you tried (or searched) so far? Do you have some concrete problem we can help you with the upgrade? Commented May 17, 2014 at 18:47
  • Hi Doktoro, I installed and used update-manager-core in another ubuntu installation which worked perfectly fien; however I don't know if I can use the same command line in Linux Mint?
    – Freakazoid
    Commented May 17, 2014 at 18:58
  • Usually, questions in Super User should be concise and they usually deal in specific problems one might face while doing something. The way this is phrased, it seemed (when I reviewed it) as though you didn't do anything to solve your problem, mainly by doing a preliminary search on the topic or even by trying to run the command on your platform. I'm not used to deal with Linux, though, so this might not be as simple as I has initially perceived. Commented May 17, 2014 at 19:09
  • Thank you very much for your input; will try and be more concise next time around...
    – Freakazoid
    Commented May 17, 2014 at 19:11

3 Answers 3

16
$ sudo sed -i 's/saucy/trusty/' /etc/apt/sources.list

$ sudo sed -i 's/petra/qiana/' /etc/apt/sources.list

$ sudo sed -i 's/saucy/trusty/' /etc/apt/sources.list.d/official-package-repositories.list

$ sudo sed -i 's/petra/qiana/' /etc/apt/sources.list.d/official-package-repositories.list

Use sed to replace references to saucy with trusty, and petra with qiana in the sources

$ sudo apt-get update && sudo apt-get dist-upgrade

$ sudo apt-get upgrade

Update the repositories with the new settings and run a dist-upgrade to upgrade to the new version cleanly, then run upgrade to make sure all the packages are updated.

6
  • 1
    Can you explain what these do? As it is it's just a ton of things to run.
    – Jon
    Commented May 25, 2014 at 23:32
  • 3
    The sed commands a simple string substitution. In each of those files, the words saucy and switched to trusty and same for petra to qiana. sudo apt-get update searches for updates to all packages, and then dist-upgrade upgrades the distribution. The final upgrade command upgrades the rest of the packages.
    – Adam
    Commented May 27, 2014 at 22:54
  • can i upgrade linux mint 15 straight to linux mint 17 ?
    – user106202
    Commented Jul 16, 2014 at 8:18
  • 1
    This should be the accepted answer.
    – Dan W
    Commented Jul 19, 2014 at 3:36
  • @pradeek I'd be surprised if that was possible. I wouldn't try that on my coputer.
    – KajMagnus
    Commented Aug 1, 2014 at 10:04
1

Update to Mint 17 without loosing your settings from Mint 16 (or other former versions) but still installing the newest release directly from CD:

Please take a look at:

http://forums.linuxmint.com/viewtopic.php?f=42&t=167083&p=858729&hilit=backup#p858729

or you can directly go to the project page:

https://github.com/MintBackupRestore/MintBackupRestore

With best regards, Mint_BackupRestore

0

The Mint 16 sources are usually in /etc/apt/sources.list.d/official-package-repositories.list. (My /etc/apt/sources.list is basically empty, except for a comment "# See sources.list.d/official-package-repositories.list".) Unless this is not the case on your system, only the official-package-repositories.list file has to be updated.

  1. 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.

  2. 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.

  3. 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
    
  4. 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
    
  5. Perform the actual upgrade (-y to answer some of the rather basic questions with yes).

    # apt-get -y dist-upgrade
    

/etc/apt/sources.list:

# See sources.list.d/official-package-repositories.list

/etc/apt/sources.list.d/official-package-repositories.list:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .