Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Nov 2002 11:13:56 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        jhay@icomtek.csir.co.za
Cc:        current@FreeBSD.ORG, phk@FreeBSD.ORG
Subject:   Re: fdisk -BI ob clean disk broken
Message-ID:  <20021102.111356.12003004.imp@bsdimp.com>
In-Reply-To: <200211020850.gA28ohm4086473@zibbi.icomtek.csir.co.za>
References:  <200211020850.gA28ohm4086473@zibbi.icomtek.csir.co.za>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200211020850.gA28ohm4086473@zibbi.icomtek.csir.co.za>
            John Hay <jhay@icomtek.csir.co.za> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021102.111356.12003004.imp>