0

I need to reinstall Ubuntu, but it doesn't have anything to do with wanting to clean my system or 'start fresh.' I have my stuff pretty fine tuned, so I want to redo as little as possible.

  • 1
    The idea of reinstalling is to clear any setting or programs that may have set your system awry. Why are you reinstalling? – Richard Aug 19 '13 at 02:46
  • @searchfgold6789 Honestly, because I want to dual boot windows, and the entire thing seems set up so that you can easily install ubuntu as a dual boot if windows is already installed. The other way seems possible but every piece of advice I've read (including here) is in incomprehensible linux-speak that nobody will explain to me, so I can't decipher how to do it at all. So the best way at my level of experience seems to be redoing everything with Windows first, so that everything will be automated. – TPaveLabel Sep 01 '13 at 21:06
  • I can post simpler (picture based) instructions on how to achieve your goal of installing Windows alongside Ubuntu without erasing any settings. You'll just have to edit your question to reflect this. Otherwise, I would recommend following parts 2 and 3 from @TerryWang's instructions. – Richard Sep 02 '13 at 01:19
  • See https://help.ubuntu.com/community/UbuntuReinstallation - You can reinstall Ubuntu and still keep a few settings. – Richard Sep 02 '13 at 01:22
  • @searchfgold6789 Okay. I'll edit my question to reflect that. That would be very helpful. – TPaveLabel Sep 02 '13 at 17:53

1 Answers1

2

In brief

  1. Backup you $HOME or whatever partition, logical volumes that contains your personal data
  2. Get a list of the installed packages dpkg --get-selections > pkg.list keep the file
  3. When restoring the packages sudo dpkg --set-selections < /path/to/pkg.list and sudo apt-get dselect-upgrade
  4. Backup your /etc if you can't remember what changes you have made for tuning

You can use tar or rsync over SSH to a remote host. I personally recommend booting using a USB/DVD Live (e.g. Ubuntu Desktop or System Rescue CD) and do the backup just to avoid file lock issues, always safer;-)

Terry Wang
  • 9,775
  • The only small downside here is that all the packages will ends as manually installed, so they will not autoremove when needed. This is especially bad for the various kernel version; you can get stuck to a particular kernel for the future. But I don't think there is a perfect answer... – Rmano Oct 02 '14 at 09:51
  • Note that in step 3, dpkg may give you lots of warnings about the packages not being in the database. These are safe to ignore, as the actual installation happens in the next command with APT, which uses a different database. – user149408 Jan 29 '16 at 10:53