Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Aug 2019 10:31:39 +0200
From:      Matthias Apitz <guru@unixarea.de>
To:        freebsd-questions@freebsd.org
Subject:   USB stick for msdosfs
Message-ID:  <20190810083139.GA3606@c720-r342378>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190810083139.GA3606>