How can I force Ubuntu 9.10 to reinstall itself without losing my information?
The title says it all... I'm having lots of issues after upgrading 9.04 to 9.10 - I want to reinstall without losing my files and I gave away my Ubuntu Disc and I can't make another one right now...
How can I force Ubuntu 9.10 to reinstall itself (without losing my information)?
EDIT:
The issues are: unresponsive mouse: [fixed by modding xorg.conf] and weird graphics issues which don't seem to be hardware or software, I can't tell. (specifically, bouncing lines on top of my screen and a loading bar on the shutdown screen - my friend says he has 9.10 and that the bar shouldn't be there.)
EDIT:
I ran sudo dpkg-reconfigure -phigh -a
and it didn't work. The following is my terminal's output. Any ideas would be welcome.
moshe@moshe-laptop:~$ sudo sh
[sudo] password for moshe:
# sudo dpkg-reconfigure -phigh -a
* Disabling power management... [ OK ]
update-rc.d: warning: /etc/init.d/acpi-support missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
* Checking battery state... [ OK ]
acpid stop/waiting
acpid start/running, process 3544
* Stopping web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting [ OK ]
* Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
Caching application data...
Generating mime/codec maps...
Caching application data...
Generating mime/codec maps...
* Starting AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox-3.5
[ OK ]
* Reloading AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox-3.5
[ OK ]
dpkg-trigger: dpkg-trigger must be called from a maintainer script (or with a --by-package option)
To reinstall without losing your info ...
- Make a backup of the info you want to keep.
- Test the backup.
- Reinstall. Make sure the root partition gets reformatted, because you want to get rid of the old Ubuntu 9.04 stuff completely.
- Restore the backup.
You could attempt to perform the installation and try forcing the installer not to format the root partition, and that would keep the files you're probably interested in keeping. But it would leave files around from the previous install, it might lead to problems during the installation, and it might create problems later.
I don't know what you're considering "your information", but I'm assuming your user's HOME directory (or the entirety of /home
) is the main candidate. If you have a website or database installed you'll also want to back those up (usually these are under /var
).
And you probably want to make a backup of /etc
as well, but don't automatically restore that one.
To reinstall without an install disc ...
Ubuntu provides many installation options; installing from the CD is only one of them. See the Installation page at the Community Ubuntu Documentation.
In particular, here is the section on Installation without a CD:
The documents listed below provide instructions for installing Ubuntu without using a CD or CD-ROM drive.
- SmartBootManager - Installing from a PC which will not boot from a CD.
- Installation/FromUSBStick - Installing from a USB memory stick.
- Installation/FromCForUSBStick - Similar to above but using grub.
- Installation/WithFloppies - Installing without a CD drive over a network.
- Installation/FromHardDriveWithFloppies - Installing without a CD drive or network capabilities from a hard drive.
- Installation/FromWindows - Installing from Windows without using floppies, a CD, or any other removable media.
- Installation/FromLinux - Installing using a spare partition from an existing Linux system to house the Ubuntu CD image.
- Installation/FromVM - Installing using a physical disk to a Virtual Machine.
- See also the network installation options below
As you can see, there are lots of options. I think the best option might be to use a USB stick (Installation/FromUSBStick), if that's an option for you. If you still have the LiveCD ISO, or can download it again, and you have a spare USB stick you can use, this is a good option.
Installing from within a running Linux (Installation/FromLinux) might be an option for you, but it can be complicated -- in particular the debootstrap
option (bottom of the page) is very powerful, but the process is not for the faint of heart.
Finally, one of the network installation options might work.
Agree with Quack's posting. One trick:
dpkg --get-selections > myselections
That stores all your installed packages in a file named "myselections".
After you install the new version:
dpkg --set-selections < myselections
aptitude install
should reinstall all the packages you had before.
Also, save the contents of /etc/ somewhere, that contains all your configuration info.
First you have to explain what the "issues" are. Are they system wide or local to your user account?
The first thing you could do is add a new user. Login with that user and see if the issues go away. If they do, the easiest thing to do would be to just move your documents/media to the new user account.
If the problems don't go away, then that is easy to fix as well.
What I would do is purge all non-standard software to get down to a bare bones install. this means removing all of X, gnome, etc.
#this will list all non crucial packages
aptitude search '~i (~poptional|~pextra)'
#this should remove them all.
aptitude purge '~i (~poptional|~pextra)'
aptitude might flip out about removing that many packages at once so it might be easy to do them in chunks..
aptitude search '~i (~poptional|~pextra)' -F %p|xargs -n 20 echo aptitude purge > /tmp/cleanup.sh
sh /tmp/cleanup.sh
once everything is removed, do a
aptitude reinstall '~pstandard'
aptitude install ubuntu-desktop
that should get you a almost-like-new system.
Most of that is probably irrelevant though, since adding a new user account with fresh settings will probably fix any issues you are having.