From owner-freebsd-questions Tue Jul 23 14:18:09 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA14090 for questions-outgoing; Tue, 23 Jul 1996 14:18:09 -0700 (PDT) Received: from phs.k12.ar.us (garman@phs.k12.ar.us [165.29.117.2]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA14078 for ; Tue, 23 Jul 1996 14:18:04 -0700 (PDT) Received: from localhost (garman@localhost) by phs.k12.ar.us (8.6.12/8.6.12) with SMTP id QAA18816 for ; Tue, 23 Jul 1996 16:17:57 -0500 Date: Tue, 23 Jul 1996 16:17:55 -0500 (CDT) From: Jason Garman To: questions@freebsd.org Subject: discrepancy between fdisk and device names Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Augh! I just got bitten by this one... Here's my fdisk configuration: The data for partition 0 is: The data for partition 1 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 42336, size 159264 (77 Meg), flag 80 beg: cyl 21/ sector 1/ head 0; end: cyl 99/ sector 63/ head 31 The data for partition 2 is: sysid 131,(Linux filesystem) start 201600, size 1225728 (598 Meg), flag 0 beg: cyl 100/ sector 1/ head 0; end: cyl 707/ sector 63/ head 31 The data for partition 3 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 63, size 42273 (20 Meg), flag 0 beg: cyl 0/ sector 1/ head 1; end: cyl 20/ sector 63/ head 31 I had just added partition 3; it used to be a dos partition on which I stored the files so I could install FreeBSD on the first partition. Now I wanted to change it into a swap parition for FreeBSD. Since fdisk reported it as `partition 3,' naturally I erm, assumed, that cooresponded to the `3rd slice,' or `/dev/wd0s3,' so I ran disklabel on that, set up the partition and all, etc. However: slice numbers start at ONE, not ZERO like the fdisk partition numbers would lead you to believe. So now I've overwritten the first twenty megs of my Linux filesystem because of a mixup between the two numbers. Is there any way that fdisk could be fixed so that it would report the partition numbers starting at one, not zero, so they would more easily correspond with the slice numbers in the device names in /dev? Also, is there a document out there somewhere or anyone planning to do one on how to do this sort of thing (i.e. adding disks or partitions to your FreeBSD system?) If not, I'd volunteer to do one, since I think it's badly needed. Thanks, -- Jason Garman http://www.nesc.k12.ar.us/~garman/ Student, Eleanor Roosevelt High School garman@phs.k12.ar.us