From owner-freebsd-current Sat Nov 2 10:15: 0 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 77C7037B404; Sat, 2 Nov 2002 10:14:59 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id B05B243E88; Sat, 2 Nov 2002 10:14:57 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id gA2IEupk071569; Sat, 2 Nov 2002 11:14:56 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 02 Nov 2002 11:13:56 -0700 (MST) Message-Id: <20021102.111356.12003004.imp@bsdimp.com> To: jhay@icomtek.csir.co.za Cc: current@FreeBSD.ORG, phk@FreeBSD.ORG Subject: Re: fdisk -BI ob clean disk broken From: "M. Warner Losh" In-Reply-To: <200211020850.gA28ohm4086473@zibbi.icomtek.csir.co.za> References: <200211020850.gA28ohm4086473@zibbi.icomtek.csir.co.za> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <200211020850.gA28ohm4086473@zibbi.icomtek.csir.co.za> John Hay writes: : On 4.x I have been using a slightly modified version of Warner's diskprep : to write new compact flashes. On -current fdisk die with signal 8 (Floating : point exception) when this part of the script runs: : : $dev = "/dev/r${drive}"; : system "/bin/dd if=/dev/zero of=$dev count=128 > /dev/null 2>&1"; : system "/sbin/fdisk -BI $drive"; : : $dev is normally da0, which is the compact flash plugged into a Sandisk : usb CF reader. : : So is there a better way in the GEOM world to achieve the same thing? The reason that I do a dd first is to obliterate any MBR that's there. The intent is to force fdisk to fetch the actual disk geometry from the disk so that the fdisk lable that is placed on there will work as a boot disk. Before I added the dd in 4.x, I found that many CF came with MBRs that didn't match their actual geometry, so when I tried to boot them, things failed. Does removing the dd eliminate the problem? If so, that's likely a bug in GEOMification of fdisk. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message