From owner-freebsd-questions Mon Sep 30 15:40:10 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FD2A37B401 for ; Mon, 30 Sep 2002 15:40:09 -0700 (PDT) Received: from sage-one.net (adsl-65-71-135-137.dsl.crchtx.swbell.net [65.71.135.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85A5143E6A for ; Mon, 30 Sep 2002 15:40:04 -0700 (PDT) (envelope-from jackstone@sage-one.net) Received: from sagea (sagea [192.168.0.3]) by sage-one.net (8.11.6/8.11.6) with SMTP id g8UMdrN94345; Mon, 30 Sep 2002 17:39:53 -0500 (CDT) (envelope-from jackstone@sage-one.net) Message-Id: <3.0.5.32.20020930173951.028ece30@mail.sage-one.net> X-Sender: jackstone@mail.sage-one.net X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Mon, 30 Sep 2002 17:39:51 -0500 To: Rob Ellis , freebsd-questions@FreeBSD.ORG From: "Jack L. Stone" Subject: Re: how to use 'dd' to create image of a hard drive? In-Reply-To: <20020930211626.GS28962@web.ca> References: <3.0.5.32.20020930155536.028ece30@mail.sage-one.net> <3.0.5.32.20020930155536.028ece30@mail.sage-one.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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