Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 03-20-2006, 09:06 AM   #1
LQ Newbie
Registered: Jul 2004
Location: Swamp east Missouri
Distribution: FC12/ubuntu/linux mint/Debian
Posts: 27

Rep: Reputation: 15
reinstall and save home directory

I am running Kanotix 2005-03 and have dorked up my system. I need to reinstall and want to preserve my home directory. I have tried this before and by creating a user by the same name, my home directory gets overwritten. I found a post that said by copying /etc/groups /etc/password and /etc/shadow to the new installation would prexerve /home.
I possibly could reinstall and not create a user at that time them copy /home to something of another name and then back. But I don't know, there must be another way that is more elegant or at least easier. Anyone point me in the right direction???
Old 03-20-2006, 09:41 AM   #2
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Is /home on a seperate partition? If it is then it won't be overwritten if you make sure that you don't format it during installation of a new distro. All you would need to do is create a user with the same details as your previous installation. If everything is on one partition then there is no way to preserve /home. You have to backup your data because you will lose it when the / partition is being formatted.
Old 03-20-2006, 11:06 AM   #3
Senior Member
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
I usually just back it up and put it somewhere safe. something like this:
cd /home/
tar -cvzf steve.tar.gz steve/
then just put the resulting file somewhere you know won't get overwriten like an iPod or cd. reinstall use your same username and:
cd /home
tar -xvzf steve.tar.gz
you shouldn't have to worry about /etc/passwd & /etc/shadow unless you have more than one user.

Last edited by johnson_steve; 03-20-2006 at 11:09 AM.
Old 03-20-2006, 12:01 PM   #4
LQ Newbie
Registered: Jul 2004
Location: Swamp east Missouri
Distribution: FC12/ubuntu/linux mint/Debian
Posts: 27

Original Poster
Rep: Reputation: 15
Yes, /home is on a separate partition. I like the tar idea. It sure seems to me that before, when I reinstalled, when I added user barney, that a new home partition was created and overwrote the original. I'll have to try again. The big problem this time is, the system is so corrupted that my cdrom,cd-rw and usb pen drive are not accessable. Perhaps I can run the Kanotix live CD and rescue my /home and my but....ha. I do have a 3 month old backup cd of home so it won't be too bad.....
I appreciate the help. Thanks
Old 03-22-2006, 08:50 AM   #5
LQ Newbie
Registered: Jul 2004
Location: Swamp east Missouri
Distribution: FC12/ubuntu/linux mint/Debian
Posts: 27

Original Poster
Rep: Reputation: 15
OK, I finally noticed that Kanotix doesn't use my separate home directory when it installs! It installs /home under /. Bummer. I did rescue all emails with the Kanotix live cd, so all is not lost. I never lost anything at all.
I was trying to go to straight Debian using the Debian Pure 0.1 disk and the 14 regular Debian disks. I didn't do very well with that. I am not very savvy with the command line and had lots of trouble getting kppp going. I got the pppd going in a terminal and ok that way. Also the printer wouldn't cooperate. Just my fault
not Debian. The big deal is, I want to be able to install various programs and the
14 disks looked promising.
I will take it to my test computer and keep trying.
Thanks again

Last edited by IraB; 03-22-2006 at 08:51 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM
Vim: ftp save no longer works after reinstall GreenPenInc Linux - Software 0 06-14-2005 02:59 PM
reinstall and keep /home ZaphyR Linux - Newbie 8 08-24-2004 08:16 AM
Will Reinstall delete /home? crayiii Mandriva 1 01-03-2004 11:58 AM
upgrade/reinstall and /home BrianNJ Linux - Distributions 2 11-25-2003 11:45 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration