Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!ames!hc!beta!hgm From: hgm@beta.UUCP (Harry McGavran) Newsgroups: comp.os.minix Subject: fsck fails on hard disk Message-ID: <5122@beta.UUCP> Date: Wed, 6-May-87 16:29:19 EDT Article-I.D.: beta.5122 Posted: Wed May 6 16:29:19 1987 Date-Received: Sat, 9-May-87 01:18:31 EDT Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 107 The bootblok routine places the stack pointer at the top of the vector region (0000:0400). When bootblok runs to load the balance of the system, the stack pointer results in clobbering vectors 0xFF and down for some number of vectors. The WD 1002A-WX1 ( and other hard disk controllers) use these vectors. The range from 0000:0400 to 0000:0500 is used for the bios data area. When rebooting, the bios sets up the vectors and puts tables and flags in the data area. The WD controller when it gets its turn stores things in the top few vectors. The result is, that when you run fsck on the hard disk, even though fsck uses the bios, the stuff bios has set up for the hard disk has been destroyed by bootblok, so fsck fails. One fix is the move the stack segment from zero up to some higher number. My solution was to move the relocation point from just below 192K for bootblok, to somewhat lower, and make the stack point 1K above the highest point of the relocated bootblok. Now fsck is ok. I also put in some code to set the keyboard reset flag that results in a reboot without a memory check. Some PCs I have, have a reset button. I use that to re-boot because I notice flakiness (described in the book) if I use CTRL-ALT-DEL. (For reasons I would like to understand better, but haven't had the time to look into.) Without the flag set, the reset button results on a LONG memory check on my slow PC. Below are the diffs for "bootblok.s". Copy the source for the original bootblok.s to some system with the latest version of "patch" on it. Cut the portion below out into a file named bootblok.pat. Then type "patch -l bootblok.s