I’m creating this new thread to make it easy to onboard a new member who got in touch off-forum, asking a Storage question which I might be able to answer
Depending on what permissions are set for new forum members, it might make it easier to ask the question too (assuming the “reply to post” permission is granted before the “post new thread” permission)
I want to express my gratitude for creating the topic, and I’d also like to thank Norman for providing this platform for knowledge exchange.
I am currently focused on enabling the persistent storage of Sculpt OS, or even a simple application, on a storage medium in such a way that it supports rebooting without data loss. For instance, in Sculpt OS, after performing an update, there is no option for a soft reboot, only a hard reboot, which gives the impression of running a live operating system. Additionally, it appears that USB drivers leveraging Linux frameworks are functioning correctly. Mastering this process will assist me in reading from and writing to USB storage. (I must admit that I lack experience in implementing and managing file systems, and the development environment remains somewhat ambiguous to me.)
If you could propose a solution or share an example of utilizing a file system on storage, I would greatly appreciate it.
In SculptOS, I believe it’s a matter of switching to leitzentrale(?), selecting an existing FS and clicking “Use”. I’m a quite a bit fuzzy on the x86 variant. My memory is more fresh on the PinePhone variant of SculptOS : on that one I’ve recently checked for a fact that it’s possible to work on the ext2 partition from which SculptOS was launched (that is, on the bootable USB stick where SculptOS is installed), extend it, download packages into it, and expect them to still be there after rebooting.
Now for generalities – the way I see it, a Genode storage stack looks something like this:
- application(s) (vfs clients)
- vfs server
- part_block
- ahci_drv (or other)
I didn’t work with USB mass storage or NVMe yet, only with the AHCI driver to access my SATA spinning drive.
My scenario is somewhat based on this run file:
It should be possible for you to run it with make run/ahci_block
or something like that. One you know it works, you should be able to lift some elements of it and start doing system composition, importing them into your own run files.
Re. “soft reboot”, what are your expectations, i.e. what should it look like. Should it display a dialog box that says “shutting down applications” and such ? I guess in a way, SculptOS is a live system, though one that expects to have a hard-drive to store its packages and preserve settings (EDIT: otherwise it works off a <ram>
node in its vfs server, which is lost when rebooting), so a bit of a hybrid.
Does that help ?
EDIT: forgot to mention the rest of the stack: another interesting run file is libports/run/libc_many_writes.run
, which shows how to run a vfs server, and a client referring to that server via an (innocently-named) <fs/>
node. The last piece of the puzzle you’ll need is part_block – in that specific case it should be easy to run grep -r part_block
to find example run files I believe.
I might not have fully understood your explanations because I’m not very familiar with the file system topic. However, I would like the user to be able to see the changes they made and the files they installed after each reboot, without the settings reverting to their original state.
Additionally, I have used Sculpt as a practical example. However, the project I have defined for myself involves running Falkon with the capability to download and upload from a USB flash drive. It should also have the ability to dynamically change network settings.
Currently, I am facing three challenges:
- Using the existing ext2 file system.
- Adding support for ext4 and ntfs file systems.
- Providing the ability to change network settings dynamically (I would appreciate any guidance on this as well).
I’m quite weak on the SculptOS side of things, but it seems the official documentation has you covered here. Take a look here :
To keep your custom preset available after reboot, follow the pattern described in Section Making customizations permanent by copying the file to /config/24.04/presets/ at your Sculpt partition.
That should allow you to save settings to the ext2 file system.
(make sure that you are indeed using the ext2 file system, not the temporary RAM disk! Follow the directions here )
I suspect network settings (DNS etc) can be changed dynamically using the same technique : explore the directories mentionned above to find the one related to networking, edit it with a text editor, and the new values will apply immediately (if nic_router observes setting changes “live”).