From owner-freebsd-questions@FreeBSD.ORG Mon Nov 28 18:25:16 2011 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCCA51065672 for ; Mon, 28 Nov 2011 18:25:16 +0000 (UTC) (envelope-from traveling08@cox.net) Received: from fed1rmfepo203.cox.net (fed1rmfepo203.cox.net [68.230.241.148]) by mx1.freebsd.org (Postfix) with ESMTP id 9FA198FC0A for ; Mon, 28 Nov 2011 18:25:16 +0000 (UTC) Received: from fed1rmimpo306.cox.net ([68.230.241.174]) by fed1rmfepo203.cox.net (InterMail vM.8.01.04.00 201-2260-137-20101110) with ESMTP id <20111128182516.HOOS3756.fed1rmfepo203.cox.net@fed1rmimpo306.cox.net>; Mon, 28 Nov 2011 13:25:16 -0500 Received: from dell64 ([72.220.91.219]) by fed1rmimpo306.cox.net with bizsmtp id 2iQ31i0034jy6EY03iQEp4; Mon, 28 Nov 2011 13:24:14 -0500 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020207.4ED3D20C.004C,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=1.1 cv=dLinpSRpD/siYDweLtUcKy2MkOOT9IlUWnc+SxVPJKw= c=1 sm=1 a=d5xdBJzwzI4A:10 a=G8Uczd0VNMoA:10 a=kj9zAlcOel0A:10 a=olICo1sKaMXbpqbYUd6B5g==:17 a=s1O25tkdAAAA:8 a=FP58Ms26AAAA:8 a=MIfkwVlS0rUi0M9WN2UA:9 a=gcLWoOaI3B4QwsxNfFkA:7 a=CjuIK1q_8ugA:10 a=OyOq_G8mXAEA:10 a=XknJSLZ3t7eeBfoZ:21 a=pw2gdQ_REBWwyEHj:21 a=olICo1sKaMXbpqbYUd6B5g==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; none Date: Mon, 28 Nov 2011 10:24:59 -0800 From: Robert To: Warren Block Message-ID: <20111128102459.22b40d36@dell64> In-Reply-To: References: <201111241116.pAOBGH4i098240@fire.js.berklix.net> <20111124113938.2d99eec2@dell64> <20111125095457.477e9501@dell64> <20111126135557.56f4ea06@dell64> <20111128055529.2cd89955@dell64> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "Julian H. Stacey" , questions@freebsd.org Subject: Re: Invalid fdisk partition table found (fwd) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 18:25:16 -0000 On Mon, 28 Nov 2011 08:02:55 -0700 (MST) Warren Block wrote: > On Mon, 28 Nov 2011, Robert wrote: > > > Thanks for hanging in there with me. I am about ready to give up, > > but here is where everything stands now. > > Before giving up, a few more suggestions. First, check the BIOS > settings. It's possible the computer has a BIOS that "protects" the > boot block from viruses by making it read-only. Second, sudo is not > the same as being root, there are differences. So I'd also suggest > trying these as root, just in case. > I saw nothing in BIOS to suggest any protection. I am doing the testing on a Dell Precision 490. I did discover that an external card reader I was using on the Windows XP computer is defective. It had a bent pin and another recessed pin. I hope that is not what damaged these cards. > > Have these cards > been heavily used to the point where they may be failing? I couldn't say for sure but I am waiting for answers from the photographer/owner about other questions. She does take an incredible amount of photos so I would guess they have been used and clear many times. > > If the card is failing, I'd expect there to be something in > /var/log/messages. Nothing shows in /var/log/messages > For that matter, even sysutils/smartmontools > might work on these. [root@dell64] ~# smartctl /dev/da1 smartctl 5.42 2011-10-20 r3458 [FreeBSD 8.2-STABLE amd64] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net /dev/da1: Unknown USB bridge [0x0644:0x0200 (0x400)] Smartctl: please specify device type with the -d option. > [root@dell64] ~# smartctl -d scsi -a /dev/da1 smartctl 5.42 2011-10-20 r3458 [FreeBSD 8.2-STABLE amd64] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net Vendor: TEAC Product: USB HS-CF Card Revision: 4.00 User Capacity: 30,965,760 bytes [30.9 MB] Logical block size: 512 bytes Device type: disk Local Time is: Mon Nov 28 10:20:13 2011 PST Device does not support SMART Error Counter logging not supported Device does not support Self Test logging > > [robert@dell64] ~> fdisk /dev/da1 > > Something I noticed when testing yesterday: fdisk results may not > agree with gpart until the card has been reconnected. In particular > fdisk showed the single FAT32 partition as the last instead of the > first. > > > Interesting that here the partition still exists, though. > > > [robert@dell64] ~> dd if=/dev/null of=/dev/da1 > > 0+0 records in > > 0+0 records out > > 0 bytes transferred in 0.000018 secs (0 bytes/sec) > > This didn't write anything (0+0 records). Should be > dd if=/dev/zero of=/dev/da1 bs=512 count=35 I was attempting to force another look at /dev/da1 to see any change not actually zero out anything. I did a lot of my testing in single user but switched to multi so that I could more easily cut and paste tests and results. Her are the results as root: [root@dell64] ~# gpart create -s mbr da1 da1 created [root@dell64] ~# gpart add -t "\!11" da1 da1s1 added [root@dell64] ~# gpart show da1 => 32 60448 da1 MBR (29M) 32 60448 1 fat32 (29M) [root@dell64] ~# newfs_msdos -F32 /dev/da1s1 /dev/da1s1: 60296 sectors in 7537 FAT32 clusters (4096 bytes/cluster) BytesPerSec=512 SecPerClust=8 ResSectors=32 FATs=2 Sectors=60448 Media=0xf0 SecPerTrack=32 Heads=64 HiddenSecs=0 FATsecs=59 RootCluster=2 FSInfo=1 Backup=2 At this point I removed the card and using a different external card reader placed it in the WinXP system. Windows said the card was not formatted and asked. I attempted to format but windows failed saying the card could not be formatted. I put it back in FreeBSD system and here is what I see. [root@dell64] ~# gpart show da1 => 32 60448 da1 MBR (29M) 32 60448 1 fat32 (29M) [root@dell64] ~# mount_msdosfs /dev/da1s1 /mnt mount_msdosfs: /dev/da1s1: Invalid argument [root@dell64] ~# gpart show da1 => 32 60448 da1 MBR (29M) 32 60448 1 fat32 (29M) > > > It acts like there is some sort of write protect on sector 1 > > This is what made me think of a BIOS virus-protect mentioned above. > Hopefully that's the problem. > > > or the cards are defective. > > It's worth contacting the manufacturer. Maybe they have a reset or > reformat program. If you do get to the point of discarding the > cards, I'd be interested in experimenting on them. I will spend some time today or tomorrow on the manufacturer's chat. If I do give it up and it is OK with the owner I will contact you offline. Thanks for you help. Robert