NAND and vfat
Alaor Koppe
alakoppe at gmail.com
Sun Jun 8 18:49:03 EDT 2008
Hi Nancy
I followed what you said but something is wrong. I'm trying to mount
my board as a device to windows, using the vfat.img as a Backing
Storage File (with gadget driver).
Well, I created the file with 50 Mb, indicated the file to driver and
formated the file as vfat at Windows. I put files in this volume at
Windows and all works fine, but when I mount the vfat.img at board
with mount command (-t vfat -o loop vfat.img /mnt/fat), I can't see
the files that I put with Windows.
The gadget driver is working fine, and the mount command doesn't
return error when I mount the loopback file.
Can be an error on Vfat fs in uclinux? (I'm using 2.6.11.8-hsc0)?
Thanks
Alaor
On Sat, Jun 7, 2008 at 10:04 PM, Nancy <nancydreaming at gmail.com> wrote:
> Hi Alaor,
> On Sun, Jun 8, 2008 at 3:51 AM, Alaor Koppe <alakoppe at gmail.com> wrote:
>> I created by dd command, after that, I used fdisk to format as VFAT,
>> directly on board. Maybe I had used in a wrong way "dd" command, but I
>> don't know.
> fdisk is not right command to do format.
>
>> on LPC board I did:
>>
>> # mount -t jffs2 /dev/mtdblock0 /mnt
>> # dd bs=1M count=10 if=/dev/zero of=/mnt/vfat.img
>> # fdisk /mnt/vfat.img
>
> You can try this:
> On PC:
> # dd bs=1M count=10 if=/dev/zero of=vfat.img
> # loseup /dev/loop0 vfat.img
> # mkfs.vfat /dev/loop0
> # loseup -d /dev/loop0
>
> On board:
> # mount -t jffs2 /dev/mtdblock0 /mnt
> # cp that vfat.img to /mnt/
> # mount -t vfat -o loop /mnt/vfat.img /mnt
> OK, done!
>
>> When I use fdisk, I enter on expert mode and set the sectors, heads
>> and cylinders, but after I close with write command, when I enter
>> again, these information aren't as I set. So, when I use the mount
>> command with vfat option to loopback file, I get the error specified.
> I think fdisk can't run on reguler file properly. You should try to
> loopback that file to loop device, then fdisk /dev/loop0. Just like
> mkfs.vfat /dev/loop0.
> HTH!
>
> --
> Best wishes,
> Nancy
>
--
Alaor Abel Koppe
More information about the linux-mtd
mailing list