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

General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

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

Postby pamasa » 09 Jun 2012, 16:36

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: Select all
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: Select all
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 [FILE]/dev[/FILE] 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: Select all
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, [FILE]/dev/iso9660/FreeSBIE[/FILE] 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 [FILE]/dev/ad4s3d[/FILE], [FILE]/dev/ad4s3e[/FILE] and [FILE]/dev/ad4s3f[/FILE] and had access to, apparently, all of the stuff in my FreeBSD partition.

Note that [FILE]/etc/fstab[/FILE] on the HDD referred to the FreeBSD partitions as [FILE]/dev/ada0s3x[/FILE], rather than [FILE]/dev/ad4s3x[/FILE] which name change may have been the cause of the corruption. I was able to use [FILE]nano[/FILE] to modify [FILE]/etc/fstab[/FILE] to the "new" device names without problem. In addition, through FreeSBIE, I was able to run [cmd=]fsck -y[/cmd] on all partitions ([FILE]/usr[/FILE] 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.
pamasa
Junior Member
 
Posts: 1
Joined: 09 Jun 2012, 08:04

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests