Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Nov 2002 21:25:08 +0200 (SAT)
From:      John Hay <jhay@icomtek.csir.co.za>
To:        imp@bsdimp.com (M. Warner Losh)
Cc:        current@freebsd.org, phk@freebsd.org
Subject:   Re: fdisk -BI ob clean disk broken
Message-ID:  <200211021925.gA2JP8IY010112@zibbi.icomtek.csir.co.za>
In-Reply-To: <20021102.111356.12003004.imp@bsdimp.com> from "M. Warner Losh" at "Nov 2, 2002 11:13:56 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> : 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?

#########
umass0: SanDisk ImageMate CF-SD, rev 1.10/0.12, addr 2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <SanDisk ImageMate CF-SD1 0100> Removable Direct Access SCSI-0 device 
da0: 1.000MB/s transfers
da0: 61MB (125440 512 byte sectors: 0H 0S/T 0C)
umass0: at uhub0 port 1 (addr 2) disconnected
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): removing device entry
umass0: detached
umass0: SanDisk Corporation ImageMate CompactFlash USB, rev 1.10/0.09, addr 2
umass0: Get Max Lun not supported (STALLED)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <SanDisk ImageMate II 1.30> Removable Direct Access SCSI-2 device 
da0: 1.000MB/s transfers
da0: 61MB (125441 512 byte sectors: 0H 0S/T 0C)
###########

John
-- 
John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org

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?200211021925.gA2JP8IY010112>