From owner-freebsd-doc@FreeBSD.ORG Sat Sep 13 11:22:23 2003 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B41416A4BF for ; Sat, 13 Sep 2003 11:22:23 -0700 (PDT) Received: from plover.csun.edu (plover.csun.edu [130.166.1.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70AFE43FF9 for ; Sat, 13 Sep 2003 11:22:22 -0700 (PDT) (envelope-from albert.kinderman@csun.edu) Received: from puffin.csun.edu (puffin.csun.edu [130.166.1.21]) by plover.csun.edu (Mirapoint Messaging Server MOS 3.3.3-GR) with ESMTP id APB87140; Sat, 13 Sep 2003 11:30:57 -0700 (PDT) Received: from csun.edu (s097n152.csun.edu [130.166.97.152]) by puffin.csun.edu (Mirapoint Messaging Server MOS 3.3.3-GR) with ESMTP id AZB40878 (AUTH vcmgt00b); Sat, 13 Sep 2003 11:16:08 -0700 (PDT) Message-ID: <3F636031.5040302@csun.edu> Date: Sat, 13 Sep 2003 11:21:37 -0700 From: Albert Kinderman User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030901 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-doc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: renaud@softway.com Subject: Correction to Formatting Media For Use With FreeBSD Sec 4.2 X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2003 18:22:23 -0000 [I cannot send mail from my FreeBSD box, so send-pr is not available. The web interface for pr's is not available, so I am writing directly to the list] Here is the current section 4.2 of Formatting Media For Use With FreeBSD [begin quote] 4.2 Copying the Contents of Disks Submitted By: Renaud Waldura () To move file[s] from your original base disk to the fresh new one, do: # mount /dev/ad2 /mnt # pax -r -w -p e /usr/home /mnt # umount /mnt # rm -rf /usr/home/* # mount /dev/ad2 /usr/home [end quote] The problem with this is that pax copies the directory structure of /usr/home to /mnt (an ls of /mnt after pax shows usr, of /mnt/usr shows home).Thus, once /usr/home is mounted on /dev/ad2, the contents of /usr/home will be /usr/home, i.e., the files you want are in /usr/home/usr/home. The correct method replaces line two with #cd /usr/home #pax -r -w -p e * /mnt #cd / This copies the directories and files from /usr/home to /mnt, but not the complete /usr/home directory structure. CAVEAT: I did not do this on a whole disk. I added a new disk, sliced it, and partitioned the slice, so that I was mounting just a partition within a slice, e.g., /dev/ad1s1e. I used the listed method on /usr, and only later discovered that all the files from /usr were now in /usr/usr. (I changed /etc/fstab to mount the new slice on /usr, and my reboot couldn't go into multiuser mode when all the files supposed to be in /usr were not found.) After fixing /usr, I did a test by creating /usr/fred and following the original instructions. The result was that all my files were in /usr/fred/usr/fred. Al