Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have done something stupid and messed up my Debian Squeeze installation. Now, the problem is I have enough data and sowftware installations which I dont want to repeat, is it possible to reinstall the OS and still somehow save and maintain data on my box?
I have still not tinkered with the installation, I am just frustrated with issues and lack of time. I guess this weekend I will spam SO with all my troubles and hope I will not be treated as a spammer :D

share|improve this question
    
Where in the filesystem did you do your changes? –  Tshepang Apr 12 '11 at 6:59
    
most of the stuff is in home dir, so one thing that comes to my mind is to backup home dir, but I have installed and configured stuff like Apache so thats the trouble part :( –  Kumar Apr 12 '11 at 7:54
2  
If you told us what you actually messed up (or maybe I missed what you messed), maybe... well, I've yet to reinstall Debian just because I "messed up" (and I did make my share of mistakes). –  Jürgen A. Erhard Apr 12 '11 at 20:16
1  
@jae: I was about to say the same thing! :-) Actually, I was about to suggest to the poster that he try to fix his system rather than reinstalling. He'd learn so much more that way... If I reinstalled every time I broke my system, I'd spend even more time on sysadmin than I do now. :-) –  Faheem Mitha Apr 12 '11 at 20:33
    
@kumar, I would try reinstalling all the packages... but idk the easyness of that... and maybe it's a config gone bad. –  xenoterracide Apr 13 '11 at 0:08

3 Answers 3

up vote 2 down vote accepted

If you don't mind acting like a cowboy (and I have never tried this):

  • Back up your /etc and /home directories (and next time, put your homedir in a separate partition). Do the same with anything else you changed outside those two directories.
  • Do a fresh install.
  • Restore your backups. The system-wide config dir, /etc, should be overwritten by this action. As for home, there's no risk at all restoring, assuming you are going to be logging in as the same username (and assuming that this was the first user you created during both installations).
share|improve this answer
    
my home dir is already on different partition, any tip :( –  Kumar Apr 12 '11 at 11:04
    
That makes things easier then, meaning no need to back it up. Just install to the current root partition. Ensure that you select the Advanced option during the partitioning stage, and choose your /home to point to where your homedir is, and make sure you leave it marked K (i.e. keep the data). I never lost data doing this on Debian through dozens of installations, but YMMV, so you might wanna back your home regardless :) –  Tshepang Apr 12 '11 at 11:11
    
Sounds good! I will back up my data before I do this. –  Kumar Apr 12 '11 at 11:48
    
You mind responding to Shadur's alternative answer? –  Tshepang Apr 12 '11 at 12:47
    
done, udev seems to be in place –  Kumar Apr 12 '11 at 13:33

The other alternative if you previously used the Debconf package configuration questions to configure things would be to get the preseed information and use that to do your fresh install. You would retain your previously configured answers. You would likely still want to backup anything in /etc that may have been modified locally after debconf configuration. If you have /home as a separate partition you can just tell the installer not to re-format that partition and simply mount it as is as /home and your information will be retained as well.

share|improve this answer
    
interesting, am reading this –  Kumar Apr 12 '11 at 13:33

Before you jump on a reinstall, please check if you're using the unstable tree and recently updated udev. See this bug report for details, but essentially a major bug in udev managed to sneak by the maintainer that rendered most peripherals unusable; updating udev again should fix it.

share|improve this answer
    
its not only Udev thats troubling me, Java has gone mad as well. :( –  Kumar Apr 12 '11 at 13:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.