From owner-freebsd-questions@FreeBSD.ORG Fri Sep 12 00:41:57 2008 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 537511065671 for ; Fri, 12 Sep 2008 00:41:57 +0000 (UTC) (envelope-from chris.weiss@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by mx1.freebsd.org (Postfix) with ESMTP id 14BA18FC14 for ; Fri, 12 Sep 2008 00:41:56 +0000 (UTC) (envelope-from chris.weiss@gmail.com) Received: by py-out-1112.google.com with SMTP id p76so484133pyb.10 for ; Thu, 11 Sep 2008 17:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=G+M4mu/+tlkr07wJYO6g1Mg7LS1dDfBdsRU6x9EFeu4=; b=oo98nTvb9SZocDKoiPnPo6JDwObqD9xdzwTHtTF4tklh7VxuMTKV1VPHkJKXjpFMDC odclccK4gGcQSheZHSNpIfzsy84eMaOK9Z8BDuxR0idY2Q1wuaggugDrKG5cETmXROJ6 hj1KuIdIN40WfDKjQ3i6J/Fa4iTRWIEIZOIqE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=QEINvoswLz0Ilg3/I/KH6ts02KOFFYMrr86DV5KjlI+8Y1M/y+1bBkB2tdkUD8VtfH kwb7gIVe7tsMSQYd2FD3nc/AmmF+Oy8f4/Ov9bShLXUmMvIjqwMUZml5FKbSP2wyh186 /CKmJ1s/5fK5nfKj9KFgQsYY9PdLQ88HGiy0U= Received: by 10.142.242.11 with SMTP id p11mr1203265wfh.174.1221178795946; Thu, 11 Sep 2008 17:19:55 -0700 (PDT) Received: by 10.143.30.6 with HTTP; Thu, 11 Sep 2008 17:19:55 -0700 (PDT) Message-ID: Date: Thu, 11 Sep 2008 17:19:55 -0700 From: "Chris Weiss" To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Copying a FreeBSD install to a smaller disk 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: Fri, 12 Sep 2008 00:41:57 -0000 How would I go about copying an existing FreeBSD installation to a smaller disk? I've got a 3rd FreeBSD install I can boot from and store temporary files on, all the disks are in the same hardware, so there's no reconfiguration other than the boot device name and interface (IE -SATA ad4 will become IDE ad0). The disk is partitioned using the "default" sysinstall values and the contents of the larger disk will fit on the smaller disk, although I need to increase the size of the / and /var slices on the target to hold everything (/usr is fairly empty, so it'll easily fit on the smaller disk). For now, we'll say ad0 = new smaller disk, ad4 = boot BSD disk, and ad6 = the BSD install I want to clone. The path I've been going down is to manually partition and slice ad0 create ad4/mnt/source and ad4/mnt/target and mount /var, /tmp, etc from ad0 and ad6 and manually copy the files. But I'm stuck on how to handle /, since it'll have dev and proc and such. Any thoughts on how to do this, or on a completely different approach? I'm not aware of any 3rd party tools that'll deal with shrinking FreeBSD partitions. Thanks in advance for any help you folks can give! -- -Chris