On Tue, 6 Dec 2005, Brian C wrote:
Hi,
/dev/hda is the Debian Sarge system, w/ 3 partitions.
/dev/hdb is a new slightly larger drive w/ no partitions.
/dev/hda may have a bad block or two, and so the plan is to clone it to the
new drive, remove the old drive, move new drive to /dev/hda (primary master)
and then run from the new drive.
Can I just type (as root):
dd if=/dev/hda of=/dev/hdb
Yes
and will that just work?
No
Should I first set up the new drive with identical partitions to the old
drive?
That would be a waste of time - your proposed dd command will wipe them
out.
As suggested elsewhere, dd is not a good tool for this job. One among many
reasons is that the different drive geometry may make the whole exercise
fail. tar is a much better choice.
1.) partition the new drive as you want it
2.) for each partition of the new drive, mount the partition in /mnt/tmp
or something like that, then
cd /old-partition-mount ; tar cf - . | (cd /mnt/tmp ; tar xf -)
where /old-partition-mount is the point where the partition you're trying
to copy from is mounted; then
umount /mnt/tmp
and repeat for each partition.
----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin (at) unc.edu - http://www.unc.edu/~aperrin
Assistant Professor of Sociology; Book Review Editor, _Social Forces_
University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]