From owner-freebsd-questions@FreeBSD.ORG Wed Dec 15 19:20:07 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15C88106567A for ; Wed, 15 Dec 2010 19:20:07 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id BCEB78FC0A for ; Wed, 15 Dec 2010 19:20:06 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.4/8.14.4) with ESMTP id oBFJK530098506; Wed, 15 Dec 2010 12:20:05 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.4/8.14.4/Submit) with ESMTP id oBFJK5K3098503; Wed, 15 Dec 2010 12:20:05 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Wed, 15 Dec 2010 12:20:05 -0700 (MST) From: Warren Block To: bsd In-Reply-To: <58F35D2B-19D0-4FE0-A4DA-03FDA8128BD2@todoo.biz> Message-ID: References: <201012150800.oBF80FRf015357@mail.r-bonomi.com> <58F35D2B-19D0-4FE0-A4DA-03FDA8128BD2@todoo.biz> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (wonkity.com [127.0.0.1]); Wed, 15 Dec 2010 12:20:05 -0700 (MST) Cc: freebsd-questions@freebsd.org, Robert Bonomi Subject: Re: Creating clone of a HDD including boot partition X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 19:20:07 -0000 On Wed, 15 Dec 2010, bsd wrote: > Is there a way to dd to a file to create an iso image and then restore (still using dd from this image). > I only have one IDE <--> USB cable so this is the reason why It'd more simple for me to create an iso image of the disk and then restore. Use dd's of= parameter to send output to a file. If it really has to be an ISO, pipe it to mkisofs. Using dd like that makes big files with lots of wasted space. The article I posted earlier shows how to save some of that by filling the disk's empty space with zeros. Then gzip can do some useful compression. > Using dump won't be very useful because I won't be able to get the first 63 segments where boot info are written, I need something of lower level (obviously dd will be my friend). A hybrid approach would be to save the first 63 blocks with dd, then use dump for the UFS filesystems. dd if=/dev/ad0 of=mbr.bin count=63 PS: top-posting bad, inline with trimmed irrelevancies good.