From owner-freebsd-geom@FreeBSD.ORG Mon Nov 14 09:19:13 2005 Return-Path: X-Original-To: geom@freebsd.org Delivered-To: freebsd-geom@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B3F116A41F; Mon, 14 Nov 2005 09:19:13 +0000 (GMT) (envelope-from simon@eddie.nitro.dk) Received: from eddie.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6D6C43D45; Mon, 14 Nov 2005 09:19:12 +0000 (GMT) (envelope-from simon@eddie.nitro.dk) Received: by eddie.nitro.dk (Postfix, from userid 1000) id 9EE27119C50; Mon, 14 Nov 2005 10:19:11 +0100 (CET) Date: Mon, 14 Nov 2005 10:19:11 +0100 From: "Simon L. Nielsen" To: Dario Freni Message-ID: <20051114091911.GD64196@eddie.nitro.dk> References: <20051027200448.1ba236fe.cpressey@catseye.mine.nu> <43753528.7030802@freesbie.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eqp4TxRxnD4KrmFZ" Content-Disposition: inline In-Reply-To: <43753528.7030802@freesbie.org> User-Agent: Mutt/1.5.11 Cc: Chris Pressey , geom@freebsd.org, current@freebsd.org Subject: Re: fdisk(8) no longer capable of altering geometry X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2005 09:19:13 -0000 --eqp4TxRxnD4KrmFZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2005.11.12 01:19:52 +0100, Dario Freni wrote: > My little follow-up to this issue. This bug is quite critical on=20 > products using bsdinstaller such as FreeSBIE or pfSense. I heard rumours= =20 > that PC-BSD also encounter this problem and had to workaround it by=20 > sysinstall. >=20 > Can somebody please take a look at it? Just curious... why do you need to alter the geometry? I never once had a problem just ignoring the fact that fdisk/sysinstall warned about geometry... > Chris Pressey wrote: > >[this is a follow-up to / correction of my post to geom@ a few days ago, > >to which there was no reply] > > > >Hello, > > > >It appears that fdisk(8) is no longer capable of altering the geometry > >of a disk. (By which I mean, the kernel's idea of the BIOS'es idea of > >the geometry, of course.) I'd find it reassuring to know whether or not > >anyone else is seeing the same behaviour, before I go the official route > >and file a PR. > > > >Initially I thought that this failure case was only for uninitialized > >disks, but I have tried further tests and I can't get fdisk(8) to change > >the geometry in any of the cases. These cases are: > > > >a. uninitialized, totally blank disk (dd if=3D/dev/zero of=3D/dev/ad1 ..= =2E) > >b. initialized disk with FreeBSD (or any other OS) installed on it > >c. same as b, but with its root partition mounted on /mnt > >d. the disk containing the currently booted FreeBSD system > > (mounted on /, of course) > > > >In each of these cases, I tried a sequence like the following: > > > > fdisk -BI ad1 > > fdisk -u ad1 > > > say yes, and plug in different but compatible values for cylinders, > > heads, and sectors/track> > > > > fdisk ad1 > > > > > >The behaviour I see is, in summary: > > > >a & b: fdisk issues the warning "fdisk: Geom not found" which presumably > > refers to the fact that there is no GEOM MBR provider for that > > disk. It then falls back to the legacy behaviour of raw-writing > > the partition table into sector zero of the disk. This does not, > > however, trigger an update of the kernel's idea of the geometry. > > > >c & d: no "Geom not found" warning, but no change in geometry either. > > > >I don't see this behaviour on DragonFly; cases a and b work as you would > >logically expect (as they worked in 4.x, AFAIR, but I have not yet > >tested this) where the geometry does get changed, and subsequent runs of > >fdisk report the changed geometry. > > > >In cases c & d, the behaviour is the same as FreeBSD - nothing changes.= =20 > >This is not too surprising, since the disk _is_ in use - but an error > >message would probably make more sense. > > > >This bug is one of the few remaining things standing in the way of > >porting the BSD Installer to FreeBSD. Without some way of altering the > >the geometry, it can't install onto a system whose BIOS misreports the > >disk geometry. > > > >My analysis of the problem can be found in my previous post to geom@, > >but to sum it up: I think fdisk needs to inform GEOM somehow that the > >geometry should be changed. It might need to trigger the creation of a > >GEOM MBR provider for the disk before it does so; but I'm not certain of > >any of this, since my knowledge of GEOM is slim at best. > > > >Hopefully someone more familiar with GEOM and such under -CURRENT is > >listening and can shed more light on this problem and/or provide a > >workaround and/or explain how I'm wrong and show me the right way to do > >what I'm trying to do (change geometry) in -CURRENT. > > > >Thanks for your time, --=20 Simon L. Nielsen --eqp4TxRxnD4KrmFZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDeFaOh9pcDSc1mlERApVUAKC5BlsBmQytKiE+256TVsaBrqEf7wCghcpm ZZM4yUfAPcP2ExjQ8ukaIDw= =TG5M -----END PGP SIGNATURE----- --eqp4TxRxnD4KrmFZ--