Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Sep 2002 17:39:51 -0500
From:      "Jack L. Stone" <jackstone@sage-one.net>
To:        Rob Ellis <rob@web.ca>, freebsd-questions@FreeBSD.ORG
Subject:   Re: how to use 'dd' to create image of a hard drive?
Message-ID:  <3.0.5.32.20020930173951.028ece30@mail.sage-one.net>
In-Reply-To: <20020930211626.GS28962@web.ca>
References:  <3.0.5.32.20020930155536.028ece30@mail.sage-one.net> <Pine.GSO.4.33.0209181612280.9213-100000@themis.cs.uh.edu> <3.0.5.32.20020930155536.028ece30@mail.sage-one.net>

next in thread | previous in thread | raw e-mail | index | archive | help
At 05:16 PM 9.30.2002 -0400, Rob Ellis wrote:
>On Mon, Sep 30, 2002 at 03:55:36PM -0500, Jack L. Stone wrote:
>> At 03:50 PM 9.30.2002 -0500, Pranav A. Desai wrote:
>> >
>> >Hi all!
>> >
>> >	Can I use something like
>> >
>> >dd if=/dev/ad0 of=/dev/ad1
>> >
>> >to copy every thing from first drive to the second and be able to boot
>> >from the second drive? Do I need to specify block size ? The second drive
>> >doesnt have anything on it (filesystem or slices).
>> >
>> >Thanks
>> >
>> >-Pranav
>> >
>> 
>> You would use this for IDE HDs:
>> # dd if=/dev/ad0 of=/dev/ad1 bs=8192 #Change the "bs" switch to something
>> that works best for you.
>> 
>> Of importance is that ad1 be equal to or larger than ad0. If larger, then
>> that larger portion will be unusable.
>> 
>
>To make the new disk bootable you want to copy the disklabel 
>and bootstrap code -- but then you probably also want to do that 
>on a slice rather than the disk device (e.g., "ad0s1" rather than "ad0") --
>check your setup.
>
>So you might do something like this:
>
>  # example only, don't cut & paste
>  dd if=/dev/ad0s1 of=/dev/ad1s1 bs=128k # for ata
>  disklabel /dev/ad0s1 > disklabel.ad0s1
>  disklabel -R -B /dev/ad1s1 disklabel.ad0s1
>
>- Rob
>

NO! An entire image is taken of the ad0 and no labeling is necessary. It is
bootable already.

Best regards,
Jack L. Stone,
Administrator

SageOne Net
http://www.sage-one.net
jackstone@sage-one.net

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.20020930173951.028ece30>