Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

cant read superblock error

I am trying to mount part of the flash memory on the altera nios 2 stratix development kit as a flash RW drive. I created a mtdblock0 in the /dev part of the filesystem and I am trying to mount it to a drive in the /nfs directory as shown below

# mount -t jffs2 /dev/mtdblock0 /nfs/fsrw -n

When I try to execute this I get an error:

mount: /dev/mtdblock0: can't read superblock

I tried erasing the entire flash and doing this all over again and I still get the same error. If anyone has the same problem or knows the solution please let me know

-Fred

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Did you create a jffs filesystem on the flash chip? You can't just erase it - you need to actually create the filesystem on the chip as well (unless jffs is exception).

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I built jffs2 in the kernel. How do I create the filesystem on the flash?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Alright, I fixed it. My problem was I was using mtdblock0 for for the jffs2 partition. I editied altera.c and I changed the mapping so that the it would show up on mtdblock2. I was then able to mount the drive fine.