From owner-freebsd-questions@freebsd.org Mon Mar 16 23:37:32 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ACDA0273A00 for ; Mon, 16 Mar 2020 23:37:32 +0000 (UTC) (envelope-from claude.buisson1@free.fr) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [IPv6:2a01:e0c:1:1599::11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48hCQL3VdJz4V7b for ; Mon, 16 Mar 2020 23:37:30 +0000 (UTC) (envelope-from claude.buisson1@free.fr) Received: from localhost (unknown [IPv6:2a01:cb19:823a:b300:201:2eff:fe93:abf1]) (Authenticated sender: claude.buisson1) by smtp2-g21.free.fr (Postfix) with ESMTPSA id 09D452003BE for ; Tue, 17 Mar 2020 00:37:21 +0100 (CET) Subject: Re: SD card formatting To: freebsd-questions@freebsd.org References: From: Claude Buisson Message-ID: <8a95e209-52f1-6873-9500-9e1bdd826e18@free.fr> Date: Tue, 17 Mar 2020 00:37:21 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48hCQL3VdJz4V7b X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of claude.buisson1@free.fr has no SPF policy when checking 2a01:e0c:1:1599::11) smtp.mailfrom=claude.buisson1@free.fr X-Spamd-Result: default: False [2.40 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[free.fr]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(0.95)[0.946,0]; TO_DN_NONE(0.00)[]; IP_SCORE(0.00)[ip: (4.18), ipnet: 2a01:e00::/26(-3.24), asn: 12322(-1.61), country: FR(0.00)]; NEURAL_SPAM_LONG(0.55)[0.554,0]; DMARC_NA(0.00)[free.fr]; R_SPF_NA(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[free.fr]; ASN(0.00)[asn:12322, ipnet:2a01:e00::/26, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2020 23:37:32 -0000 On 2020-03-15 22:39, Gary Aitken wrote: > 11.3-RELEASE-p6 GENERIC  amd64 > > I'm having trouble reading SD cards formatted in my camera (Olympus > EM1-MkII) > or on a Win 7 system.  When attempting to mount, I get the following: > > $ mount -t msdosfs /dev/da0s1 /mnt/memstick > mount_msdosfs: /dev/da0s1: Invalid argument > $ mount -t ntfs /dev/da0s1 /mnt/memstick > mount: /dev/da0s1: Operation not supported by device > > Cards used without formatting *usually* seem to work. > > If I look at the cards which don't mount using gpart, I see: > > Card formatted in camera: > $ gpart show -p /dev/da0 > =>       63  120944577    da0  MBR  (58G) >          63      32705         - free -  (16M) >       32768  120911872  da0s1  ntfs  [active]  (58G) > $ gpart show -r /dev/da0 > =>       63  120944577  da0  MBR  (58G) >          63      32705       - free -  (16M) >       32768  120911872    1  7  [active]  (58G) > > If I look at cards that I know I can mount I see the following: > > $ gpart show -p da0 > =>      63  30375873    da0  MBR  (14G) >         63      8129         - free -  (4.0M) >       8192  15118336  da0s1  fat32lba  (7.2G) >   15126528  15249408         - free -  (7.3G) > $ gpart show -r /dev/da0 > =>      63  30375873  da0  MBR  (14G) >         63      8129       - free -  (4.0M) >       8192  15118336    1  12  (7.2G) >   15126528  15249408       - free -  (7.3G) > > or: > > $ gpart show -p /dev/da0 > =>       1  15633407    da0  MBR  (7.5G) >          1        31         - free -  (16K) >         32  15633376  da0s1  fat32  (7.5G) > $ gpart show -r /dev/da0 > =>       1  15633407  da0  MBR  (7.5G) >          1        31       - free -  (16K) >         32  15633376    1  11  (7.5G) > > I tried reformatting as follows: > > # gpart delete -i 1 da0 > da0s1 deleted > # gpart add -i 1 -a 4M -t "\!11" da0 > da0s1 added > # gpart show -r da0 > =>       63  120944577  da0  MBR  (58G) >          63       8129       - free -  (4.0M) >        8192  120930304    1  11  (58G) >   120938496       6144       - free -  (3.0M) > # newfs_msdos -F 32 /dev/da0s1 > /dev/da0s1: 120900736 sectors in 1889074 FAT32 clusters (32768 > bytes/cluster) > BytesPerSec=512 SecPerClust=64 ResSectors=32 FATs=2 Media=0xf0 > SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=120930304 > FATsecs=14759 RootCluster=2 FSInfo=1 Backup=2 > > If I put this card in the camera, I get an error ("Card Error") > If I again format the card in the camera, I can't mount it. > > I need to reformat these cards so I can use them in the camera and on > freebsd, and apparently neither the camera nor win7 does that, so... > What's the right way to lay out, format, and create a file system on an > SD card so it is usable by cameras and windoze? > > Thanks, > > Gary > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" Your card with a capacity > 32GB must be formatted as exFAT The partition type seen by gpart is the same as NTFS man gpart ... ntfs A partition that contains a NTFS or exFAT filesystem see also Bug 244461 CBu