From owner-freebsd-questions Tue Nov 17 09:59:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA15194 for freebsd-questions-outgoing; Tue, 17 Nov 1998 09:59:57 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from agora.rdrop.com (agora.rdrop.com [199.2.210.241]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA15173 for ; Tue, 17 Nov 1998 09:59:51 -0800 (PST) (envelope-from tedm@toybox.placo.com) From: tedm@toybox.placo.com Received: (from uucp@localhost) by agora.rdrop.com (8.8.5/8.8.5) with UUCP id JAA25873 for FAQ@freebsd.org; Tue, 17 Nov 1998 09:59:26 -0800 (PST) Received: from toybox.placo.com (os2box [198.6.35.25]) by toybox.placo.com (8.8.8/8.8.8) with SMTP id CAA03878 for ; Tue, 17 Nov 1998 02:13:39 -0800 (PST) (envelope-from tedm@toybox.placo.com) Received: by toybox.placo.com (IBM OS/2 SENDMAIL VERSION 1.3.14/(3.0sos) id AA0068; Tue, 17 Nov 98 02:12:59 -0800 Message-Id: <9811171012.AA0068@toybox.placo.com> Mime-Version: 1.0 Date: Tue, 17 Nov 98 01:39:42 +0700 To: FAQ@FreeBSD.ORG Subject: Update question #4.1 I have bad blocks on my hard drive X-Mailer: Ultimedia Mail/2 Lite, IBM T. J. Watson Research Center Content-Id: <64_116_1_911284782> Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Remove everything after: "for other drive types you are dependent on support from the operating system" And replace it with the following: For IDE drives, any bad block is usually a sign of potential trouble. All modern IDE drives come with internal bad-block remapping turned on. All IDE hard drive manufacturers today offer extensive warranties and will replace drives with bad blocks on them. If you still want to attempt to rescue an IDE drive with bad blocks, you can attempt to download the IDE drive manufacturer's IDE diagnostic program, and run this against the drive. Sometimes these programs can be set to force the drive electronics to rescan the drive for bad blocks and lock them out. For ESDI, RLL and MFM drives, bad blocks are a normal part of the drive and are no sign of trouble, generally. With a PC, the disk drive controller card and BIOS handle the task of locking out bad sectors. This is fine for operating systems like DOS that use BIOS code to access the disk. However, FreeBSD's disk driver does not go through BIOS, therefore a mechanism, bad144, exists that replaces this functionality. bad144 only works with the wd driver, it is NOT able to be used with SCSI. bad144 works by entering all bad sectors found into a special file. One caveat with bad144 - the bad block special file is placed on the last track of the disk. As this file may possibly contain a listing for a bad sector that would occur near the beginning of the disk, where the /kernel file might be located, it therefore must be accessible to the bootstrap program that uses BIOS calls to read the kernel file. This means that the disk with bad144 used on it must not exceed 1024 cylinders, 16 heads, and 63 sectors. This places an effective limit of 500MB on a disk that is mapped with bad144 To use bad144, simply set the "Bad Block" scanning to ON in the FreeBSD fdisk screen during the initial install. This works up through FreeBSD 2.2.7. The disk must have less than 1024 cylinders. It is generally recommended that the disk drive has been in operation for at least 4 hours prior to this to allow for thermal expansion and track wandering. If the disk has more than 1024 cylinders (such as a large ESDI drive) the ESDI controller uses a special translation mode to make it work under DOS. The wd driver understands about these translation modes, IF you enter the "translated" geometry with the "set geometry" command in fdisk. You must also NOT use the "dangerously dedicated" mode of creating the FreeBSD partition, as this ignores the geometry. Also, even though fdisk will use your overridden geometry, it still knows the true size of the disk, and will attempt to create a too large FreeBSD partition. If the disk geometry is changed to the translated geometry, the partition MUST be manually created with the number of blocks. A quick trick to use is to set up the large ESDI disk with the ESDI controller, boot it with a DOS disk and format it with a DOS partition. Then, boot the FreeBSD install and in the fdisk screen, read off and write down the blocksize and block numbers for the DOS partition. Then, reset the geometry to the same that DOS uses, delete the DOS partition, and create a "cooperative" FreeBSD partition using the blocksize you recorded earlier. Then, set the partition bootable and turn on bad block scanning. During the actual install, bad144 will run first, before any filesystems are created. (you can view this with an Alt-F2) If it has any trouble creating the badsector file, you have set too large a disk geometry - reboot the system and start all over again. (including repartitioning and reformatting with DOS) //------------------------------------------------------------------------- // Ted Mittelstaedt See my "Network Community" columns at // tedm@toybox.placo.com http://www.computerbits.com // "When they split apart molecules, they found atoms. When they split // apart atoms they found explosions" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message