From owner-freebsd-questions@freebsd.org Sat Aug 10 08:31:45 2019 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 51FEDB6770 for ; Sat, 10 Aug 2019 08:31:45 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 465FhH5zKKz4Xqn for ; Sat, 10 Aug 2019 08:31:43 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from [188.174.90.199] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1hwMmq-0000za-74 for freebsd-questions@freebsd.org; Sat, 10 Aug 2019 10:31:40 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.unixarea.de (8.15.2/8.14.9) with ESMTPS id x7A8VdRJ003773 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Sat, 10 Aug 2019 10:31:39 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.15.2/8.14.9/Submit) id x7A8VdwZ003772 for freebsd-questions@freebsd.org; Sat, 10 Aug 2019 10:31:39 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Sat, 10 Aug 2019 10:31:39 +0200 From: Matthias Apitz To: freebsd-questions@freebsd.org Subject: USB stick for msdosfs Message-ID: <20190810083139.GA3606@c720-r342378> Reply-To: Matthias Apitz Mail-Followup-To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Operating-System: FreeBSD 13.0-CURRENT r342378 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. User-Agent: Mutt/1.11.1 (2018-12-01) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.90.199 X-Rspamd-Queue-Id: 465FhH5zKKz4Xqn X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of guru@unixarea.de has no SPF policy when checking 178.254.4.101) smtp.mailfrom=guru@unixarea.de X-Spamd-Result: default: False [-2.79 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[guru@unixarea.de]; HAS_XOIP(0.00)[]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; RECEIVED_SPAMHAUS_PBL(0.00)[199.90.174.188.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; IP_SCORE(-1.14)[ip: (-8.18), ipnet: 178.254.0.0/19(1.35), asn: 42730(1.14), country: DE(-0.01)]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:42730, ipnet:178.254.0.0/19, country:DE]; RCVD_IN_DNSWL_LOW(-0.10)[101.4.254.178.list.dnswl.org : 127.0.5.1]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.984,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[unixarea.de]; MIME_TRACE(0.00)[0:+]; R_SPF_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[] 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: Sat, 10 Aug 2019 08:31:45 -0000 Hello, I have a 1G (1 "marketing GB") USB stick and use normaly this procedure which I have stored in y small set of how-to docs: # gpart destroy -F da0 # gpart create -s mbr da0 # gpart add -t \!12 da0 # newfs_msdos -F32 /dev/da0s1 What does the '-t \!12' mean? And why in the case here newfs_msdos(8) is unwilling to format the partition: # gpart destroy -F da0 da0 destroyed # gpart create -s mbr da0 da0 created # gpart add -t \!12 da0 da0s1 added # newfs_msdos -F32 /dev/da0s1 newfs_msdos: 61408 clusters too few clusters for FAT32, need 65525 # gpart list da0 Geom name: da0 modified: false state: OK fwheads: 64 fwsectors: 32 last: 1966079 first: 32 entries: 4 scheme: MBR Providers: 1. Name: da0s1 Mediasize: 1006616576 (960M) Sectorsize: 512 Stripesize: 0 Stripeoffset: 16384 Mode: r0w0e0 efimedia: HD(1,MBR,00000000,0x20,0x1dffe0) rawtype: 12 length: 1006616576 offset: 16384 type: fat32lba index: 1 end: 1966079 start: 32 Consumers: 1. Name: da0 Mediasize: 1006632960 (960M) Sectorsize: 512 Mode: r0w0e0 It works with -F16: # newfs_msdos -F16 /dev/da0s1 /dev/da0s1: 1965504 sectors in 61422 FAT16 clusters (16384 bytes/cluster) BytesPerSec=512 SecPerClust=32 ResSectors=1 FATs=2 RootDirEnts=512 Media=0xf0 FATsecs=240 SecPerTrack=32 Heads=64 HiddenSecs=0 HugeSectors=1966048 Why not with -F32? Thanks matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub