The FreeBSD Corporate Networker's Guide

The Fixit disk


What is Fixit disk?
When a Windows 95, 98, ME or 2K Personal system's disk goes haywire and the system is hopelessly scrambled, the usual method of repairing it is to boot from a bootable DOS floppy and run the DOS version of ScanDisk to see if it can make some sense out of the disk. Generally what happens is that the remaining disk contents become further scrambled, but usually the disk is brought to the point that it's possible to copy files from it and obtain some data, presuming that your data is in text files.

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
There are two ways to use the Fixit disk. The first is used if the FreeBSD system does not have a CDROM drive in it. Take the "kern" and "mfsroot" installation disks and boot the computer, as if a new FreeBSD system were going to be installed. At the Sysinstall menu, select the Fixit option. Then, insert the Fixit floppy disk and select it from the menu. The Fixit floppy is made from the "fixit.flp" file that is in the same directory on the installation CD that the installation floppy images are obtained from and is made using the same procedure.

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

fsck /dev/mnt/ad0a

fsck /dev/mnt/ad0c

fsck /dev/mnt/ad0d

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.


Site hostingSite design and maintenance
Internet Partners Inc.
info@ipinc.net
Web-Strider Enterprises
jeanm@web-strider.com

© Copyright 2000-2003 Ted Mittelstaedt. All rights reserved.