From owner-freebsd-questions@FreeBSD.ORG Mon Nov 28 13:55:35 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 492F8106564A for ; Mon, 28 Nov 2011 13:55:35 +0000 (UTC) (envelope-from traveling08@cox.net) Received: from fed1rmfepo201.cox.net (fed1rmfepo201.cox.net [68.230.241.146]) by mx1.freebsd.org (Postfix) with ESMTP id 1D9478FC14 for ; Mon, 28 Nov 2011 13:55:35 +0000 (UTC) Received: from fed1rmimpo109.cox.net ([68.230.241.158]) by fed1rmfepo201.cox.net (InterMail vM.8.01.04.00 201-2260-137-20101110) with ESMTP id <20111128135534.BLPK13563.fed1rmfepo201.cox.net@fed1rmimpo109.cox.net>; Mon, 28 Nov 2011 08:55:34 -0500 Received: from dell64 ([72.220.91.219]) by fed1rmimpo109.cox.net with bizsmtp id 2dva1i0054jy6EY03dvaxH; Mon, 28 Nov 2011 08:55:34 -0500 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A02020B.4ED392D6.010E,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=1.1 cv=F/S3dXrHddD3zhv5Bsc7oD2RewBuymM26VWqFKxPV+0= c=1 sm=1 a=d5xdBJzwzI4A:10 a=G8Uczd0VNMoA:10 a=kj9zAlcOel0A:10 a=olICo1sKaMXbpqbYUd6B5g==:17 a=s1O25tkdAAAA:8 a=X883BbCubS0VGw0p_CsA:9 a=rpOz6QPSehs3qc3VjNIA:7 a=CjuIK1q_8ugA:10 a=OyOq_G8mXAEA:10 a=olICo1sKaMXbpqbYUd6B5g==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; none Date: Mon, 28 Nov 2011 05:55:29 -0800 From: Robert To: Warren Block Message-ID: <20111128055529.2cd89955@dell64> In-Reply-To: References: <201111241116.pAOBGH4i098240@fire.js.berklix.net> <20111124113938.2d99eec2@dell64> <20111125095457.477e9501@dell64> <20111126135557.56f4ea06@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 13:55:35 -0000 On Sat, 26 Nov 2011 19:07:57 -0700 (MST) Warren Block wrote: > On Sat, 26 Nov 2011, Robert wrote: > > > Some difference today. Not sure at what point this happened but one > > of my CF cards now reads: > > > > [robert@dell64] ~> fdisk /dev/da1 > > ******* Working on device /dev/da1 ******* > > parameters extracted from in-core disklabel are: > > cylinders=2057 heads=255 sectors/track=63 (16065 blks/cyl) > > > > Figures below won't work with BIOS for partitions not in cyl 1 > > parameters to be used for BIOS calculations are: > > cylinders=2057 heads=255 sectors/track=63 (16065 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 63, size 33045642 (16135 Meg), flag 80 (active) > > beg: cyl 0/ head 1/ sector 1; > > end: cyl 8/ head 254/ sector 63 > > The data for partition 2 is: > > > > The data for partition 3 is: > > > > The data for partition 4 is: > > > > > > Now showing 16GB but still not right. > > > ... > > I also did this in single user with the same results. Ideally, I > > would like to change these cards to FAT32 but I cannot get there > > with fdisk and am not sure how to get there with gpart or if I can. > > Creating an MS-DOS layout with gpart(8), where the disk is da0: > > # gpart destroy -F da0 > da0 destroyed > # gpart create -s mbr da0 > da0 created > # gpart add -t "\!11" da0 > da0s1 added Warren, Thanks for hanging in there with me. I am about ready to give up, but here is where everything stands now. [robert@dell64] ~> gpart destroy -F da1 da1 destroyed [robert@dell64] ~> sudo gpart create -s mbr da1 Password: da1 created [robert@dell64] ~> sudo gpart add -t "\!11" da1 da1s1 added [robert@dell64] ~> gpart show da1 => 32 60448 da1 MBR (29M) 32 60448 1 fat32 (29M) [robert@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 [robert@dell64] ~> sudo mount_msdosfs /dev/da1s1 /mnt mount_msdosfs: /dev/da1s1: Invalid argument [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: The data for partition 3 is: The data for partition 4 is: [robert@dell64] ~> sudo gpart destroy da1 Password: gpart: Device busy [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) [robert@dell64] ~> gpart show da1 gpart: No such geom: da1. [robert@dell64] ~> Now I lost the info that I created with gpart. > > 11 is 0x0b, the FAT32 partition type. There might be a more mnemonic > string for it, this is the first time I've ever used gpart for FAT32. > The exclamation is for gpart/GPT, and the backslash is to keep the > shell from messing with it. > > # gpart show da0 > => 63 15662997 da0 MBR (7.5G) > 63 15662997 1 fat32 (7.5G) > > # ls /dev/da0* > /dev/da0 /dev/da0s1 > # newfs_msdos -F32 /dev/da0s1 > > fdisk(8) may be easier, just set the partition type to 11. > > > I haven't had any luck with the second CF card as it still show > > 29MB. I will try some more later today or tomorrow. > > What happened to make the one card show 16G? I wish I knew :-). I was doing everything that you and Julian suggested and somewhere along the line it started showing 16G. Yesterday I got it to show FAT32 (tyoe 12) along with 16G but on da1 without a s1. I then put it in a WinXP box but it did not even bring up the drive. When I put it back in the FreeBSD box it was back to 28MB. This is the card that I show above. It acts like there is some sort of write protect on sector 1 or the cards are defective. Robert