Corrupted FreeBSD install prevents re-install CD or USB key seeing drives

I'm relatively new to FreeBSD but have a lot of experience in other Unix systems such as Linux and OS X. I recently inherited an old desktop computer which has a multiboot system (3 Linux distros, Windows 7 and FreeBSD all booting through Grub) where FreeBSD 9.0-RELEASE worked very well.

For reasons I can't fully explain, the FreeBSD install became corrupted although I believe it had something to do with rebooting the computer with a powered up external drive connected. The external drive, unbeknownst to me, had a bootable partition on it which may have caused renaming of the FreeBSD partitions within the slice.

In any event, booting to FreeBSD from Grub now leads to
Code:
Mounting from ufs:/dev/ad4s3a failed with error 19
and thereafter to a mountroot prompt. Typing '?' at the mountroot prompt provides no GEOM managed disk devices whatsoever.

At this stage, I created a re-install CD of FreeBSD 9.0-RELEASE and booted from it. However, the boot ended with
Code:
Mounting from cd9660:/dev/iso9660/FREEBSD_INSTALL failed with error 19
and then the mountroot prompt. Once again, typing a '?' at the prompt showed no GEOM managed disk devices.

I got exactly the same behavior with the 502MB CD and the 2.1GB DVD created from versions of the FreeBSD 9.0 ISO. Next I burned the FreeBSD 9.0-RELEASE disk1 ISO to a USB key. In contrast to the CD/DVD, the USB key booted fine. However, when I selected Live CD option on the Welcome page, checking in /dev showed none of the computer HDD partitions. When I later chose the Install option on the Welcome page and proceeded with the install to the partition editor, the only drive presented for partitioning was the USB key itself. Neither the HDD nor its partitions were available.

Finally, I tried a CD of FreeSBIE 2.0.1 which booted to
Code:
Trying to mount root from cd9660:/dev/iso9660/FreeSBIE
and then to the mountroot prompt. However, this time typing '?' provided a range of valid disk boot devices including all of the partitions on the HDD, some of which are in fact not bootable. This list also included all of the FreeBSD partitions on the FreeBSD slice. Interestingly, /dev/iso9660/FreeSBIE was not in this list.

However, none of these devices proved bootable from FreeSBIE when the CD was booted in normal mode. But, in single user mode, I was able to boot from the mountroot prompt using [cmd=]ufs:/dev/ad4s3a[/cmd] which brought me to a #. Now I could appropriately mount /dev/ad4s3d, /dev/ad4s3e and /dev/ad4s3f and had access to, apparently, all of the stuff in my FreeBSD partition.

Note that /etc/fstab on the HDD referred to the FreeBSD partitions as /dev/ada0s3x, rather than /dev/ad4s3x which name change may have been the cause of the corruption. I was able to use nano to modify /etc/fstab to the "new" device names without problem. In addition, through FreeSBIE, I was able to run [cmd=]fsck -y[/cmd] on all partitions (/usr seems to have been very unclean) and get clean filesystems for all. However, trying again to boot from the HDD install of FreeBSD failed for exactly the same reasons as before.

Note also that I tried the CD, DVD and USB keys on a different but very similar desktop computer and all worked perfectly as expected, with in each case, all HDD partitions being available for FreeBSD install. Note, in addition, that the CD drive on my computer works fine with Linux install CDs.

While I can accept that my FreeBSD has become unbootable, I am very puzzled as to how this corruption is affecting the performance of all of the re-install media that I tried. Unless, somebody has any insights as to what is happening here, I believe the next step is to completely wipe the FreeBSD partition on the HDD and try the install media again, hoping that this time the "cleaned" partition will be made available for re-install.

Thanks for any comments.
 
Back
Top