Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!munnari.oz.au!metro!dmssyd.syd.dms.CSIRO.AU!ditsydh.syd.dit.CSIRO.AU!evans From: evans@syd.dit.CSIRO.AU (Bruce.Evans) Newsgroups: comp.os.minix Subject: Re: fdisk, head, cylinders and blocks Message-ID: <1991May25.033312.3844@syd.dit.CSIRO.AU> Date: 25 May 91 03:33:12 GMT References: <53806@nigel.ee.udel.edu> <1991May22.050418.189@skypod.guild.org> Organization: CSIRO Division of Info Tech, Sydney, Australia Lines: 32 In article <1991May22.050418.189@skypod.guild.org> marc@skypod.guild.org (Marc Fournier) writes: > I'm the guy that originally asked this question. First of all, I would >like to thank the guys who answered telling me that I had to do an >fdisk -h5 -s17 /dev/hdx to get it to work...it doesn't work but it gave me >an idea to try out. It should work, if 5 and 17 are correct. > If anyone ever has this trouble again, don't go looking through >atwini or xtwini, you will be wasting your time..there isn't anything in >there. Go directly to the fdisk.c source and change NHEAD in there. That >is the only place that I could find any reference to HEADs at all. I wouldn't >have been able to find it without two guys suggesting the fdisk -h -s /dev/hdx >solution, so I have them to thank. This is misleading. The number in fdisk.c don't affect anything much. For atwini, there is indeed nothing to fiddle with in the driver (this is good). The number of heads and sectors are read from a BIOS memory location, usually 0xF000:0xE401 + 0x10 * (drive_number - 1), where drive_number is what you tell setup. For xtwini, only the number of heads is stored in the BIOS table, and getting the correct index in the table is black magic. NR_SECTORS is defined in the driver as 17 unless it is already defined. But If you have defined AUTO_BIOS, a completely different method of getting the parameters is used. Changing DEFAULT_NHEAD in fdisk.c does nothing more than giving the -hheads parameter to fdisk. I think NHEAD was the name in the 1.3 version. -- Bruce Evans evans@syd.dit.csiro.au