From owner-freebsd-hackers Thu Mar 21 09:25:09 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA04196 for hackers-outgoing; Thu, 21 Mar 1996 09:25:09 -0800 (PST) Received: from ref.tfs.com (ref.tfs.com [140.145.254.251]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id JAA04157 for ; Thu, 21 Mar 1996 09:25:03 -0800 (PST) Received: (from julian@localhost) by ref.tfs.com (8.7.3/8.6.9) id OAA17486; Wed, 20 Mar 1996 14:13:57 -0800 (PST) Message-Id: <199603202213.OAA17486@ref.tfs.com> Subject: Re: Adding a damn 2nd disk To: dave@kachina.jetcafe.org (Dave Hayes) Date: Wed, 20 Mar 1996 14:13:57 -0800 (PST) From: "JULIAN Elischer" Cc: jkh@time.cdrom.com, freebsd-hackers@freebsd.org In-Reply-To: <199603202106.NAA05989@kachina.jetcafe.org> from "Dave Hayes" at Mar 20, 96 01:06:12 pm X-Mailer: ELM [version 2.4 PL25 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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