Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!mmdf From: Peter_Van_Epp@cc.sfu.ca Newsgroups: comp.os.minix Subject: Re: Minix & Hardcards Message-ID: <38601@nigel.ee.udel.edu> Date: 10 Dec 90 08:02:54 GMT Sender: mmdf@ee.udel.edu Lines: 36 The way I always figure out the geometry of the disk (and I just got a new 200 M drive and a 386 machine!) is to let the disk bios tell me from DOS. All you need is a 5 line program under debug (assuming of course that you have MSDOS!) that looks like this a 100 mov ah,8 mov dl,80 int 13 nop nop then do a g=100,106 and when the breakpoint is hit the carry flag should be clear (indicating success) and the drive parameters are as follows: ch = max usable cylinder (low 8 bits) cl = bits 7 and 6 = high 2 bits of max cyl bits 5 - 0 = max sector # dh = max usable head dl = number of drives. es:di = address of disk param table (which you don't care about). This should get you the info you need to feed to fdisk. Example for my 200m drive: ch = CE cl = DC dh = 0E dl =1 so there are 3CE (or 974) tracks (top 2 bits of cl and all of ch) 1C (or 28) sectors per track (from cl bottom 5 bits) and 0E (or 14) as the last usable head (from dh). This is a little confusing because that is the last usable head and they start at 0 so there are actually 15 heads! given the above the fdisk command looks like this: fdisk -h15 -s28 /dev/hd0 and voila all falls into place. Hope this helps!