From owner-freebsd-questions@freebsd.org Sat Aug 10 08:59: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 2E628B735F for ; Sat, 10 Aug 2019 08:59:45 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 465GJb5DHdz4YvL for ; Sat, 10 Aug 2019 08:59:43 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: by mail-pl1-x635.google.com with SMTP id a93so45843858pla.7 for ; Sat, 10 Aug 2019 01:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=QdJsoxDJ620Hfp/X2b7go1Y2HPtbjwi+i6OSoluM2pc=; b=md4pYUrQjJbB5ThDKtkd+eD0x4ZwFF4ewI+p8H0exkrkzPwm+EuxJgsS/7wIyhLaOT XVIUxCXGaiNvZMg4I1PSe+SUeJ462CNgnx3DH7MQwUKPiVjPv55DTqLkjZjydiERtRMY EtV86ECmRQFj/XqD//eHEY/mB/Hq7XRdJSa3nnBE92t1hTQAtnogqfGyGSXSdiTc+nbU zrg3UJJLoeGBy2ay7CsScokGssCAUzOpwZcPYWjOTPOjMV72JL22OCTLAo72MMUEm43N AcaoPmvOQ99tKJoeEqLwfIiA6x35GH9SQ10Vqo2KkcyWOMJf801QyNLucxXGgHm/sVCY HxJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QdJsoxDJ620Hfp/X2b7go1Y2HPtbjwi+i6OSoluM2pc=; b=M1XjY8U+EtbcV8iKaQWiQ0ilX+cLLpFBlJLb3+HRFZqTGymkY4KpJgANPPE43/yfng jVpyO60MmelMhTwkMO8qaSsAE6EIvejeuJBA/0LdtU/3O5Tu0Wt/HROzDyTLfiT3FRe5 fJmaGjZPt7MUAbwDFWBdgnyFnoW+AhkLD0IhQtbDyY/GXtAMv1WjPKRFWsPAb2CvzyMd Hy8pP0u7qtOVzxYJYq6J1Raq5r4B28MqNo0kTlnENtjivWooWxWm4WvPqQAcHYubcJQW HWwICaQwGuBIZTHY/N9XWevHB/OyYcffdw420wt6c7W4ecVmqaUE6TAkYaOLmsXVXnaD 3NhA== X-Gm-Message-State: APjAAAVN2JEr29GReLLAWUcr+BzOBpYp2kMKI9YRfrYxxDzLJpHr9thY dfLLPOvuowM5QFlkK2zYO3DF1cRk X-Google-Smtp-Source: APXvYqzqvN/nOXK/YkOQGmegoiinskK7QMpomw5Y0LAVcSw8YdawyDTVv+ziPjqAB7iQWdy04r2UAw== X-Received: by 2002:a17:902:ab83:: with SMTP id f3mr23197763plr.122.1565427581923; Sat, 10 Aug 2019 01:59:41 -0700 (PDT) Received: from [192.168.1.10] (C-59-101-197-80.bur.connect.net.au. [59.101.197.80]) by smtp.gmail.com with ESMTPSA id p1sm398450pff.44.2019.08.10.01.59.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Aug 2019 01:59:41 -0700 (PDT) Subject: Re: USB stick for msdosfs To: freebsd-questions@freebsd.org References: <20190810083139.GA3606@c720-r342378> From: MJ Message-ID: <0ce32b01-8fd1-211b-5ef4-43ffa2b843cc@gmail.com> Date: Sat, 10 Aug 2019 18:59:04 +1000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190810083139.GA3606@c720-r342378> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 465GJb5DHdz4YvL X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=md4pYUrQ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mafsys1234@gmail.com designates 2607:f8b0:4864:20::635 as permitted sender) smtp.mailfrom=mafsys1234@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-0.998,0]; RECEIVED_SPAMHAUS_PBL(0.00)[80.197.101.59.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(0.00)[ip: (-8.57), ipnet: 2607:f8b0::/32(-2.98), asn: 15169(-2.40), country: US(-0.05)]; RCVD_IN_DNSWL_NONE(0.00)[5.3.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; 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:59:45 -0000 Hi, The -t sets you partition type, the \!12 is the value. This, according to gpart manual says it's a Fat32 LBA (whatever use that is). I think it's a partition type used by Windows 95/98. The gpart man also lists a "plain" Fat32 with a type of !11, so try that instead then newfs_msdos -F32 Why it's unwilling to format it? Perhaps it doesn't understand LBA (Logical Block Addressing)? Frankly, LBA is useless for a tiny 1GB disk, just use Fat32 (or even Fat16 given you've only got 1GB disk) On 10/08/2019 6:31 pm, Matthias Apitz wrote: > > 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 > > >