From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 09:41:56 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65AAB16A41F for ; Mon, 1 Aug 2005 09:41:56 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BFAD43D46 for ; Mon, 1 Aug 2005 09:41:54 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from beatrix.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226]) by aiolos.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id j719fqxl020072; Mon, 1 Aug 2005 12:41:52 +0300 Received: from beatrix.daedalusnetworks.priv (localhost [127.0.0.1]) by beatrix.daedalusnetworks.priv (8.13.3+Sun/8.13.3) with ESMTP id j719fq5B017353; Mon, 1 Aug 2005 12:41:52 +0300 (EEST) Received: (from keramida@localhost) by beatrix.daedalusnetworks.priv (8.13.3+Sun/8.13.3/Submit) id j719fpkl017352; Mon, 1 Aug 2005 12:41:51 +0300 (EEST) Date: Mon, 1 Aug 2005 12:41:51 +0300 From: Giorgos Keramidas To: alexandre.delay@free.fr Message-ID: <20050801094151.GA16934@beatrix.daedalusnetworks.priv> References: <1122880808.42edcd280f5fd@imp6-q.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1122880808.42edcd280f5fd@imp6-q.free.fr> Cc: freebsd-questions@freebsd.org Subject: Re: Migrate primary disk (duplicate) 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: Mon, 01 Aug 2005 09:41:56 -0000 On 2005-08-01 09:20, alexandre.delay@free.fr wrote: > Hi guys > > I saw a post on > http://lists.freebsd.org/pipermail/freebsd-questions/2003-October/023454.html > > I am actually trying to migrate from one disk to an other. > I need to write a script to do it with several computers. > > The thing is that it works perfectly when I use the fdisk's /stand/sysinstall > and mbr installation, but doesn't work if I use: > fdisk -B -b /boot/mbr -I ad3 (or fdisk -B -b /boot/boot0 -I ad3) Try two steps: fdisk -I ad3 fdisk -B -b /boot/mbr ad3 Then, of course, you need to create a disk label with bsdlabel too and make sure you newfs the partitions, etc.