Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

cant read superblock error

Altera_Forum
Honored Contributor II
1,037 Views

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
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
325 Views

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).

0 Kudos
Altera_Forum
Honored Contributor II
325 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
325 Views

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.

0 Kudos
Reply