How do I upgrade from x86 to x64 without losing settings?

Is there an easy way to upgrade the system to x64 from x86 without losing settings and having to repartition etc?


Solution 1:

You can just perform an x86-64 install over the top of your existing i386 install. There's no need to reformat or repartition - the Ubuntu installer has supported keeping the contents of /home and (most of) /etc (and other data directories) for a couple of releases now.

That will get you most of the way there; you'll keep all your configuration, but you won't have the same software installed.

To do that, the guide from this answer should work:

  1. Before installing the x86-64 version, dump a list of your currently installed packages by running dpkg --get-selections > ~/installed-software in a terminal.
  2. After installing, restore the list of installed packages by running sudo dpkg --set-selections < ~/installed-software followed by sudo apt-get -f install. There will probably be some packages that can't be installed, as there are some i386 packages without x86-64 counterparts - libc6-686, the 686-optimised libc is the common example.

Solution 2:

No. Well... Not in a way that's worth it.

There are some guides that offer a disclaimer-ridden murky pathway from 32bit to 64bit but believe me when I say I've been tinkering with Linux for years I just wouldn't want to take it on. It's a giant hack that intentionally breaks things to fool the 32bit system into taking on 64bit packages. Get one thing wrong and you break the install... And it looks like it would take a long time.

The truth is it's just so much easier to back up the things you can't replace (/etc/, /home/, parts of /var) to another drive, pop in the 64bit live CD/USB and reinstall. Installation to my SSD from USB took 12 minutes last time I did it.

When it's reinstalled, make a new user and copy whatever bits of your profile you want back in. You can either dump it all back in or spend a little bit of time and have a good old-fashioned clean out.