*BSD News Article 45496


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news1.oakland.edu!vtc.tacom.army.mil!ulowell.uml.edu!wang!news.kei.com!news.mathworks.com!news.alpha.net!uwm.edu!lll-winken.llnl.gov!enews.sgi.com!sgiblab!rahul.net!a2i!jimi.a2i!jimi
From: "C. A. Piepenbring" <jimi@rahul.net>
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Re: Geometry Translation on IDE 1.2Gb
Date: 14 Jun 1995 06:44:19 GMT
Organization: Lame... Lamer... Lamest...
Lines: 67
Message-ID: <3rm0g3$f0i@hustle.rahul.net>
References: <3rhvl0$ge2@hustle.rahul.net> <3rk8fj$5pa@tribune.usask.ca>
NNTP-Posting-Host: jitter.rahul.net
NNTP-Posting-User: jimi

Bradley W Mazurek <bwm260@skorpio3.usask.ca> wrote:
>Not quite.  I was getting the exact same error with my 1.08Gb drive,
>so I assume the same fix will work.  My solution did require more complete 
>partition editing tools than were available through pfdisk.  The disk
>editor included in PC Tools was excellent.
>
OK.. I used Norton Utils which wasn't too bad either. :)

>First, I had to change the IDE translation mode in my BIOS.  Rather than
>using LBA, I used Standard CHS.  When I went in to reparition the disk for
>DOS, DOS reported that the drive was only 523Mb (1023cyl, 64h, 63sec/tr),
>rather than the true geometry (2100cyl, 64h, 63sec/tr) but I didn't worry 
>about it. Next I created my DOS partition.  I partitioned the disk so that
>cylinders 1-999 were DOS.  That left cylinders 1000-1023 for NetBSD.  Lots
>of room!  :)  Anyway, on a hunch, a friend and I were hoping NetBSD didn't 
>look at the ending cylinder entry (1023) of the partition table.  Next I 
>calculated the length of the partition from 1000-2100, put this into the 
>partition table using the disk editor.  The numbers weren't consistent in 
>the parition table, but DOS ignored the Non-DOS partition, NetBSD was 
>happy...and we've (DOS, NetBSD and my remaining hair) all lived happily 
>ever after....
>
Your advice was very helpful.  I ended up using 0-1015 (500meg for DOS)
and 1016-1022 (actually 1016-2448 for NetBSD).  It got rid of the bad
geometry error and created the disklabel and wd0 partitions where it
should... not stomping DOS.

Now, however, I am seeing one other problem I hope you may have run into.
When I do the install, it reports that "wd0 does not have a disklabel",
but then proceeds to write the superblock and create the partitions and
/etc/fstab normally.  If I execute "disklabel wd0" after the install
completes, it shows the correct info with partitions a-e.

When I reboot with the kernel disk and invoke copy_kernel, it fails
because once again "wd0 has no disklabel".  An invocation of disklabel
at this point shows a bad disk label.

Using Norton utils, I snooped on cyl 1016 (the start of my BSD partition)
and found the disklabel on sector 2 where it should be.  For some
unknown reason however, when I reboot with the kernel it is looking on
cyl 0, sector 2 for the disklabel.  My partition table is normal with
only the two entries for bigdos (0-1015) and netbsd (1016-1022).

If I copy the disklabel to cyl 0, sect 2, the copy_kernel succeeds, but
an attempt to boot from the fixed disk (wd0) results in an infinite
loop saying "Error: c: -11134 h: -1 s: -1"  (Numbers may not be exact)
This says to me that somehow BSD is trying to access a SERIOUSLY screwed
up CHS on the disk.  Brilliant, I know. :)

Any ideas on why BSD is looking on cyl 0 for the disklabel in the
first place when the only A5 partition on the disk is pointing to
cyl 1016?

>This post has been like a recount of a horrid, horrid 2 weeks of my life.
>
Heh... and mine is getting there.  But thanks to your help and I lot
of research, trial & error, and hacking around, the problems are slowly
parting to reveal a nearly working OS. :)

>Some good did come out of it though.
>
Yeah.. I now know more about the partition table that I thought I
ever would. :)

--
Chris Piepenbring -=- jimi@rahul.net
Rotating .sig of the day club