From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 24 16:02:46 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E61416A41F for ; Fri, 24 Mar 2006 16:02:46 +0000 (UTC) (envelope-from khaled@ipbill.com) Received: from mail.ipbill.com (mail.ipbill.com [217.73.64.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 822D243D45 for ; Fri, 24 Mar 2006 16:02:42 +0000 (GMT) (envelope-from khaled@ipbill.com) Received: (qmail 31489 invoked from network); 24 Mar 2006 16:02:39 -0000 Received: from unknown (HELO elzidpc) (192.168.129.50) by mail.ipbill.com with SMTP; 24 Mar 2006 16:02:39 -0000 From: "Khaled Hussain" To: "FreeBSD Hackers" Date: Fri, 24 Mar 2006 16:01:12 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: cloning a FreeBSD HDD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2006 16:02:46 -0000 Hi All, This is my first day on the list so please pardon me if I am on the wrong list and any mistakes I make. I would like to create a bootable clone of a HDD running BSD version 4.8. I have experience of cloning linux machines successfully but understand that freebsd is a little different. Please correct me if I'm wrong but my procedure would be to procedure would be to: 1. Connect a new HDD as secondary to a freebsd host machine 2. create partitions and make filesystem on these partitions 3. mount the clone HDD on the host machine 4. scp all dirs exclusive of /dev and /proc from the original HDD to the clone HDD 5. install the boot loader - this is pretty easy with grub or lilo on linux but I have no idea what is required to be done at this stage or how the BSD boot manager works 6. unmount the clone and shutdown the machine 7. restart the machine with the clone HDD set as primary HDD I created the partitions and filesystem by using /stand/sysinstall off of the host machine and editted the disk labels for the attached clone HDD. The mount point for the root partition of the clone HDD was /mnt on the host HDD. I also installed a boot manager on the HDD via /stand/sysinstall. After copying all dirs over from the original source HDD, I booted the HDD to find that the boot menu prompt is desplayed but followed by an error when trying to boot, similar to: --start-- Default: F1 Invalid Partition: no /boot/loader Default: 0: ad(0,a)/kernel no /kernel --end-- This is despite /boot/loader and /kernel existing in the cloned HDD. Please can someone help me understand what I am doing wrong and how to successfully clone a BSD disk; I would greatly appreciate any commands that can shorten the process (as opposed to doing things via /stand/sysinstall). Kindest Regards Khaled