Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Mar 1996 14:13:57 -0800 (PST)
From:      "JULIAN Elischer" <julian@ref.tfs.com>
To:        dave@kachina.jetcafe.org (Dave Hayes)
Cc:        jkh@time.cdrom.com, freebsd-hackers@freebsd.org
Subject:   Re: Adding a damn 2nd disk
Message-ID:  <199603202213.OAA17486@ref.tfs.com>
In-Reply-To: <199603202106.NAA05989@kachina.jetcafe.org> from "Dave Hayes" at Mar 20, 96 01:06:12 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Ok timew to end the name-calling...
let's get down to teh technical quesions..
> 
> 
> Fine, I suck. Now can you point me in the direction of why fdisk 
> fails? 
> 
fdisk is a very simple program..
it opens a file that happens to be a disk raw device,
and does an ioctl to get some starting info on that disk. 
It then reads the first 512 bytes of the file
and interprets it as a structure...
it goes through an edit phase, that allows you to change values
in that structure, and then writes it back to the disk..

The only thing that needs any special knowledge is the ioctl to try read the
disklabel for the drive.

As far as the structure is concerned:
it's an array of 4 structs, one per slice
each struct has a start and size field, as well as sec/cyl/head
versions of the start and end, calculated out using the
BIOS idea of the geometry.. As FreeBSD can't easily tell what the
BIOS geometry is, it will hope that the disklabel has the same geo, but
will ask you to confirm or correct it..


it really IS a very simple program...
if it went wrong, it suggests that maybe the wrong device was pointed to?
it will happily put a partition table on any device, even the wrong one....

As you haven't told us what goes wrong, I can't begin to guess what 
the probelm was...

julian



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