0

I have done 2 distribution upgrades in the past and each time I ended up with grave problems after that, so I decided not to do any automatic upgrades.
However, I do want the newest distribution, since I start to notice my packages being outdated. (Most notably wine)

My plan is to reinstall (X)Ubuntu on the newest version and I've gathered some information on how to that. Since doing this is critical and anything going wrong could end up in a lot of time spent fixing it (and potential loss of data), I want to make sure I didn't miss anything.

Here are my assumptions:

  • I have /home on a separate partition. Anything on there is safe and reinstalling Ubuntu should not affect anything on there. (Except for some dependencies maybe, they should be easy to reinstall if need be)

  • I have a separate /boot partition. My boot loader can stay the way it is and does not need to be reinstalled. However, I might need to update the configs of GRUB.

  • I can save and restore all installed packages with these scripts: https://askubuntu.com/a/99151 (I am only talking about the first two presented there)

  • After reinstalling and restoring my package list, the package manager will still know which packages were installed by hand and which were installed as dependency. (I think I am wrong here)

  • After reinstalling and restoring my package list, my system will be almost the same as before. What I am losing is any configuration in /etc (Restoring that from a backup of an old version doesn't sound like fun, I can do with reconfiguring anything I changed) and any programs I installed that didn't register themselves with dpkg. (I actually want that)

What I want to know now, is whether any of my assumptions are wrong or if I missed anything. Also, what happens if some of the packages I have installed are not available in the newer distribution?

Another thing: Which kind of Ubuntu should I install for this? (I'm thinking about the server version, since that seems to be the most light-weight kind)

I hope you can help me with this problem.

Xandaros
  • 103
  • 2

2 Answers2

1

Don't assume your data is safe. An error in installation can remove all data from your drive. Back up everything you might want before starting. My own technique is to use two or three hard drives. I do the default install of the stable version of Ubuntu onto one drive and the testing version onto another. The third drive is a backup of my home directory. I always use the default on the installer to make a clean install to an entire drive. I do this as soon as the first testing version is available and overwrite the previous stable version. So far, I've never lost any data.

1

You just need to do it (TM). Only some observations:

  1. ALWAYS BACKUP YOUR STUFF. Nothing, will keep you safe from a mistake, if you commit any, as a backup will do.
  2. Double and triple check the partitioning, so you don't format partitions you shouldn't (like /home). Verify that the mounts points are correct the old / will be the new /, the old /boot will be the new /boot etc.
  3. I wouldn't recommend importing the package list as is, but check out what is being removed installed before hand and if a package is not included. This requires manual check but you can prevent a bunch of them using:

    dpkg --get-selections | grep -E 'hold|deinstall' > packagelist.old
    

    This will generate a sanitized list. In the new system do:

    dpkg --get-selections | grep -E 'hold|deinstall' > packagelist.new
    

    Then compare both lists. Some packages change names with the upgrade, so it's better that you check that.

Which kind of Ubuntu should I install for this?

Whatever you like, but remember that Ubuntu server doesn't have a Graphical User Interface (GUI). Is pure text.

Braiam
  • 67,791
  • 32
  • 179
  • 269
  • I was thinking about using the Server version because it had no GUI, so I could install it from scratch; but I will probably take your advice and compare packages manually. The problem with backing up my stuff is, that I don't have enough hard drive space. But now that I think about it, I do have a fairly large bit of one of my hard drives unmapped, so I'll probably just create a new partition there. (It's on a different HDD and I don't plan to change the partitioning anyway...) – Xandaros Dec 18 '13 at 02:46