LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 09-23-2003, 03:26 PM   #1
dsiguy
Member
 
Registered: Nov 2002
Posts: 70

Rep: Reputation: 15
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
 
Old 09-23-2003, 04:15 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
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.
 
Old 09-23-2003, 04:19 PM   #3
dsiguy
Member
 
Registered: Nov 2002
Posts: 70

Original Poster
Rep: Reputation: 15
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
 
Old 09-23-2003, 04:37 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
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.
 
Old 09-24-2003, 01:38 PM   #5
dsiguy
Member
 
Registered: Nov 2002
Posts: 70

Original Poster
Rep: Reputation: 15
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
 
Old 09-24-2003, 02:24 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
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.
 
Old 09-24-2003, 03:45 PM   #7
dsiguy
Member
 
Registered: Nov 2002
Posts: 70

Original Poster
Rep: Reputation: 15
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.
 
Old 09-24-2003, 03:47 PM   #8
dsiguy
Member
 
Registered: Nov 2002
Posts: 70

Original Poster
Rep: Reputation: 15
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
 
Old 09-24-2003, 03:57 PM   #9
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
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.
 
Old 09-24-2003, 04:52 PM   #10
dsiguy
Member
 
Registered: Nov 2002
Posts: 70

Original Poster
Rep: Reputation: 15
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.)
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rescue mode question kscott121 DamnSmallLinux 0 09-08-2005 06:42 PM
Debian rescue mode adityavpratap Debian 1 06-24-2005 05:00 AM
rescue mode hansi umayangan Linux - General 1 03-17-2005 12:43 AM
How could I go into Rescue Mode??? unixfreak Linux - Newbie 20 08-24-2004 10:19 PM
about rescue mode morrisset Linux - Newbie 3 07-10-2004 12:11 PM


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

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