Server hang : MBR installation after dump and restore on new hard disk

eras mus erasmu at
Thu Jan 16 11:56:40 UTC 2014

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
Then dump and restore performed on all the partitions of the old hard disk
to the new hard disk partitions.

(I understood that the old disk's /usr partition has bad sectors and the
data is not in a consistent state. I have backups of /usr of the old disk
so i can manage the data later.)

After performing dump and restore to the new hard disk, I edited the
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?
How to fix this?
I tried to install MBR using sysinstal to the new hard disk after all these
dump and restore operations . But got message Error Cannot write to the
disk ad7  100% full.

Is it possible to install FreeBSD Boot Manager over the old GRUB of the new
hard disk which is having all the restored partitions of the old disk.

Please shed some light on this.

On Thu, Jan 9, 2014 at 5:45 PM, Polytropon <freebsd at> wrote:

> On Thu, 9 Jan 2014 17:03:51 +0530, eras mus wrote:
> > dear List
> >
> > I have attached the snapshots of fsck.
> This list does not allow attachments. You should either copy
> the printed text into the message or upload images somewhere
> and provide an URL.
> > Whether  fsck is fixing the errors of   /usr. Or just sitting in infinite
> > loop?
> Transfering your system to a new disk aside - THAT is the REALLY
> STRANGE question here! The fsck program does not simply hang in
> infinite loops. This indicates a severe problem probably with
> your hardware, and that has not neccessarily to be the disk.
> You should really try step by step, in _small_ steps. Can you
> boot the system from a live CD? If yes, do that. Then check
> each file system separately:
>         # fsck -yfv /dev/ad4s1a
>         # fsck -yfv /dev/ad4s1d
>         # fsck -yfv /dev/ad4s1e
>         # fsck -yfv /dev/ad4s1f
>         # fsck -yfv /dev/ad4s1g
> and so on. If it helps, try that with ACPI disabled again. There
> is no real use in trying to copy a possibly damaged file system
> to a new disk. Before you copy, make sure they're all consistent.
> By the way, in addition to the mentioned ways to copy an OS and
> and data, there's still the "old school" toolset that can be used:
> First initialize the disks (for example with gpart, use MBR only
> if you need to, otherwise go with GPT). Then format the new
> partitions (newfs) and install the boot blocks (or boot partition
> for GPT). Additionally make sure to apply labels to the file
> systems (so you don't have to mess with device names in the
> future). Finally, use ye olden dump and restore.
> Here's an example. Let's assume /dev/ad4 is your designated new
> disk, /dev/ad6 your current disk (failing, will be abandoned).
> The target disk has been partitioned with GPT, the file systems
> have been initialized already. The source disk is _not_ mounted.
>         # mount /dev/ad4p2 /mnt
>         # cd /mnt
>         # dump -0 -L -a -u -f - /dev/ad6s1a | restore -r -f -
>         # mount /dev/ad4p3 /mnt/tmp
>         # cd /mnt/tmp
>         # dump -0 -L -a -u -f - /dev/ad6s1d | restore -r -f -
>         # mount /dev/ad4p4 /mnt/var
>         # cd /mnt/var
>         # dump -0 -L -a -u -f - /dev/ad6s1e | restore -r -f -
>         # mount /dev/ad4p5 /mnt/usr
>         # cd /mnt/usr
>         # dump -0 -L -a -u -f - /dev/ad6s1f | restore -r -f -
>         # mount /dev/ad4p6 /mnt/home
>         # cd /mnt/home
>         # dump -0 -L -a -u -f - /dev/ad6s1g | restore -r -f -
>         # cd /
>         # umount /mnt
> In this example, /mnt will be the subtree that later on becomes /.
> Of course you have to check which things apply to _your_ setup!
> Note that you can also do that easily from a live CD. Note that
> for this task, only the destination media has to be mounted, the
> source media usually not. By using this approach, you can make
> sure that all file attributes get transferred correctly.
> You can find further inspiration around here:
> --
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list