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

Monthadar Al Jaberi monthadar at gmail.com
Wed Nov 10 07:44:38 UTC 2010


>  > Would it help me if I changed the flash driver to work with 4K?
>
> Yes, definitely.

Ok, I will look into.

>
>  > Or do I still need to either, mdconfig, gnop or play UFS/UFS2 code
>  > (hard for me)?
>
> If everything else fails, I would simply create a memory
> disk with mdconfig (if you have enough RAM), copy the file
> system from flash to the memory disk (use "dd bs=64k ...")
> and mount it from there.  That's not hard.

Yepp, works like a charm, Thank you =)
My board have 128MB ram and 16MB flash.

>
>  > Basically I have a cross compiled kernel+mdroot with tinyBSD wireless
>  > configuration, zipped and stored on the flash. So I am trying to have
>  > a filesystem on the flash that will shadow changes.
>  >
>  > When I zipp it takes ~10M instead of 47M!
>
> Wait a second ...  I don't understand ...  Are you saying
> that you've put a compressed FS image on the flash?  Is
> that the file system that you're trying to mount?  Or are
> we talking about two distinct pieces of flash?

No its another filesystem that I want to mount.

The root filesystem is inside the kernel image (MD_ROOT option) , the
kernel will mount from it (/dev/md0)
When the kernel image was generated I zipped it and stored it on the
flash, so a bootloader like Redboot will unzipp to ram and run the
kernel.
So I guess its messy to touch the filesystem that is inside a zipped
kernel image. Filesystem itself is not zipped.

So idea is to create another directory in the flash FIS (Flash Image
System) where I store new versions of somefiles. And your tar advice
works nicely, that makes it easier than having a filesystem on flash
and it will be zipped too!!!!! Thank you :)

Maybe no need to fidle with the flash driver and UFS code, who knows... :P
I guess ideal scenario is having a direct read/write separate
filesystem for some paths like /etc on the flash, while /var and /tmp
are mounted as /dev/mdX and the rest is read-only.

Thank you!

>
> --
> Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
> Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
> secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
> chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
>
> FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd
>
> "The last good thing written in C was
> Franz Schubert's Symphony number 9."
>        -- Erwin Dieterich
>



-- 
//Monthadar Al Jaberi


More information about the freebsd-fs mailing list