From owner-freebsd-stable Mon Jun 17 18:11:59 2002 Delivered-To: freebsd-stable@freebsd.org Received: from empty1.ekahuna.com (empty1.ekahuna.com [198.144.200.196]) by hub.freebsd.org (Postfix) with ESMTP id A129F37B423; Mon, 17 Jun 2002 18:11:47 -0700 (PDT) Received: from pc-02 (pc02.ekahuna.com [198.144.200.197]) by empty1.ekahuna.com (Post.Office MTA v3.5.3 release 223 ID# 0-0U10L2S100V35) with ESMTP id com; Mon, 17 Jun 2002 18:08:18 -0700 From: "Philip J. Koenig" Organization: The Electric Kahuna Organization To: stable@FreeBSD.ORG Date: Mon, 17 Jun 2002 18:08:18 -0700 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: fdisk seems broken for slices above cyl 1023 Reply-To: pjklist@ekahuna.com Cc: Greg 'groggy' Lehey In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.12c) Message-ID: <20020618010818534.AAA626@empty1.ekahuna.com@pc02.ekahuna.com> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Date: Mon, 17 Jun 2002 09:02:33 +0930 > From: Greg 'groggy' Lehey > > On Sunday, 16 June 2002 at 23:24:01 +0200, Hans Lambermont wrote: > > Hi, > > > > I'm battling with fdisk on a 20 GB disk with 4 slices. > > > > This is the disk: > > ad0: 19077MB [38760/16/63] at ata0-master UDMA100 > > On FreeBSD 4.6-RC #1: Sun Jun 16 2002 > > Fdisk translates the geometry to : cylinders=2584 heads=240 > > sectors/track=63 (15120 blks/cyl) > > > > This disk was partitioned during sysinstal in 4 slices: > > /dev/ad0s1 Suspend to Disk, 0.3 GB > > /dev/ad0s2 FreeBSD slice 1, 8.3 GB > > /dev/ad0s3 FreeBSD slice 2, 8.3 GB > > /dev/ad0s4 other, 2.4 GB > > (etc) > > Still 124 ?! > > > > This is seriously wrong. This looks like an fdisk bug to me. > > Yes, correct. fdisk truncates the cylinder number to 10 bits. I > looked at the code a couple of days ago, but it's such a mess that the > best thing to do would be to throw it away and start again, possibly > importing something from NetBSD or OpenBSD. If anyone does get around to re-writing that, I would like to humbly suggest that the functionality of the current fdisk, disklabel, and boot0cfg be incorporated into it. Seems silly to have all those separate utilities to deal with disk preparation - even Linux's fdisk can edit BSD disklabels. BTW, since apparently the fdisk/disklabel built into sysinstall is separate code (or is it just some kind of scripted front-end to the actual fdisk/disklabel?) - does it also suffer from this 10-bit truncation issue? Thx, Phil -- Philip J. Koenig pjklist@ekahuna.com Electric Kahuna Systems -- Computers & Communications for the New Millenium To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message