*BSD News Article 54227


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!uwm.edu!vixen.cso.uiuc.edu!news.uoregon.edu!cs.uoregon.edu!usenet.ee.pdx.edu!sirius.cs.pdx.edu!daver
From: daver@sirius.cs.pdx.edu (Dave Roethig)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Disk Partition/fdisk difference
Date: 9 Nov 1995 17:32:57 GMT
Organization: Portland State University, Portland, OR
Lines: 117
Message-ID: <47te09$5u0@walt.ee.pdx.edu>
NNTP-Posting-Host: sirius.cs.pdx.edu
X-Newsreader: TIN [version 1.2 PL2]

I'm having trouble setting the partition parameters for
a hard disk running on a 486.

The drive is a Western Digital ESDI drive with
1010 cyl, 12 heads and 55 sectors (printed on drive).
During the NetBSD install, I specified that the whole
disk (1010 cyl) was for NetBSD. (80 root, 100 swap)
I said yes to the question about automatic sector
sequencing and yes to overwriting the DOS table.

I set up the disk using DOS fdisk and Linux fdisk
using the parameters above.

NetBSD fdisk reports the following values:
 
	shawm# fdisk
	******* Working on device /dev/rwd0d *******
	parameters extracted from in-core disklabel are:
	cylinders=1010 heads=12 sectors/track=55 (660 blks/cyl)
	
	Figures below won't work with BIOS for partitions not in cyl 1
	parameters to be used for BIOS calculations are:
	cylinders=1010 heads=12 sectors/track=55 (660 blks/cyl)
	
	Warning: BIOS sector numbering starts with sector 1
	Information from DOS bootblock is:
	The data for partition 0 is:
	<UNUSED>
	The data for partition 1 is:
	<UNUSED>
	The data for partition 2 is:
	<UNUSED>
	The data for partition 3 is:
	sysid 165,(NetBSD)
	    start 0, size 50000 (24 Meg), flag 80
	        beg: cyl 0/ sector 1/ head 0;
	        end: cyl 1023/ sector 63/ head 255
	shawm# 

I used fdisk -i to change the values to reflect what
actually is there.  After rebooting, nothing happens.
(NetBSD doesn't boot).

Here's what fdisk outputs after the fdisk -i:

	shawm# fdisk
	******* Working on device /dev/rwd0d *******
	parameters extracted from in-core disklabel are:
	cylinders=1010 heads=12 sectors/track=55 (660 blks/cyl)
	
	 Figures below won't work with BIOS for partitions not in cyl 1
	parameters to be used for BIOS calculations are:
	cylinders=1010 heads=12 sectors/track=55 (660 blks/cyl)
	
	Warning: BIOS sector numbering starts with sector 1
	Information from DOS bootblock is:
	The data for partition 0 is:
	<UNUSED>
	The data for partition 1 is:
	<UNUSED>
	The data for partition 2 is:
	<UNUSED>
	The data for partition 3 is:
	sysid 165,(NetBSD)
	    start 1, size 666599 (325 Meg), flag 80
	        beg: cyl 0/ sector 2/ head 0;
	        end: cyl 1009/ sector 55/ head 11
	shawm# 

For the sake of experiment, I entered a 
	disklabel -B wd0
and then a fdisk.  The values in fdisk were returned to
the original values after the install. (1023 cyl,...)


Where does the partition actually end??
(1009 cyl, 11 head 55 sec)??

Where does the partition actually start?
(0 cyl, 0 head, 1 sec)?  or 2 sector??


What's going on here with the partitions?


Do I need to define an entry in /etc/disktab for
the disk and then used disklabel to write the label?


The reason that this came about is that I was attempting
to run Mach4/Lites on the NetBSD platform.  During the
boot up of Mach4, the paging file (swap) is scanned.
It appeared to me that the Mach4 kernel attempted to
scan the entire disk.  Because the numbers didn't agree,
it tried to scan past the end of the disk and gave an
error.  During my experiments, I was able to change the
configuration using fdisk under Linux and/or NetBSD
(or maybe even DOS), which satisfied Mach4 enough
that it would boot.  I wanted to recreate what I had done
but I had tried so many things that I forgot and I am not
able to reproduce the satisfying state.  Thus 
the questions.  I sent a note to the Mach4 group but I got
no response.  I believe however, that the problem lies
with the disk partitioning and/or NetBSD. 
Don't get me wrong, I'm an enthusiastic NetBSD user
but work is work...


Thanks for any and all help,
Dave
daver@cs.pdx.edu


P.S.  If anybody has good sources for partition 
      and boot information/explanations, I would
      be grateful for the link/reference.