Date: Sat, 02 Nov 2002 20:33:43 +0100 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: John Hay <jhay@icomtek.csir.co.za> Cc: imp@bsdimp.com (M. Warner Losh), current@freebsd.org Subject: Re: fdisk -BI ob clean disk broken Message-ID: <99421.1036265623@critter.freebsd.dk> In-Reply-To: Your message of "Sat, 02 Nov 2002 21:25:08 %2B0200." <200211021925.gA2JP8IY010112@zibbi.icomtek.csir.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200211021925.gA2JP8IY010112@zibbi.icomtek.csir.co.za>, John Hay wri
tes:
>> : 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.
>>
>> 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.
>
>Hmmm. I just noticed that the disks probe with zero values for the
heads, sectors/track and cylinders. I have tried two different USB
>CF readers and both do it. On 4.x it probes with the correct values
>on the same machine and the same devices. So why do they probe
>wrong?
I have no idea either, but the answer must be somewhere in the da driver...
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
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?99421.1036265623>
