problem mounting from flash [Invalid sectorsize] [g_vfs_done() error=22]

Monthadar Al Jaberi monthadar at gmail.com
Mon Nov 8 16:32:27 UTC 2010


Hi,

I dont know if I am asking on the wrong place. But it has todo with
filesystem and onboard flash (16MB) on a RouterStation Pro board.

I am running a FreeBSD Current 201010, with the kernel configuration
file specified in /usr/src/sys/mips/conf/AR71XX with device
geom_redboot.

but I get this error when I try to mount from flash:
mount /dev/redboot/fs /var/fs
mount: /dev/redboot/fs Invalid sectorsize 65536 for superblock size
8192: Invalid argument


So I guessed it has todo with the flash configured in 64k sectors
according to the boot output.
...
mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0
mx25l0: mx25ll128, sector 65536 bytes, 256 sectors
...

So I just tried to change SBLOCKSIZE from 8129 to 65536 in
/usr/src/sys/ufs/ffs/fs.h, but then I got this error:
mount /dev/redboot/fs /mnt/fs
g_vfs_done():redboot/fs[READ(offset=8192, length=65536)]error = 22
mount: /dev/redboot/fs : Invalid argument

The filesystem is generated from an empty skeleton using:
makefs -t ffs -B big -s 128k image-name directory-path

Then I transfer the image to the flash using Redboot bootloader.

Am I generating an incorrect filesystem image? I dont understand
offset and length in the last error message.

I couldnt use cat to dump the content in /dev/redboot/fs gives an
invalid argument error.
But I can use read(fd, buf, 65536) to read data. Has to be 64k (hint
from http://wiki.freebsd.org/AdrianChadd/UbiquityRouterstationPro).

Any help is much appreciated.
-- 
//Monthadar Al Jaberi


More information about the freebsd-fs mailing list