LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Rescue Mode Help (https://www.linuxquestions.org/questions/linux-general-1/rescue-mode-help-95994/)

dsiguy 09-23-2003 02:26 PM

Rescue Mode Help
 
OK I think I had some file system trouble and now I am in rescue mode (RH8) the file system was found and then placed at /mnt/sysimage. Would it be possible for me to take a new hard drive and install it and then copy the files i need to the new hard drive.

Will this work?

Any other suggestions would be appreciated.

Thanks

david_ross 09-23-2003 03:15 PM

Yes you could copy the files - you may also be able to mirror the drives using:
dd if=/dev/hda of=/dev/hdb

That mirrors hda to hdb. You may need to adjust the device names.

dsiguy 09-23-2003 03:19 PM

so if I shut down and install a new hard drive will I have to configure that at all. or will it just work?

Thanks

david_ross 09-23-2003 03:37 PM

You wouldn;t need to configure the drive - just pop it in and boot with the rescue cd. Ensure that you are refferencing hte devices correctly then run that dd command.

dsiguy 09-24-2003 12:38 PM

I Hate to be a pain, but can you guys help me with one more step.

I have hooked up the new drive and am not sure what to do next.

I know all the files I want to copy actually it is 1 main directory and about 5 subdirectories worth of files.

I am not sure what the hard drive names are and basically do not know how to copy the info from the old hard drive to the new hard drive.

Can you help?

Thanks

david_ross 09-24-2003 01:24 PM

If you use "fdisk -l" it will show you the drive names. If you use dd you will not need to copy individual files since it will mirror the entire drive.

dsiguy 09-24-2003 02:45 PM

OK thanks for that

i did the fdisk and found that hda shows as

/dev/hda1 (Linux)
/dev/hda2 (Linux)
/dev/hda3 (SWAP)

now hdb does not show the headers for the table but does not list any details (Which I take to mean that the harddrive has not been formated and partitioned)

and hdc says unable to open (Which I take to mean there is no device or 3rd hard drive.)

I guess I am now ready to opartition and format. or mirror

To mirror do I just type dd

or

do i type dd if=/dev/hda of=/dev/hdb

I think i am supposed to do dd if=/dev/hda of=/dev/hdb but just want to check.

dsiguy 09-24-2003 02:47 PM

OK I went ahead and typed dd if=/dev/hda of=/dev/hdb and now the computer just seems to sit there I am sure that this will take a while but I could be wrong. does this seem right

david_ross 09-24-2003 02:57 PM

You did it right - if stands for "in file" and of stands for "out file" so it will read from hda and output to hdb. It will take quite a while and the time wil vary depending on the speed of your computer and the drives used.

dsiguy 09-24-2003 03:52 PM

OK thanks.

I will let the computer sit, it has sit for about 1.5 hours.

Should I be concerned maybe after 5 hours.

Thanks again.

(I do not hear the hard drives doing anything.)


All times are GMT -5. The time now is 04:19 PM.