From owner-freebsd-questions@FreeBSD.ORG Fri Sep 13 01:48:27 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6B58E6A1 for ; Fri, 13 Sep 2013 01:48:27 +0000 (UTC) (envelope-from fbsd8@a1poweruser.com) Received: from mailch-3.name-services.com (mailch-3.name-services.com [98.124.252.185]) by mx1.freebsd.org (Postfix) with ESMTP id 55E3C2D0D for ; Fri, 13 Sep 2013 01:48:26 +0000 (UTC) Received: from mailch.name-services.com (localhost [127.0.0.1]) by mailch.name-services.com (Postfix) with SMTP id A9F4B62A630; Thu, 12 Sep 2013 18:42:17 -0700 (PDT) X-Sender-Id: 173.88.219.204 Received: from mail-24.name-services.com (sjl0vwsmail09.prod.dm.local [10.7.17.59]) by 0.0.0.0:2500 (trex/4.8.23); Fri, 13 Sep 2013 01:42:17 GMT X-Pool-Id: 4 Received: from [10.0.10.1] (cpe-173-88-219-204.neo.res.rr.com [173.88.219.204]) by mail-24.name-services.com with SMTP; Thu, 12 Sep 2013 18:42:08 -0700 Message-ID: <52326D6D.2040507@a1poweruser.com> Date: Thu, 12 Sep 2013 21:42:05 -0400 From: Fbsd8 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Gary Aitken Subject: Re: initialize msdosfs on memory stick? References: <5232348E.4070607@dreamchaser.org> <20130912235137.186fb207.freebsd@edvax.de> <52323C77.6050901@blackfoot.net> <20130913002643.aaa708a9.freebsd@edvax.de> <523259BF.2070302@blackfoot.net> In-Reply-To: <523259BF.2070302@blackfoot.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Polytropon , FreeBSD Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2013 01:48:27 -0000 Gary Aitken wrote: > On 09/12/13 16:26, Polytropon wrote: >> On Thu, 12 Sep 2013 16:13:11 -0600, Gary Aitken wrote: >>> On 09/12/13 15:51, Polytropon wrote: >>>> On Thu, 12 Sep 2013 15:39:26 -0600, Gary Aitken wrote: >>>>> I can't seem to find how to do this in the handbook or man pages. >>>>> I need to initialize a usb memory stick with an msdos file system. >>>>> Is it possible, or do I have to find a windoze system? >>>> It is possible. The OS provides the newfs_msdos tool. >>>> There is no need to deal with "Windows" for this task. >>>> >>> Great, thanks. >>> I checked the newfs manpage but didn't look too carefully when the summary >>> line said "construct a new UFS1/UFS2 file system" >> That's correct: newfs "refers to newfs_ufs" (which obviously >> initializes a UFS file system), but there are other newfs_* >> just as there are corresponding (and more) mount_* commands. >> >> See "man newfs_msdos" for more details. > > I see that; but was surprised newfs didn't see-also newfs_msdosfs. > > Anyhoo... ugh, I think I just screwed it up, not thinking things through. > > After doing > > # newfs_msdos -F 32 -S 4096 /dev/da0 > newfs_msdos: trim 62 sectors to adjust to a multiple of 63 > /dev/da0: 979584 sectors in 30612 FAT32 clusters (131072 bytes/cluster) > BytesPerSec=4096 SecPerClust=32 ResSectors=4 FATs=2 Media=0xf0 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=979650 FATsecs=30 RootCluster=2 FSInfo=1 Backup=2 > > I can't mount it, and there are no partitions: > > # ls /dev/da0* > /dev/da0 > # mount -t msdosfs /dev/da0 /mnt/memstick > mount_msdosfs: /dev/da0: Invalid argument > > Normally there is a /dev/da0s1. > > I suspect I *should* have used /dev/da0s1 in the newfs_msdos cmd. > > So, attempting to re-establish the partitions: > > #gpart create -s MBR da0 > da0 created > # gpart show -l da0 > => 63 7837633 da0 MBR (3.8G) > 63 7837633 - free - (3.8G) > # gpart add -t mbr da0 > gpart: Invalid argument > > now what? > Is mbr the wrong kind of partition type? > man gpart indicates the MBR scheme requires the GEOM_PART_MBR kernel option; > since the create succeeded, I'm assuming this is present? > > _______________________________________________ > 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" > read this how to http://forums.freebsd.org/showthread.php?t=13780