Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2014 08:56:10 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        eras mus <erasmu@gmail.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Server hang : MBR installation after dump and restore on new hard disk
Message-ID:  <alpine.BSF.2.00.1401160846510.90415@wonkity.com>
In-Reply-To: <CALeO_hNf_yLnrELKtGhdtq-aSx9Z0nitHfjN38rx9eGqRjh9aQ@mail.gmail.com>
References:  <CALeO_hNf_yLnrELKtGhdtq-aSx9Z0nitHfjN38rx9eGqRjh9aQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1401160846510.90415>