Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Oct 2011 09:45:03 +0000
From:      Matthieu Kraus <matthieu.kraus@s2008.tu-chemnitz.de>
To:        Mattia Rossi <mrossi@swin.edu.au>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Create FAT partition/filesystem on the internal microSD flash of the Dreamplug
Message-ID:  <cone.1318239903.356917.1719.500@rlydontknow>
References:  <4E9290FF.7090306@swin.edu.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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)




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