Re: Using dd to clone smaller drive to larger drive
- From: Andreas Rippl <a.rippl@xxxxxxx>
- Date: Thu, 8 Dec 2005 22:23:03 +0100
On Tue, Dec 06, 2005 at 08:27:47PM -0800, 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
>
> and will that just work?
Hi Brian,
I generally think that your approach is fine, especially because you
mention bad sectors. With dd you get everything from the failing disk
and you can worry about recovering files later. I would however suggest
the following modification:
make partition on /dev/hdb; mount it
dd if=/dev/hda1 of=/mnt/hdb1/backup_dd_hda1.img
dd if=/dev/hda2 of=/mnt/hdb1/backup_dd_hda2.img
dd if=/dev/hda3 of=/mnt/hdb1/backup_dd_hda3.img
You can then mount your partition images with
mount -o loop /mnt/hdb1/backup_dd_hda1.img /mnt/loop1
mount -o loop /mnt/hdb1/backup_dd_hda2.img /mnt/loop2
mount -o loop /mnt/hdb1/backup_dd_hda3.img /mnt/loop3
and work on them/fix them/copy them as you like.
Hth
Andreas
>
> Should I first set up the new drive with identical partitions to the old
> drive?
>
> If so, what can I do with the extra space?
>
> What will happen if dd encounters a bad block?
>
> Thanks,
> Brian
>
>
--
Andreas Rippl -- GPG messages preferred
Key-ID: 0x81073379
Attachment:signature.asc
Description: Digital signature
- References:
- Using dd to clone smaller drive to larger drive
- From: Brian C
- Using dd to clone smaller drive to larger drive
- Prev by Date: Re: How to make a raid 1 on a webserver on woody remotely
- Next by Date: Re: So what's the difference ...
- Previous by thread: Re: Using dd to clone smaller drive to larger drive
- Next by thread: New messages in thunderbird
- Index(es):
Relevant Pages
|
|