LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 07-06-2005, 05:04 PM   #1
oily_rags
Member
 
Registered: Sep 2004
Posts: 128

Rep: Reputation: 15
hard drive failing, how can I create an image of my drive?


My hard drive is dying off and I want to make an image and transfer it to my other hard drive. I looked at norton ghost, but it only supports ext3, I have reiserfs. I also looked at partimage, some linux program that is similar to ghost, but it's in alpha quality and I can't even access there website, it's down. Can anyone recommend to me an easy to use tool for backing up my linux drive? I want to duplicate it as is on my other drive. thanks
 
Old 07-06-2005, 05:06 PM   #2
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
You can use the "dd" command:

dd if=/dev/hda1 (or whatever your partition is) of=target (the target can be another partition or a file you can use to restore the partition later.
 
Old 07-06-2005, 05:08 PM   #3
oily_rags
Member
 
Registered: Sep 2004
Posts: 128

Original Poster
Rep: Reputation: 15
wow that was a fast reply, under a minute since I clicked post hehe. Thanks juanbobo
 
Old 07-06-2005, 05:10 PM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
If you want to copy an image from one partition to another of identical size, you can do this:
Code:
dd if=/dev/hda1 of=/dev/hdb2
where hda1 is the partition to copy from and hdb2 is the partition to copy to. You can also create an image file:
Code:
cat /dev/hda1 | bzip2 > file.img
and the load it back:
Code:
cat file.img | bunzip2 > /dev/hdb1
Don't write to the wrong partition or you won't be able to recover. You should also unmount the partition before you copy it; this usually means using a rescue disk.

You can copy an image onto a partition that's too large, but you will then lose the extra space (unless you resize the reiserfs image). If you copy it to a partition that's too small, you'll probably break something.

There are tools out there to do this more efficiently, but this method is simple, needs no extra tools, and it does work.
 
Old 07-06-2005, 05:14 PM   #5
oily_rags
Member
 
Registered: Sep 2004
Posts: 128

Original Poster
Rep: Reputation: 15
I'm copying the linux partition to a hard drive that is much larger, will this method still work rjlee?
 
Old 07-06-2005, 06:39 PM   #6
ithawtewrong
Member
 
Registered: Jul 2004
Location: Mile High
Posts: 161

Rep: Reputation: 30
If the drive has errors on it I think ddrescue may be a better tool. You may need to download and compile though. I've never actually used it, but I think the command line switches are very similar if not the same.

$.02
 
Old 07-07-2005, 02:19 PM   #7
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
Quote:
Originally posted by oily_rags
I'm copying the linux partition to a hard drive that is much larger, will this method still work rjlee?
I would advise creating a partition of the exact same size (in bytes) on the larger hard drive. You can then partition and format the remaining and use it as a new drive, or resize the ReiserFS partition using various tools e.g. gnuparted.
 
  


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
How to create image of NTFS drive? zaoka Linux - Software 1 09-01-2005 05:28 PM
Is my hard drive failing? HGeneAnthony General 1 11-23-2004 01:37 AM
Image a hard drive burton Linux - Software 2 04-08-2004 11:15 PM
Failing hard drive--need to copy Phathead Linux - Hardware 2 03-10-2004 12:59 PM
Hard drive image bkmesenbrink Linux - Newbie 7 06-21-2003 10:45 AM


All times are GMT -5. The time now is 07:29 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