Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!comp.vuw.ac.nz!virtue!canterbury.ac.nz!phys169 From: phys169@canterbury.ac.nz Newsgroups: comp.os.msdos.programmer Subject: Re: Boot sector parameter table tricks Message-ID: <1990Jul25.103239.8778@canterbury.ac.nz> Date: 25 Jul 90 01:01:21 GMT References: <3110@rwthinf.UUCP> <32430001@hpcvra.CV.HP.COM> Organization: University of Canterbury Lines: 44 berg@cip-s05.informatik.rwth-aachen.de (Solitair) writes.... >When I change things like the no. of FAT's or the start of the first FAT >sector, in this table on my hard disk and/or on floppies, my MSDOS 3.3 >does not acknowledge this and does not use the new offsets and sizes. > everett@hpcvra.CV.HP.COM (Everett Kaser) writes: > First, MS-DOS appears to REQUIRE that there be two fats, even though there's > an entry in the BOOT sector telling how many fats there are on the disk. I've > never been able to get just one fat to work, and I've seen several references > to the fact that the two fats are pretty-well wired into MS-DOS. The device drivers keep a Bios Parameter Block in memory, for floppies several are loaded with the driver itself, rather than use the proper area in the first sector of the disk. It selects which to use based on the capacity of the disk, and it doesn't trust/ignores much of the parameters from the disk. The way around this is to supply your own device driver, which you are perfectly entitled to do with DOS, but you might still be stuck with 2 FATS. I think the background to it is: In the first version of DOS, there was no BPB on disk, rather an area said to be reserved; IBM's PC DOS always put zeroes there, but other companies using MS-DOS sometimes left all sorts of junk there. When the next version came along, with BPB info there, the software tested for nuls, and assumed the early (lower capacity, by the way) disk. Even today, some non-dos disks are assumed to be low capacity disks by dos. So DOS keeps a bunch of BPB's in ram, and chooses between them, because it cannot "trust" what is on the diskette. Why this has to apply to hard disks, I don't know, but going from one version of DOS to another can make your hard disk unbootable, because different versions think the root directory starts in a different place, irrespective of what the first sector says. It may be possible to change parameters without going to the effort of writing a new driver for your disk, by using something like Dos function 440D with CL=40h to get at the area inside the device drivers. If anyone has any success, let me know, but remember to worry about CHKDSK - I had changed disk parameters to give a more efficient (for my purposes) number of sectors/cluster and everything was working fine until one day I stupidly ran CHKDSK/F and lost the whole disk full of data! It seems to have it's own ideas about the disk structure too! P.S. Does anyone know what the "NON-IBM" bit actually does in the attributes of a block device? Does anything use it? Mark Aitchison, Physics, University of Canterbury, New Zealand.