Hi,

Thanks for the tip! I had some trouble with routing the components, but I managed to get it to work by explicitly adding the lx_fs component. I am attaching my runtime here for future reference.

Best,
Rumen

From: Pirmin Duss via users <users@lists.genode.org>
Sent: Friday, July 11, 2025 7:28 AM
To: users@lists.genode.org <users@lists.genode.org>
Cc: Pirmin Duss <pirmin.duss@gapfruit.com>
Subject: Re: vfs_block Persistence
 
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


Hello Rumen

On 7/10/25 17:41, Rumen Mitov wrote:

> My program runs successfully, however changes made to the block file
> (snapper_block.raw) do not persist. This is because I use <ram/>. But
> without <ram/> I get an error that the block file is inaccessible.

The way you configured `vfs_block`, it imports the content of the ROM in
to the RAM and allows to modify it, but the changes can't be written back.

> How can I make the block changes persist between runs? In previous
> versions of Genode I could achieve this with lx_block, but I am unsure
> how to do this with vfs_block.

I would try something as follows:

```xml
   <requires>
    <file_system label="lx_block"/>
   </requires>

   ....

   <start name="vfs_block" ram="1G">
    <provides><service name="Block"/></provides>
    <config>
        <vfs>
            <fs label="lx_block"/>
        </vfs>
        <policy label_prefix="vfs"
            file="/snapper_block.raw" block_size="512" writeable="yes"/>

    </config>
   </start>
```

then remove the `<rom label="snapper_block.raw"/>` from `<content>`.

This should start an `lx_fs` component in the runtime. Which if I
remember correctly will serve the content of the sub directory
`lx_block`. Your needs to be in that sub-directory.

I write this from the top of my head without actually trying it out, so
there might be some steps I missed.

Regards,
Pirmin

_______________________________________________
users mailing list -- users@lists.genode.org
To unsubscribe send an email to users-leave@lists.genode.org
Archived at https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/message/CLV3FUVZMHDSKL5OWPE5ATWWQGPZETJX/