From owner-freebsd-questions Thu Dec 30 18:47:28 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id 108EC14D0D for ; Thu, 30 Dec 1999 18:47:14 -0800 (PST) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.9.3) id VAA91667; Thu, 30 Dec 1999 21:52:00 -0500 (EST) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199912310252.VAA91667@cc942873-a.ewndsr1.nj.home.com> Subject: Re: reading/writing raw disk partitions In-Reply-To: from Ken Bolingbroke at "Dec 30, 1999 04:54:05 pm" To: hacker@bolingbroke.com (Ken Bolingbroke) Date: Thu, 30 Dec 1999 21:52:00 -0500 (EST) Cc: freebsd-questions@FreeBSD.ORG Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ken Bolingbroke wrote, > > Does there exist any utility that runs under FreeBSD and can read and > write directly to disk partitions, regardless of the format? For example, > if I had a NTFS partition and another Linux ext2fs partition, is it > possible to use a FreeBSD utility to dump both of those partitions to a > file, then if needed later, restore them back to the original partition? > I don't expect to be able to read the individual files on those > partitions, of course, but I would like to be able to dump and restore > the entire partition from FreeBSD if at all possible. man dd Example: Copy a slice, da0s2, to a file, slice2.raw, % dd if=/dev/rda0s2 of=slice2.raw Now copy a file to a raw partition, % dd if=rawdisk.dat of=/dev/rwd0s3 However, if the slice 3 is not _exactly_ like the slice rawdisk.dat was copied from... YMMV. However, if this is for backup purposes, where the geometry of the slice is static, I would expect this to work. (I have never personally done such a thing. When I want to back up a DOS slice on a machine I don't want to boot out of FreeBSD, I use Samba to share the DOS filesystem and use a Windoze machine to do a backup, or just make a tarball.) -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message