Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Invalid fdisk partition table found

255 views
Skip to first unread message

Robert

unread,
Nov 23, 2011, 3:33:47 PM11/23/11
to
Greetings

[robert@dell64] ~> uname -a
FreeBSD dell64.shasta204.local 8.2-STABLE FreeBSD 8.2-STABLE #34: Fri
Nov 18 06:43:01 PST 2011
ro...@dell64.shasta204.local:/usr/obj/usr/src/sys/GENERIC amd64

I have two Lexar Professional 600X 16GB compact flash cards that are
unusable. fdisk shows:

[robert@dell64] ~> fdisk /dev/da1
******* Working on device /dev/da1 *******
parameters extracted from in-core disklabel are:
cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl)

fdisk: invalid fdisk partition table found
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 32, size 59360 (28 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 28/ head 63/ sector 32
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

It shows only 28 MB instead of 16GB. I have tried to change the type
from 165 (FreeBSD) to msdosfs types 6 11 or 12 using fdisk -u and fdisk
-i and also "sade". I do not get and error but when finished it still
shows the same data.

I have tried to zero it out using " dd if=/dev/zero of=/dev/da1 bs=1m
and nothing changes. I have tried different block sizes and counts to
no avail.

Is there any way I can restore these CF cards to 16GB? Any help or
suggestions will be greatly appreciated.

TIA
Robert
RobertRobert
_______________________________________________
freebsd-...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"

Julian H. Stacey

unread,
Nov 23, 2011, 4:08:00 PM11/23/11
to
@ suggestions:
1 Try
bsdlabel -B -w -r /dev/da1
echo unplug, reinsert
newfs /dev/da1a

2 Base of _my_ man fdisk
" When running multi user, you cannot write unless you first run this:
sysctl kern.geom.debugflags=16
"

It looks like I never got round to sending in a send-pr for that, so feel free
looks like its been that way at ;east since 7.1.see
http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/sbin/fdisk/

Cheers,
Julian
--
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
Reply below not above, cumulative like a play script, & indent with "> ".
Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.

Carl Johnson

unread,
Nov 23, 2011, 5:53:41 PM11/23/11
to
"Julian H. Stacey" <j...@berklix.com> writes:

>
> @ suggestions:
> 1 Try
> bsdlabel -B -w -r /dev/da1
> echo unplug, reinsert
> newfs /dev/da1a
>
> 2 Base of _my_ man fdisk
> " When running multi user, you cannot write unless you first run this:
> sysctl kern.geom.debugflags=16
> "
>
> It looks like I never got round to sending in a send-pr for that, so feel free
> looks like its been that way at least since 7.1.see
> http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/sbin/fdisk/

I thought I had seen a mention of that somewhere, so I grep'ed the man
pages. I found hints on geom(4) and boot0cfg(8), but they certainly
aren't obvious.

--
Carl Johnson ca...@peak.org

Julian H. Stacey

unread,
Nov 23, 2011, 5:57:34 PM11/23/11
to
Hi,
Reference:
> From: Carl Johnson <ca...@peak.org>
> Date: Wed, 23 Nov 2011 14:53:41 -0800
> Message-id: <87bos2e...@oak.localnet>

Carl Johnson wrote:
> "Julian H. Stacey" <j...@berklix.com> writes:
>
> >
> > @ suggestions:
> > 1 Try
> > bsdlabel -B -w -r /dev/da1
> > echo unplug, reinsert
> > newfs /dev/da1a
> >
> > 2 Base of _my_ man fdisk
> > " When running multi user, you cannot write unless you first run this:
> > sysctl kern.geom.debugflags=16
> > "
> >
> > It looks like I never got round to sending in a send-pr for that, so feel free
> > looks like its been that way at least since 7.1.see
> > http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/sbin/fdisk/
>
> I thought I had seen a mention of that somewhere, so I grep'ed the man
> pages. I found hints on geom(4) and boot0cfg(8), but they certainly
> aren't obvious.

Yup, bit me too long ago, presumably from my patch, bit me at 7.1

OK I'll bung in a quick send-pr

Cheers,
Julian
--
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
Reply below not above, cumulative like a play script, & indent with "> ".
Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.

Warren Block

unread,
Nov 23, 2011, 7:08:33 PM11/23/11
to
On Wed, 23 Nov 2011, Julian H. Stacey wrote:

> 2 Base of _my_ man fdisk
> " When running multi user, you cannot write unless you first run this:
> sysctl kern.geom.debugflags=16
> "

But that's not quite correct. Setting debugflags to 16 allows writes to
a partition that's mounted, something that should not normally be
needed. It will give an error instead of allowing writes in that case.
So if writes succeeded, that wasn't the problem.

'gpart -F destroy {device}' may help recover the CF cards.

Lowell Gilbert

unread,
Nov 25, 2011, 12:50:57 PM11/25/11
to
> -i and also "sade". I do not get an error but when finished it still
> shows the same data.
>
> I have tried to zero it out using " dd if=/dev/zero of=/dev/da1 bs=1m
> and nothing changes. I have tried different block sizes and counts to
> no avail.

If you zero it out and fdisk still sees a partition table, the write
probably didn't really happen. [Modulo some possible issues with the
kernel caching the disk parameters.] fdisk is sometimes a bit quiet
about its errors, but dd isn't...
0 new messages