LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   RH recovery -- keeping /home from previous drive (https://www.linuxquestions.org/questions/linux-general-1/rh-recovery-keeping-home-from-previous-drive-42045/)

bock 01-19-2003 02:44 PM

RH recovery -- keeping /home from previous drive
 
Hello --- my system recently got hosed, and I was wondering if there was a way to re-install RH (either 8.0 or 7.3) from scratch, and specifying a second hard drive (which is intact), hdb, to use as the /home ? That way all my data and such could be restored from my previous drive.

Its something like:

hda ->
/etc
/var
/log
/usr
.
.
.

hdb ->
/home

Should I still recreate all the users once the new OS is installed since the /etc/passwd files and such need to be updated?

Should I use a different hdb (since it will get formatted during the install) and then later swap them? What other then the fstab files need to be updated if this is done?

The dilemma for me is that hdb is ~80 gigs and has ~50 gigs of data on it, so it is a bit much to transfer and backup :(

So, is my question clear? If so, any ideas? I am just not very confident that RH will not wipe out the hdb if I go through the install GUI.

-bock

td3201 01-19-2003 02:54 PM

If you read exactly what you are doing and pay attention to the partitioning section, you should be fine.

How hosed is it? Have you tried fixing the problem first?

If so, you can easy install RH on a second hard drive, just create your partitions there, install LILO to the MBR, point it to the correct partition, and boot to that hard drive from the BIOS....

THen once you are up and running on that hard drive, simply mount the other partitions, from the hosed drive, and copy the data and do whatever.

Make sense?

oot 01-19-2003 04:42 PM

I would suggest reinstalling without a seperate home partition, then once the reinstall is done, adding your users (it will change its own home directory in the main partition), then delete the home directory in the main partition and edit fstab to mount hdb as home again.

rnturn 01-20-2003 10:21 PM

Re: RH recovery -- keeping /home from previous drive
 
Quote:

Originally posted by bock


I am just not very confident that RH will not wipe out the hdb if I go through the install GUI.


I have had good luck installing RH onto disks with existing data by using the ``Custom'' installation though, as I recall, it's not as automatic as the normal workstation or server installs. But... you have the option of accepting an existing partition layout before the installation proceeds. If you know the partition where /home was located, just don't assign a mount point to it when fdisk or Disk Druid runs. You can add it later.

If /home was part of your original root partition, you could swap original disk for another (you mentioned a second drive, no? Or did I not follow your explanation as well as I thought... ). I.e., make the original hda into hdb (or hdc, hdd, etc.). If you're swapping drives around, be sure to label them so you don't forget which one's which. Then install onto an empty hda. Mount the appropriate partitions on hdb (or whatever the original hda is now called) and copy the old /home files back.

BTW, you might want to consider having separate partitions/filesystems for /home and /usr/local (where a lot of your custom stuff normally gets installed). Makes future upgrades or, $DIETY forbid, reinstallations a snap.

Finally... Reinstallation is a pretty drastic step. Do you know why the system is unusable? Have you tried booting from your CD in rescue mode to repair the problem?


All times are GMT -5. The time now is 08:22 PM.