From owner-freebsd-questions@FreeBSD.ORG Thu Jan 16 15:56:12 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 673C9D68 for ; Thu, 16 Jan 2014 15:56:12 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F12A91937 for ; Thu, 16 Jan 2014 15:56:11 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.7/8.14.7) with ESMTP id s0GFuAVH090677; Thu, 16 Jan 2014 08:56:10 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.7/8.14.7/Submit) with ESMTP id s0GFuAId090674; Thu, 16 Jan 2014 08:56:10 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Thu, 16 Jan 2014 08:56:10 -0700 (MST) From: Warren Block To: eras mus Subject: Re: Server hang : MBR installation after dump and restore on new hard disk In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Thu, 16 Jan 2014 08:56:10 -0700 (MST) Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jan 2014 15:56:12 -0000 On Thu, 16 Jan 2014, eras mus wrote: > Dear List, > > Thank you all for the help. I understood that the old hard disk is dying. > I booted with a FreeBSD Live CD with the new hard disk. > Now it detected the old hard disk as /dev/ad4 and new one as /dev/ad7. > > Then using sysinstall did slicing and partitioning on the new hard > disk(ad7). Then dump and restore performed on all the partitions of > the old hard disk to the new hard disk partitions. While sysinstall had a reasonably nice user interface for disk partitioning, it was and is buggy and best avoided on current versions of FreeBSD. > After performing dump and restore to the new hard disk, I edited the > /etc/fstab of the root partition so that it will update the /etc/fstab > for the new hard disk partitions(ad7s1a,ad7s1d,ad7s1f ..... instead of > the ad4 entries in the /etc/fstab) > > Now when i try to boot the machine with both the hard disks as attached. > It is showing as below > > F1 FreeBSD > F5 Drive 1 > > When i select F5 it is going to a GRUB prompt of the new hard disk > ,Because it already had a linux installation before doing the dump and > restore operation. > > As per my understanding FreeBSD Boot Manager is not installed for the new > hard disk. Am I right? Yes. Use 'boot0cfg -B ad7' to install it to the new drive, or 'fdisk -B ad7' for a plain MBR that just boots without showing the menu. You may also need to install bootcode to the BSD partitions themselves. This can be done with 'bsdlabel -B ad7s1'. I'd recommend using gpart instead, but you don't say what version of FreeBSD you have, and it may be old enough that gpart is not present. If gpart is present, see http://www.wonkity.com/~wblock/docs/html/disksetup.html#_the_old_standard_mbr