From owner-freebsd-questions Mon Sep 11 5:36:54 2000 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (zoom0-112.telepath.com [216.14.0.112]) by hub.freebsd.org (Postfix) with SMTP id 4F04037B422 for ; Mon, 11 Sep 2000 05:36:49 -0700 (PDT) Received: (qmail 63645 invoked by uid 100); 11 Sep 2000 12:36:12 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14780.53692.512374.948114@guru.mired.org> Date: Mon, 11 Sep 2000 07:36:12 -0500 (CDT) To: Giorgos Keramidas Cc: questions@freebsd.org Subject: Re: ghost prog for FreeBSD? In-Reply-To: <99864729@toto.iv> X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Giorgos Keramidas writes: > On Sat, Sep 09, 2000 at 06:28:07PM -0400, bentley wrote: > > is there a Ghost Program for imaging a hard drive to another > > machine or disk? > [-- copying disks the freebsd way --] Appendix: Alternative method. > What I usually do, when I have to transfer an installation of BSD to > another disk / partition is: > > 1. Create the slices / labels on the second disk. > 2. Mount them under /mnt. > 3. Use cpio(1) to copy the files from / to /mnt. > 4. Use boot0cfg on the new disk to set up the boot loader on it. > 5. Reboot into the new installation. Actually, this does quite a bit more than ghost does. Ghost backs up partitions, not systems. I would also call this the sysv way, not the freebsd way. cpio was an AT&T tool that gnu copied. Historically, bsd didn't come with cpio, but used tar for that functionality. Generally, I copy each file system in a distinct step, because I normally deal with systems that have multiple disks. The steps are: 1. Create the slices / labels on the second disk. (unchanged) 2. For each old partition: A. Mount the new one on /mnt. B. (cd /; tar -lcf - .) | (cd /mnt; tar xf -) C. Unmount it. 3. Use boot0cfg on the new disk to set up the boot loader on it. 3. Reboot into the new installation. > because find(1) might descend /mnt too, and recursively copy all the > files in there many times. Another directory structure that need not be > copied is /proc, so the command I use to copy an installation to /mnt is > usually: The process with tar avoids all such problems by copying each file system separately - the "l" option keeps it on one file system. If you want to take that approach with find/cpio, you can use the "x" option on find to keep it on one file systems. > You might also find it useful to pass --preserve-modification-time > option to the --extract invocation of cpio. That's the "p" option to the second tar: (cd /old; tar cf - .) | (cd /new; tar xpf -) > As you can see, there is no Ghost program in FreeBSD, but there is a > very nice and relatively easy way to copy an installation of FreeBSD to > some other disk. As you can see, the problem with Unix (as opposed to alternative operating systems) is not finding how something is done, but choosing the most appropriate method from those available.