NAND and vfat

Nancy nancydreaming at gmail.com
Sat Jun 7 21:04:29 EDT 2008


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



More information about the linux-mtd mailing list