LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 08-30-2004, 08:27 PM   #1
DogWalker
LQ Newbie
 
Registered: Apr 2004
Distribution: SuSE 9 Professional
Posts: 3

Rep: Reputation: 0
How to copy ext2fs from failed hard drive to good drive?


I have a Maxtor DiamondPlus 9 80GB hard drive that has failed. The partion table is corrupt and cannot be written. I can read the drive, however, and have successfully transferred all MS-Windows partitions to a new drive. Using R-Linux, I can recover individual files it finds and can, probably, capture the entire ext2fs partition to a MS-Windows partition on the new drive. What I would like to do is copy the ext2fs partition on the failed drive to an ext2fs partition on the new drive. What tool can I use to make the copy? When copied successfully, I hope to boot the copied partition and use fsck to fix the damaged inodes. Thanks for any help.
 
Old 08-30-2004, 09:37 PM   #2
littleking
Member
 
Registered: Jun 2003
Location: New Albany, OH
Posts: 190

Rep: Reputation: 30
just install the drive in your system, mount the drive then copy the files
 
Old 08-30-2004, 10:52 PM   #3
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Not sure I completely understand the situation. You can 'capture/restore' partitions in linux using the 'dd' command (e.g. dd -if=/dev/hda1 -of=somebigfile). There are options for setting block size and block count which are probably signficant in this case. There is even a command to resize a restored partition to fill the new partition (Sorry - I don't have this on the PC I'm using -- resizextfs or something???).

If you have already captured the partition with a low-level copy to <somebigfile> you may be able to mount it directly using the loopback device (if this is enabled in your kernel) with something like

mount -o loop <somebigfile> /mnt

But maybe you will want to make a copy before doing fsck or whatever. Sorry if I misunderstood the problem.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy hard drive to hard drive linuxnew Linux - Hardware 13 11-28-2005 08:04 PM
Easiest way to copy a boot drive to a new hard drive lsgko Linux - Software 3 05-24-2005 09:38 PM
Copy a Hard Drive rjneeley Linux - Software 3 06-11-2004 07:58 AM
STUCK--Trying to copy old Hard Drive to new Hard Drive. Please Help tsw Linux - Newbie 8 05-26-2004 02:47 AM
Failing hard drive--need to copy Phathead Linux - Hardware 2 03-10-2004 12:59 PM


All times are GMT -5. The time now is 07:31 PM.

Main Menu
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