Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Dec 1999 16:00:35 -0600
From:      "Bruce DeVault" <internal@intechsoft.net>
To:        "Robert A Clarks" <raclark@regence.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Maxtor 40GB HD
Message-ID:  <003501bf48da$25907dc0$0c01a8c0@wkbruce>
References:  <8825684A.0060C8A7.00@notes.or.regence.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> Bruce,
>      I'm not likely to be the person with a solution to this one, but
could you
> post the LBA and CHS geometries for the disks in question?
>
>      I'm curious to see how big the values get with the various setups.
>
>      (I'm putting a system together myself, and would like to be
prepared.)

What follows is my original question, apologies for those that have already
seen it...

--- cut here ---

I've been real problems adding a couple of hard drives to a server that
we've otherwise had no problems with, and I have to appeal for help with
this one.

The server prior to adding the hard drives was an AMD K6/2-300 with 32MB of
RAM and an IDE 4 gig hard drive, running 3.3-STABLE cvsup'd as of last week
from a clean install. The kernel is the GENERIC kernel, with IPDIVERT and
IPFIREWALL enabled.

We recently purchased two IBM Deskstar DPTA-373420 34.2 GB hard drives. The
top of the drives reads: P/N: 31L9060, LBA: 66,835,440, RPM: 7200, MLC:
842312 CHS: 16383/16/63.

I installed the two drives as master and slave on the secondary IDE
controller. They weren't detected with the right size by the BIOS, so I
upgraded the BIOS to the latest code from the motherboard manufacturer's
website, and they then detected perfectly. I set the BIOS for LBA, and it
showed: size: 34,219MB cyl: 4160, head: 255, precomp: 0, landz: 16380, sect:
63.

On bootup, the drives appeared as "wd2" and "wd3" as expected in BSD.  The
kernel on bootup detects the drives as:

wdc1 at 0x170-0x177 irq 15 on isa
wdc1: unit 0 (wd2): <IBM-DPTA-373420>
wd2: 32634MB (66835440 sectors), 66305 cyls, 16 heads, 63 S/T, 512 B/S
wdc1: unit 1 (wd3): <IBM-DPTA-373420>
wd3: 32634MB (66835440 sectors), 66305 cyls, 16 heads, 63 S/T, 512 B/S

I tried to install the drives using /stand/sysinstall, and fdisk'd them with
"use entire disk", dangerously dedicated. After some time I determined that
"use entire disk" overrides the manual setting of the geometry, which starts
off being something totally inappropriate, so I followed the recommendation
on the FAQ, and fdisk'd both drives with Windows 98, and formatted them as
MS-DOS FAT32 partitions. Both drives fdisk'd to the right size under DOS and
formatted with no bad sectors.

I went back into BSD's fdisk using /stand/sysinstall and changed the type of
the partition to 165 (FreeBSD), noted that the geometry was now detected
correctly (apparently having been set by DOS's fdisk) and all was well.

But when I use disklabel to try to install a single filesystem, like this:

Disk: wd2       Partition name: wd2s1   Free: 0 blocks (0MB)

Part    Mount            Size Newfs   Part
----    -----            ---- -----   ----    -----
wd2s1e  /ua            32632MBUFS Y

It fails with a mount error ("Invalid argument") after a lengthy time. I
tried to mount it and realized the newfs had failed, as the superblocks
weren't correct. When I run newfs manually, just like /stand/sysinstall
does, it shows:

su-2.03# newfs -b 8192 -f 1024 /dev/rwd2s1e
/dev/rwd2s1e:   66830336 sectors in 16316 cylinders of 1 tracks, 4096
sectors
        32632.0MB in 1020 cyl groups (16 c/g, 32.00MB/g, 7936 i/g)
super-block backups (for fsck -b #) at:
 32, 65568, 131104, 196640, 262176, 327712, 393248, 458784, 524320, 589856,
 655392, 720928, 786464, 852000, 917536, 983072, 1048608, 1114144, 1179680,
...a bunch deleted...
 65667104, 65732640, 65798176, 65863712, 65929248, 65994784, 66060320,
 66125856, 66191392, 66256928, 66322464, 66388000, 66453536, 66519072,
 66584608, 66650144, 66715680, 66781216,
write error: 0
newfs: wtfs: Read-only file system
su-2.03#

I can't figure out what I'm doing wrong, or what is wrong with the newfs. I
have repeated the entire procedure several times, on both drives, both with
after having used DOS's fdisk (with LBA enabled in the BIOS) and using only
BSD's utilities (both with LBA and NORMAL modes). With BSD only, the
geometry is detected incorrectly and I have to enter what the BIOS says
(4160/255/63). In between tries, I've been zeroing out the partition table
to make sure it isn't getting confused, with:

dd if=/dev/zero of=/dev/rwd2 count=1000

which seems to work well to restart things with a clean slate.

I would sure appreciate any help anyone could provide. Thank you for your
consideration of this, sorry this message is so long.

Bruce DeVault
InTech Software



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003501bf48da$25907dc0$0c01a8c0>