From owner-freebsd-arm@FreeBSD.ORG Mon Oct 10 09:45:05 2011 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B6941065672 for ; Mon, 10 Oct 2011 09:45:05 +0000 (UTC) (envelope-from matthieu.kraus@s2008.tu-chemnitz.de) Received: from nick.hrz.tu-chemnitz.de (nick.hrz.tu-chemnitz.de [134.109.228.11]) by mx1.freebsd.org (Postfix) with ESMTP id 295E38FC0A for ; Mon, 10 Oct 2011 09:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-chemnitz.de; s=dkim2010; h=Content-Transfer-Encoding:Content-Type:Mime-Version:Date:Subject:Cc:To:From:Message-ID:References; bh=W7bzkTBk31wsKEsPus3haWyvyL1lxNMIdwG6qIlWJIY=; b=z2C4NKLxc/h8ktk0w+QooPVNCPKqRQPhheANFMg+c2/6yI5643FW5aWEa0hCD+uYaoLXvKK+VLL3YOo9aR8fYRt3PQvNZPX8nUM2wVBFSuumE6XHs3MYviI7eOh/koK7o6AEz+vOpNo40Htapc+g+EeIk61GZHqctFuwDlY5RTI=; Received: from postman.hrz.tu-chemnitz.de ([134.109.133.5] helo=mailbox.hrz.tu-chemnitz.de) by nick.hrz.tu-chemnitz.de with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RDCPv-0003Bf-JU; Mon, 10 Oct 2011 11:45:03 +0200 Received: from rlydontknow.csn.tu-chemnitz.de ([134.109.92.98] helo=rlydontknow) by mailbox.hrz.tu-chemnitz.de with esmtps (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76) (envelope-from ) id 1RDCPv-0007rZ-Fy; Mon, 10 Oct 2011 11:45:03 +0200 References: <4E9290FF.7090306@swin.edu.au> Message-ID: X-Mailer: http://www.courier-mta.org/cone/ From: Matthieu Kraus To: Mattia Rossi Date: Mon, 10 Oct 2011 09:45:03 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="US-ASCII" Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Scan-Signature: 113af25641a082a643d611852bb712c6 Cc: freebsd-arm@freebsd.org Subject: Re: Create FAT partition/filesystem on the internal microSD flash of the Dreamplug X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2011 09:45:05 -0000 Mattia Rossi writes: > Hi all again, > > I've now been on to this for quite a while, but just can't get it to work. > I've mistakenly blown away the partitioning scheme that the dreamplug > came with originally, therefore also the FAT boot partition. > > I've tried to recreate it using gpart and newfs_msdos, but can't create > any new FAT partition that mount_msdosfs would mount. > > See: > > dreamplug# gpart create -s mbr da0 > da0 created > dreamplug# gpart add -t fat32 -i 1 -s 32M da0 > da0s1 added > dreamplug# newfs_msdos da0s1 > /dev/da0s1: 65416 sectors in 8177 FAT16 clusters (4096 bytes/cluster) > BytesPerSec=512 SecPerClust=8 ResSectors=1 FATs=2 RootDirEnts=512 > Sectors=65520 Media=0xf0 FATsecs=32 SecPerTrack=63 Heads=255 HiddenSecs=0 > dreamplug# mount_msdosfs /dev/da0s1 /mnt/usb > mount_msdosfs: /dev/da0s1: Invalid argument > > I've tried to change the partition type to 6 and 4 and to freebsd (165), > but didn't help. > I also tried to set the start of the partition (-b) to 64, 128 and 192 > but nothing there either. > > Trying to tune newfs_msdos to use FAT 12 or FAT 32 and different > bytes/sec or a different mediatype (0xf8) and a variety of tweaks did > not help either. > > It seems that I can't create a mountable FAT partition. > > I believe the problem is that gpart create -s mbr starts the > partitioning scheme at an offset of 63 sectors, while the one on the > external SD card I have (pre-partitioned not using FreeBSD) has an > offset of 32 sectors. > > I couldn't find any documentation that tells me how to tell gpart create > to use a different offset. > > Any hints? > > Mat that's another issue I ran into, however I fixed it the "dirty" way: for some mysterious reason mkfs_msdosfs seems to be a little broken, so I just created the filesystem with a linux and from there on everything worked fine (the msdosfs created under linux can be mounted without issues using mount_msdosfs)