The FreeBSD Corporate Networker's Guide
The Fixit disk
What is Fixit disk?
When the same thing happens to a FreeBSD system, as long as the system is intact enough to find the /kernel file and boot from it, it's usually possible to run fsck and repair the disk to the point of recovering some data.
But, what if the FreeBSD disk is so trashed that the boot loader can't find the /kernel file? That's when the Fixit disk is used.
The Fixit disk is basically a FreeBSD system in minature that contains tools used to get a somewhat scrambled FreeBSD filesystem to the point that it can be mounted. Of course, a FreeBSD filesystem that is totally trashed, wihout any amount of surviving data, isn't recoverable. It may be possible to bring it to the point to which it can be mounted, but the files that will be accessible on the mount point will contain garbage. However, if the FreeBSD filesystem is mostly intact, the Fixit disk can allow the surviving data to be copied off of the FreeBSD system. Or, if a "head-slapper" mistake is made, such as deleting both /kernel and /kernel.GENERIC, then installing a broken kernel, the Fixit disk can be used to copy a running kernel file to / (the root directory).
How to use Fixit disk
If the FreeBSD system has a CDROM drive in it that is accessible from the installation kernel, then the FreeBSD system can be booted from the installation CD and Fixit can be selected from the installation menu. The fixit files are then loaded from the installation CD.
Once the Fixit environment is loaded, the system will be at a single-user root prompt. At this prompt generally the fist thing to do is to run fsck on the hard disk. This can be done with the command
Note that these device names are for IDE disks. SCSI disks would use /dev/mnt/sd0a and so on.
If the fsck command is successful, then attempt to mount the hard disk on the /mnt directory with the command
mount /dev/mnt/ad0a /mnt
Then, run a directory listing to see if it's intact, with the command
ls -l /mnt
If this shows a somewhat workable system, then if needed, copy over the kernel file to / (the root directory), and then try a warm-boot of the computer and see if the system comes up.
© Copyright 2000-2003 Ted Mittelstaedt. All rights reserved.