From owner-freebsd-questions@FreeBSD.ORG Mon Feb 2 19:13:44 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0E32106564A for ; Mon, 2 Feb 2009 19:13:44 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id 888E18FC13 for ; Mon, 2 Feb 2009 19:13:44 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id n12JCFrS022993; Mon, 2 Feb 2009 14:12:15 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id n12JCEIZ022992; Mon, 2 Feb 2009 14:12:14 -0500 (EST) (envelope-from jerrymc) Date: Mon, 2 Feb 2009 14:12:14 -0500 From: Jerry McAllister To: Mel , freebsd-questions@freebsd.org Message-ID: <20090202191214.GA22919@gizmo.acns.msu.edu> References: <20090202175619.GD1012@dell1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090202175619.GD1012@dell1> User-Agent: Mutt/1.4.2.2i Cc: Subject: Re: short-changed on SD card? 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, 02 Feb 2009 19:13:45 -0000 On Mon, Feb 02, 2009 at 12:56:19PM -0500, William Bulley wrote: > According to Mel on Mon, 02/02/09 at 12:46: > > > > On Monday 02 February 2009 07:52:44 William Bulley wrote: > > > Recently purchased a brand new 2.0 GB secure digital (SD) card. > > > > > > When I plugged this into a USB dongle and plugged the USB dongle > > > into an available USB socket on my FreeBSD 7.0-STABLE system the > > > output from dmesg(8) reported this: > > > > > > da1: 960MB (1967616 512 byte sectors: 64H 32S/T 960C) > > > > > > This is much closer to 1.0 GB than 2.0 GB so I at once wondered > > > if I had been scammed in my purchase of this brand new SD card. > > > > > > Once I'd mounted /dev/da1s1 on /mnt, the df(1) command also reported > > > 960 MB. I then copied a 300+ megabyte file onto /mnt and then ran > > > the df(1) command again. This time it reported 1.9 GB total and > > > 1.6 GB available. WHAT IS GOING ON HERE? Am I going crazy? > > > > On a hunch, it's really 1G FAT, 1G HFS ("mac"). You could reformat it using > > fdisk/newfs. > > That might be a good hunch, but the SD card itself just says "2.0 GB" on the > outside - no mention there or when I purchased it to have any Mac-ness. > > I don't recall seeing anything Mac-ish when I ran the fdisk(8) command as > > % fdisk da1 > > The output then seemed to correctly reflect that partition (slice) one (1) > was 960 MB in size. I tried later (once the system had recovered and the > fsck(8) had finished) to use fdisk(8) to put 1920 MB into slice one. But > that didn't seem to work. I marked all the other three slices as "UNUSED". > Is there any trick to using fdisk(8) that is hidden in the man page which > I evidently missed? I used the "-i" flag and it led me by the had through > each slice - I thought I did the "right" thing, but I was never able to > mount(8) the SD card after that, even though dmesg(8) reported "da1" as > being there. I kept getting "invalid parameter" or the like when I tried > mounting as I am used to: > > # mount_msdosfs -l /dev/da1s1 /mnt > > I also tried: > > # mount_msdosfs -l /dev/da1 /mnt > > But both versions failed. Finally, in desperation, I formatted the SD card > on a Windows XP laptop. Windows put it back into FAT shape (using the low > level - not the "quick" - format there) and gave it 960 MB, sigh... :-( I am a little lost here and haven't tried a lot on USB devices yet - though I haven't had these kind of problems. But, after doing the fdisk stuff and before trying to mount, did you do a newfs? Another thing would be to try the old dd if=/dev/zero of=/dev/da1 bs=512 count=1024 and see if it will write to it and wipe enough stuff to free it up. Up the count if you think it makes any difference. ////jerry > > Regards, > > web... > > -- > William Bulley Email: web@umich.edu > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"