Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 1995 01:33:38 -0800
From:      David Lim <lim@telerobotics.jpl.nasa.gov>
To:        krnlhkr@mcs.com, questions@FreeBSD.org
Cc:        lim@brian.jpl.nasa.gov
Subject:   Re: [Q] FreeBSD 2.0R - fdisk is non-destructive?
Message-ID:  <199502230933.BAA10512@brian.jpl.nasa.gov>
In-Reply-To: <m0rgoBa-000kQ0C@mailbox.mcs.com> (krnlhkr@mcs.com)

next in thread | previous in thread | raw e-mail | index | archive | help

   From: krnlhkr@mcs.com
   Date: Tue, 21 Feb 95 00:35 CST
   X-Mailer: AIR Mail 3.X (SPRY, Inc.)


   <---- Begin Included Message ---->

   I just installed FreeBSD 2.0-R from the Walnut CD-ROM on a 1 Gbyte drive. I
   created two slices one for DOS and one for FreeBSD. When I boot DOS, I run
   fdisk, and it shows the slice sizes correctly. However, the DOS dir command
   still reports free space relative to the entire disk. E.g. it says 100 Mbytes
   used, 900 Mbytes free. Is this just a DOS bug of some sort? I'm worried that
   DOS will overwrite sectors assigned to FreeBSD.

   <---- End Included Message ---->

An additional piece of information. When I first partitioned the FreeBSD
slice, I first imported the MS-DOS slice to partition e. However, when I do a
df under FreeBSD, it shows the same incorrect information as the DOS DIR
command. df shows my /dev/sd0e (MS-DOS slice) as having a capacity the size of
the entire disk!

   This may seem stupid, but are you running Stacker or something
   like it?

No I'm not running Stacker.

   If not, check to see if the BIOS says you have more than 1024
   cylinders.  If it does, you may have to upgrade your BIOS
   or run a TSR that comes with the drive.  DOS can't see more
   than 1024 cylinders, and may get confused.

I include the output from DOS fdisk, dmesg, /sbin/fdisk, and /sbin/disklabel
below. DOS says I have less than 1024 cylinders, although the dmesg shows the
disk reporting a real geometry of 2756 cyl. I did use the geometry reported by
DOS in the FreeBSD install. You can see this in the data from disklabel and
/sbin/fdisk. 

   One way around this is to put DOS completely in the first 1024 cylinders.
   This way if ncyl % 1024 is stored in the partition table, it will be
   correct for DOS.

I believe I have DOS in the first 1024 cylinders.

   That's my best guess without knowing exactly what you have.

My hardware is as follows:
Micron brand machine
Pentium 90 MHz
Neptune chipset
Buslogic BT946C PCI SCSI card
Conner 1Gbyte drive (you can see its geometry in the messages below)
Plextor 4X CD-ROM
Diamond Stealth 2Mbyte VRAM

   -Louis

   ----------------------------------------------------------------------
   Louis J. Giliberto, Jr.    !  Support the Free Software Foundation
   krnlhkr@mcs.com            !
   ----------------------------------------------------------------------

I've looked through the FAQ and searched through the mailing list archives.
The only thing I've come up with is the SCSI card setting for 1 Gbyte drives.
I have this turned ON on the Buslogic card. Perhaps I should turn it off? I
tried turning it off, and tried booting (no reinstall) both DOS and FreeBSD,
they both still had the same problem, showing the MSDOS partition occupying
the entire drive.  Perhaps I should turn it off and reinstall all of FreeBSD
and Windows/DOS?  Perhaps I should use the real geometry of the drive, and
just make sure that the partition of DOS resides within 1024 cylinders again
using the real geometry of the drive? This just doesn't sound quite right to
me.

So I guess fdisk is destructive? Everyone who has partitioned their disk to
install FreeBSD, had to re-install DOS and windows?

I seem to recall a message someplace saying that some Conner drives have some
sort of auto-translation of the cylinders? And that some special care needs to
be taken when writing the MBR code? Unfortunately I can't seem to track down
this message. 

---------------------------------------------------------------------------
--- Output of DOS fdisk
  Partition	Status	Type	Volume Label	Mbytes	System	Usage
C:  1		  A	PRI-DOS	Micron		501	FAT16	49%
    2			non-DOS			512		51%
---------------------------------------------------------------------------
--- Output of tools\dos-tools\pfdisk 0
geometry 1013 64 32 (cyl hd sec)
#	ID	First (cyl)	Last (cyl)	Nmae	#start, length
1	6	0		500		Dosbi	32,1026016
2	165	501		1012		unkno	1026048,1048576
---------------------------------------------------------------------------
--- Output of dmesg
FreeBSD 2.0-RELEASE #2: Tue Nov 22 13:59:59  1994
    root@fnord.cdrom.com:/usr/src/sys/compile/GENERIC
CPU: Pentium (Pentium-class CPU) 89 MHz  Id = 0x524  Origin = "GenuineIntel"
real memory  = 16384000 (4000 pages)
avail memory = 14929920 (3645 pages)
using 290 buffers containing 2379776 bytes of memory
Probing for devices on the ISA bus:
sc0 at 0x60-0x6f irq 1 on motherboard
sc0: VGA color <4 virtual consoles>
ed0 not found at 0x280
ed1 not found at 0x300
sio0 at 0x3f8-0x3ff irq 4 on isa
sio0: type 16550A
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16550A
sio2 not found at 0x3e8
sio3 not found at 0x2e8
lpt0 at 0x378-0x37f irq 7 on isa
lpt0: Interrupt-driven port
lp0: TCP/IP capable interface
lpt1 not found at 0xffffffff
lpt2 not found at 0xffffffff
fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
fdc0: [0: fd0: 1.44MB 3.5in]
wdc0 not found at 0x1f0
wdc1 not found at 0x170
bt0: Bt946C/ 0-PCI/EISA/VLB(32bit) bus
bt0: reading board settings, busmastering, int=15
bt0: version 4.24, sync, parity, 32 mbxs, 32 ccbs
bt0: targ 0 sync rate=10.00MB/s(100ns), offset=15
bt0: targ 6 sync rate= 4.54MB/s(220ns), offset=15
bt0: Enabling Round robin scheme
bt0 at 0x330 irq 15 on isa
bt0 waiting for scsi devices to settle
bt0 targ 0 lun 0: type 0(direct) fixed SCSI2
bt0 targ 0 lun 0: <CONNER  CFP1060S 1.05GB 2035>
sd0: 1013MB (2074880 total sec), 2756 cyl, 8 head, 94 sec, bytes/sec 512
bt0 targ 6 lun 0: type 5(readonly) removable SCSI2
bt0 targ 6 lun 0: <PLEXTOR CD-ROM PX-4XCS  1.01>
cd0: cd present.[145069 x 2048 byte records]
uha0 not probed due to I/O address conflict with bt0 at 0x330
ahc0 not found
ahb0 not found
aha0 not probed due to I/O address conflict with bt0 at 0x330
aic0 not found at 0x340
pas0 not found at 0x1f88
sea0 not found
wt0 not found at 0x300
mcd0: timeout getting status
mcd0 not found at 0x300
mcd1: timeout getting status
mcd1 not found at 0x340
ie0 not found at 0x360
ep0 not found at 0x300
is0 not found at 0x280
le0: no board found at 0x300
le0 not found at 0x300
ze0 not found at 0x300
npx0 on motherboard
pci0: scanning device 0..15, mechanism=2.
chip0 <intel 82434LX pci cache memory controller> on pci0:0
chip1 <intel 82378IB pci-isa bridge> on pci0:2
pci0:3: vendor=0x1095, device=0x640, class=storage [not supported]
	map(10): io(1f0)
	map(14): io(3f4)
	map(18): io(170)
	map(1c): io(374)
pci0:13: vendor=0x104b, device=0x1040, class=storage [not supported]
	map(10): io(fcfc)
graphics0 <display device> on pci0:14
changing root device to sd0a
---------------------------------------------------------------------------
--- Output of /sbin/disklabel
# /dev/rsd0a:
type: SCSI
disk: 
label: MBR based label
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 1013
rpm: 0
interleave: 0
trackskew: 0
cylinderskew: 0
headswitch: 0		# milliseconds
track-to-track seek: 0	# milliseconds
drivedata: 0 

8 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:    51200  1026048    4.2BSD     1024  8192    16 	# (Cyl.  501 - 525)
  b:    65536  1077248      swap                    	# (Cyl.  526 - 557)
  c:  1048576  1026048    unused        0     0       	# (Cyl.  501 - 1012)
  d:  2074880        0    unused        0     0       	# (Cyl.    0 - 1013*)
  e:  1026016       32     MSDOS                    	# (Cyl.    0*- 500*)
  g:   931840  1142784    4.2BSD     1024  8192    16 	# (Cyl.  558 - 1012)
Warning, revolutions/minute 0
super block size 0
---------------------------------------------------------------------------
--- Output of /sbin/fdisk
******* Working on device /dev/rsd0a *******
parameters extracted from in-core disklabel are:
cylinders=1013 heads=64 sectors/track=32 (2048 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=1013 heads=64 sectors/track=32 (2048 blks/cyl)

Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 0 is:
sysid 6,(Primary 'big' DOS (> 32MB))
    start 32, size 1026016 (500 Meg), flag 80
	beg: cyl 0/ sector 1/ head 1;
	end: cyl 500/ sector 32/ head 63
The data for partition 1 is:
sysid 165,(386BSD)
    start 1026048, size 1048576 (512 Meg), flag 0
	beg: cyl 501/ sector 1/ head 0;
	end: cyl 1012/ sector 32/ head 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199502230933.BAA10512>