Ubuntu - Doing Updates
From Blue-IT.org Wiki
Contents
The Problems
A system upgrade via update manager is not working or not intended. Several ppa archives are installed. A complete new installation is needed.
In any case
- Backup or keep your home directory!!!
- Be sure which ppa's you did install and if they are avaiable for your new distribution
The best is to keep your home data on a seperate partition.
In case you need a new install, this is very easy. Mount an external backup drive or insert a dvd. Save the following files onto that media.
1. Save Package informations
sudo dpkg --get-selections > ~/Desktop/myselections
Save this file to your backup media!
2. Save home
Logout !!!
Switch to a terminal screen via Strg+Alt+F1 and login with your normal username!
Then enter the following commands:
cd /home tar cjvf ~/Desktop/${USER}.tar.bz ${USER}
This creates a file called "yourUserName.tar.bz" on your Desktop.
Switch back to the graphical login screen with Strg+Alt+F7 (sometimes F8) and login. Now burn your backup file from your desktop to a CD/DVD and/or - dependent to the size - to a backup drive. Be careful!!! Better save your data twice. A CD or DVD could be defective. The securest way is a backup onto an external hard drive.
HINT: If you are using evolution email, it is a good idea to backup your data with the evolution backup procedure which also generates a backup file!
3. Install your new ubuntu
You can savely install your new ubuntu using and erasing (!) the whole partition.
4. Recover home
After you installed your new ubuntu (you can savely use the whole partition) do the same as above.
Copy back your backupfiles
Login to your new ubuntu with the same (!) username you used before.
Copy the backup of your home directory (yourUsername.tar.bz) and the paket selections (myselections) to your desktop.
Reselect archives
Be sure you reenabled all your ppa archives and all package sources you previously had.
Replay the backup
Switch to a terminal screen via Strg+Alt+F1 and login with your normal username!
Then enter the following commands:
cd /home tar xjvf ~/Desktop/${USER}.tar.bz sudo dpkg --set-selections < /Desktop/myselections sudo apt-get dselect-upgrade
This could take a lot of time depending to your sources.
Troubleshooting
Sometimes your multimedia might not work.
Deletion of the following folders / files might (!) help.
cd ~ rm -rf .pulse