MBR info lost

I have at work a amd64 machine that was running 9.2 without issue. We moved to a new building and the Facilities people moved the box. When I set it up and booted it failed with some debug-looking console display. I had the box's old 32-bit disk so I put that in as ada0 and moved the broken disk to ada1. It booted ada0 fine and I can see all the partitions and data on ada1. (Whew...)

How do I re-install the book code on the old disk? I've returned it to ada0, booted off an amd64 CD, chose liveCD and tried fdisk -B -b /boot/boot0 /dev/ada0 but when I boot that it gives an F1 prompt. "Enter" gives two hashes. I'm thinking this doesn't work because I'm not using the old /dev/ad0 DOS disk layout but can't find anything else in the Handbook. Windows did not do this; the disk is ALL FreeBSD. Ideas needed; I really don't want to re-install (could if necessary, all user data is in a non-system partition: /dev/ada0p8).

Many thanks,
s-a
 
Did you back it up before writing to it? Why not?

ada0p8 means it was a GPT disk. I say "was" because writing to a GPT disk with fdisk(8) is not good. fdisk(8) does not understand GPT at all, but it will happily change the PMBR on a GPT disk that is not meant to be changed.

Before doing anything else, boot a recovery disk (mfsBSD is very good) and back up ada0p8 to another disk.

With a safe backup, gpart(8) can be used to write boot code to the disk. The first half of Disk Setup On FreeBSD shows how to do that.

There still could be problems. Moving the machine might have damaged it.
 
Yes, I backed the disk up to my home machine. The data is safe, I'm just trying to avoid the time it will take to re-compile software. I use ports rather than packages.

At the same time this was the first machine on which I used the "new" partitioning scheme at install, so this will be a good skill exam.

thanks!
s-a
 
Back
Top