Return to BSD News archive
Newsgroups: comp.os.386bsd.apps Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry From: terry@cs.weber.edu (A Wizard of Earth C) Subject: Re: HELP!!! Endless reboot!!! FAQ was no help Message-ID: <1993Jul21.212730.18743@fcom.cc.utah.edu> Sender: news@fcom.cc.utah.edu Organization: Weber State University, Ogden, UT References: <graphix.743239687@class1.iastate.edu> Date: Wed, 21 Jul 93 21:27:30 GMT Lines: 153 In article <graphix.743239687@class1.iastate.edu> graphix@iastate.edu (Kent A Vander Velden) writes: >If I install 0.1 onto the entire drive it works. This is not acceptable. I >need a dos partition. When I create a dos partition and have 0.1 install to >the remaining when I reboot the system for the first time it goes into this >damn endless cycle of errors. Something having to do with the disk label. > >p.s. my system is a 486/33 with about a 200 meg IDE HD. I want about 70 megs ^^^ >for dos and 130 for 0.1. Ieeeeeee! (or "IDE!", as the case may be). 1) Get pfdisk.exe; it's a DOS program, and it's on most Linux archives and many, many more DOS archives. Run it to get your translated geometry. 2) Get NetBSD 0.8 boot disks, or, if you are absolutely stuck on having 0.1, get some kind soul to make you some boot disks (I don't qualify in this department). Without Julian's boot blocks (a standard feature of NetBSD), all is lost! 3) Boot with the disks; NetBSD will report the real drive geometry as it boots. With 0.1 with Julian's boot blocks, you are on your own finding out this information (maybe it's in the manual that came with the drive, or maybe -- less likely -- the support department of the manufacturer can tell you). Follow the instructions in this reprinted article (mine): ============================================================================ c, h, s : untranslated geometry, as reported by AHA driver during boot. c', h`, s': translated geometry, as reported by int13 ah=8. Dc: Number of cylinders (using the translated geometry) reported by fdisk under DOS. The calculations: Total_translated_cylinders = ( c * h * s) / ( h' * s') Total_translated_sectors = Total_translated_cylinders * h' * s' Total_translated_offset_sectors = Dc * h' * s' Total_386BSD_translated_sectors = Total_translated_sectors - Total_translated_offset_sectors yield the information necessary for the disklabel for the 386BSD install after the DOS install. Let's take a real example: We have a Maxtor Panther P1-17S SCSI drive (1.778G unformatted). We have an Adaptec 1742A in Standard mode with enhance translation turned off (standard translation is turned on). The translated geometry of the drive (reported by int13 ah=8) is: 1024 Cylinders c' 64 Heads h' 32 Sectors s' The actual geometry of the drive (reported by 386BSD on boot) is: 1778 Cylinders c 19 Heads h 86 Sectors s The 'Total_translated_cylinders' is the number of translated cylinders the disk would have if DOS didn't limit it to 1024. This ends up being: ( 1778 * 19 * 86 ) / ( 64 * 32) = 1418.58 To calculate 'Total_translated_sectors', we first round thi down to an integer value, since non-integer cylinder numbers are meaningless. This means we are going to lose some disk space (about 608k, to be exact): 1418 * ( 64 * 32) = 2904064 Now we need to know 'Dc': the number of DOS cylinders; for our example, let's assume 180M. This works out to a nice round 180 cylinders for DOS (the DOS fdisk program shows a start of '0' and an end of '179'). Using this number, we determine the number of sectors into the disk where the 386BSD parition starts ('Total_translated_offset_sectors): 180 * ( 64 * 32) = 368640 Finally, we need to know how many sectors are going to be available to 386BSD, or 'Total_386BSD_translated_sectors': 2904064 - 368640 = 2535424 We now have all the information necessary for our disktab entry: P1-17S|Maxtor Panther 1.78GB SCSI:\ :dt=SCSI:ty=winchester:se#512:nt#64:ns#32:nc#1418:\ :pa#????:oa#368640:ta=4.2BSD:ba#4096:fa#512:\ :pb#????:ob#????:tb=swap:\ :pc#2535424:oc#368640:\ :pd#2904064:od#0:\ :pe#????:oe#????:te=4.2BSD:be#4096:fe#512:\ :pf#????:of#????:tf=4.2BSD:bf#4096:ff#512:\ :pg#????:og#????:tg=4.2BSD:bg#4096:fg#512:\ :ph#????:oh#????:th=4.2BSD:bh#4096:fh#512: Calculation of ???? values is based on how you want to divide up the disk partitions. Partitions e-h are optional depending on the configuration chosen by the user, with the exception that the total of pa, pb, pe, pf, pg and ph can not exceed the value of pc, and that ob = oa + pa, oe = ob + pb, of = oe + pe, og = of + pf, and oh = og + pg. The values nt, ns, nc, oa, pc, oc, pd, and od should all be obvious in their derivation from: Total_386BSD_translated_sectors Total_translated_offset_sectors Total_translated_cylinders h' s' > The same figure could be deduced by the WD driver by trying to > read successive increasing record on track 0 until > it gets a failure.. (as far as the 'post reset' geometry is concerned). I think that deduction of geometry can be screwed by two circumstances: a) The rounding necessary to get disklabel to consider only valid disk area (from 1418.58 to 1418). b) The number of disk heads and sectors both being some even power of 2 multiple of the actual physical geometry. > maybe the 'reset' shouldn't be done until AFTER the > MBR has been read, and the disklabel fetched? Definitely! I also think the geometry of *all* attached disks can be read before going untranslated. This should solve the objections you had to devices other than the first disk, since we would have the translated and untranslated geometries for *all* of the drives, not just the first one! -- Terry ============================================================================ Terry Lambert terry@icarus.weber.edu terry_lambert@novell.com --- Any opinions in this posting are my own and not those of my present or previous employers.