Re: How do I save a disk image of my laptop hard drive?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Mark Phillips
Date:  
To: plug-discuss
CC: George Toft
Subject: Re: How do I save a disk image of my laptop hard drive?
I found this article helpful, as it explained what was going on -
http://www.inference.phy.cam.ac.uk/saw27/notes/backup-hard-disk-partitions.html.

The command I used was:

dd if=/dev/hda1 bs=1k conv=sync,noerror | gzip -c | ssh -c blowfish
user@hostname "dd of=filename.gz bs=1k"

The problem I was having was that I did not hand off the data stream to dd on
the target machine. At least that is what I gleaned from reading the article.
The rest of the additional commands are just window dressing to compress the
file.

Oh, a few notes from the article that I found helpful -

"conv=sync,noerror tells dd that if it can't read a block due to a read error,
then it should at least write something to its output of the correct length.
Even if your hard disk exhibits no errors, remember that dd will read every
single block, including any blocks which the OS avoids using because it has
marked them as bad."

In my case, I need to configure this hard drive for XP for a short term
project, and then put everything back as before, so the bad blocks should not
matter since I will write it back to the same hard drive. Is this assumption
correct?

"bs=1k sets the block size to be 1k. I'm not quite sure what the optimal value
is, but it needs to be no larger the the block size for the disk, otherwise a
bad block may mask the contents of a good one. 1k is a safe bet."

Again, this should not matter in my case as I will write it all back to the
same drive later.

The article mentions "dd_rescue" and ddrescue as alternatives to plain dd for
handling bad blocks. Neither seems to be on the knoppix cd, so I am not using
them.

Any comments from the PLUG gurus on this approach? Meanwhile, lots of data is
running across my network......

Thanks again George, (and everyone who chimed in!) for pointing me in the
right direction. It took some googling to find this article. I think there
are too many "backup knoppix dd" articles, so it is hard to find the right
one on the 'net. "The Google" is great, as well! ;-)

Mark

On Friday 06 April 2007 08:18, Mark Phillips wrote:
> On Thursday 05 April 2007 15:51, George Toft wrote:
> > Method 1:
> > 1.  Boot a knoppix cd
> > 2.  Open a root terminal window and issue this command:
> > dd if=/dev/hda | ssh user@someremotehost "> /path/to/file/backup.img"
>
> The file backup.img is created on someremotehost, but it has zero length.
> The drive hda does not spin up on the laptop when I issue this command.
>
> dd if=/dev/hda | ssh mark@192.168.25.125 ">/home/mark/backup.img"
>
> I get the message after I enter my password - "Warning: no xauth data;
> using fake authentication data for X11 forwarding."
>
> However, if I do cfdisk /dev/hda from the same knoppix terminal window, the
> drive hda does spin up and cfdisk reports the correct partitions.
>
> What am I missing to get the drive copied?
>
> Thanks!
>
> Mark
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


--
Mark Phillips

602 524-0376 cell
480 945-9197 fax
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss