Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Nov 2011 10:24:59 -0800
From:      Robert <>
To:        Warren Block <>
Cc:        "Julian H. Stacey" <>,
Subject:   Re: Invalid fdisk partition table found (fwd)
Message-ID:  <20111128102459.22b40d36@dell64>
In-Reply-To: <>
References:  <> <20111124113938.2d99eec2@dell64> <> <20111125095457.477e9501@dell64> <> <20111126135557.56f4ea06@dell64> <> <20111128055529.2cd89955@dell64> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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,

/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,

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

Thanks for you help.


Want to link to this message? Use this URL: <>