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.

Is it possible to reinstall Fedora (I have the DVD that I used to install it yesterday), and keep the files in my home directory?

I seem to have messed up my system while trying to get my monitor resolution to work correctly: Installed Fedora in dual boot Windows desktop. Now I can't get full monitor resolution.

The step that caused my problem was yum --enablerepo=rawhide upgrade kernel xorg-x11-drv-ati xorg-x11-drv-ati-firmware, so I'm looking to either figure out how to get fedora to boot, or just reinstall fedora, but keep the files I've set up so far.

share|improve this question
1  
What I do is separate /home dir from the rest of the system via partitioning. That way, I can mess around with my installation as much as I want, knowing if something goes wrong, it's a simple matter of a reinstall. –  Tshepang Mar 8 '11 at 23:15
1  
Why not just copy the files somewhere and reinstall? Is it too much work? –  Tshepang Mar 8 '11 at 23:16
    
Debian actually allows installation over an existing OS (i.e. doesn't format the drive). It's not recommended, and I've never tried it. I can't check now if Fedora does. –  Tshepang Mar 9 '11 at 5:22
add comment

1 Answer

up vote 2 down vote accepted

Yeah sorry about that. :)

It is possible, but is only easy if you made /home be a separate partition. Despite my best efforts, this isn't the default.

You don't have a lot of files yet, though, do you? I think the best bet is to boot into single user mode and copy the contents to a USB memory stick. That should be easy.

You'll need to mount it manually -- plug it in, wait a few seconds, and then type dmesg and note the device that it says was inserted. Then, mount that with:

mount /dev/sdc /mnt

replacing sdc with whatever dmesg said. (You may need sdc1, depending on how the device was formated).

Then, change to the root directory (cd /) and run

tar cJvf /mnt/mattdm-is-sorry.tar.xz /home

and when that completes, run

sync; sleep 3; umount /mnt

(The sleep is for superstition.)

The reason for tar rather than just copying is to preserve the Unix metadata, because the USB drive will be FAT formatted, and we don't want to mess with that right now.

Then, once you have your system repaired (I still recommend the F15 alpha!), you can extract it with tar xf /mnt/mattdm-is-sorry.tar.xz. If you do that in / as root, it'll overwrite everything in your new /home, so probably the best thing to do is boot the new system into single user mode and do that first thing.


Oh, and this time, while you're installing, make /home its own partition. :)

share|improve this answer
    
ok, trying to do this now. I just scp'ed to my laptop. I tried installing 15, but it threw an error during installation and failed, so I'm going with 14. How do I make sure /home/ is on it's own partition? –  jonderry Mar 9 '11 at 0:58
    
@jonderry — can you report the Fedora 15 install error at bugzilla.redhat.com so we can get it fixed? –  mattdm Mar 9 '11 at 1:11
    
@jonderry — to put /home on its own partition, follow instructions here: docs.fedoraproject.org/en-US/Fedora/14/html/Installation_Guide/…, and if that's not clear, ask a new question. :) –  mattdm Mar 9 '11 at 1:11
    
I reported it a little while ago. –  jonderry Mar 9 '11 at 1:14
    
Added the following question: unix.stackexchange.com/questions/8887/… –  jonderry Mar 9 '11 at 1:37
add comment

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.