I'm struggling to understand how to configure the vbox6-block component.
All seems to go well until...
[runtime -> ahci-0.part_block] Warning: no policy defined for label 'vbox6-block -> block0'
I read up on component configuration; I have a better understanding of it now. https://genode.org/documentation/genode-foundations/22.05/components/Compone...
But I don't understand the details of how to configure block services in a launcher.
For detailed logs, my launcher config, etc., see: https://github.com/dckc/madmode-blog/issues/49#issuecomment-1407819827
p.s. I got falkon and screenshot working, but in that same issue 49, note problem reports w.r.t - shutdown / acpica - ssh_client - sneakernet (usb_drv)
Hello Dan,
On 30.01.23 01:37, Dan Connolly wrote:
I'm struggling to understand how to configure the vbox6-block component.
All seems to go well until...
[runtime -> ahci-0.part_block] Warning: no policy defined for label 'vbox6-block -> block0'
You may rewrite the label to your actual Block provider, e.g. as an example (taken from my setup):
<service name="Block" label="block0"> <child name="ahci-0.part_block" label="7"/> </service>
The example routes the request to a running part_block using a ahci device, which provides partition 7 as a separate Block service.
Cheers,
Alex.
On Mon, Jan 30, 2023 at 2:52 AM Alexander Boettcher alexander.boettcher@genode-labs.com wrote:
You may rewrite the label to your actual Block provider, e.g. as an example (taken from my setup):
<service name="Block" label="block0"> <child name="ahci-0.part_block" label="7"/> </service>
Yes, my config is like that (with 1 rather than 7), and now that I restart this morning, I don't see the "no policy" warning. I suppose I wasn't careful to isolate the problem when I reported it.
I'd like to use <service name="Block" label="boot"> and likewise "root", "home" and "shared" for the block service labels (keeping the child labels as partition numbers "1", "4", "5", "6"), but I can't get that to work. Are the names constrained to "block0", "block1" etc.? If so, by which part of the system?
Hi Dan,
On 30.01.23 16:09, Dan Connolly wrote:
On Mon, Jan 30, 2023 at 2:52 AM Alexander Boettcher alexander.boettcher@genode-labs.com wrote:
You may rewrite the label to your actual Block provider, e.g. as an example (taken from my setup):
<service name="Block" label="block0"> <child name="ahci-0.part_block" label="7"/> </service>
Yes, my config is like that (with 1 rather than 7), and now that I restart this morning, I don't see the "no policy" warning. I suppose I wasn't careful to isolate the problem when I reported it.
I'd like to use <service name="Block" label="boot"> and likewise "root", "home" and "shared" for the block service labels (keeping the child labels as partition numbers "1", "4", "5", "6"), but I can't get that to work. Are the names constrained to "block0", "block1" etc.? If so, by which part of the system?
The names can be chosen freely, but you have to be consistent at all places.
In your vbox6 configuration file, you have to use one VMDK per Block device. So in your case it would be 3 different VMDK files. Each VMDK file contains a /dev/XXX device, where XXX can be chosen freely by you. Additionally, the size must _exactly_ match your target partition/block device (otherwise corruption ahead). Your /dev/XXX must be used in the runtime file of the package at the vfs component (name="XXX"). There you can start re-labeling as you desire (label=root/home/shared), but you must do it consistently. In the runtime file there are 3 places, at the head, at the vfs node and in the routing rules (end of file). According to your posted link, at the end you seem not tried to modify the routing rules for block0/block1 (at least there are no out-commented lines by you as on the other 2 places), maybe you missed that ?
Hope it helps,
On Mon, Jan 30, 2023 at 2:08 PM Alexander Boettcher alexander.boettcher@genode-labs.com wrote: [...]
In your vbox6 configuration file, you have to use one VMDK per Block device. So in your case it would be 3 different VMDK files.
Really? https://genodians.org/jschlatow/2021-04-23-start-existing-linux-from-sculpt seems to show creating one .vmdk file for 3 partitions:
VBoxManage internalcommands createrawvmdk -filename linux.vmdk \ -rawdisk /dev/sda -partitions 1,4,5 -relative
Each VMDK file contains a /dev/XXX device, where XXX can be chosen freely by you. Additionally, the size must _exactly_ match your target partition/block device (otherwise corruption ahead).
Mine is at https://github.com/dckc/madmode-blog/blob/t430-lin-in-genode/projects/t430/l...
It has all four: ... RW 2048 FLAT "/dev/sda1" 0 RW 204800 ZERO RW 20971520 ZERO RW 52428800 FLAT "/dev/sda4" 0 RW 134217728 FLAT "/dev/sda5" 0 RW 42242703 FLAT "/dev/sda6" 0 ...
The sector counts match sfdisk output https://github.com/dckc/madmode-blog/blob/t430-lin-in-genode/projects/t430/s...
Your /dev/XXX must be used in the runtime file of the package at the vfs component (name="XXX"). There you can start re-labeling as you desire (label=root/home/shared), but you must do it consistently. In the runtime file there are 3 places, at the head, at the vfs node and in the routing rules (end of file). According to your posted link, at the end you seem not tried to modify the routing rules for block0/block1 (at least there are no out-commented lines by you as on the other 2 places), maybe you missed that ?
Aha! yes.
This XML declarative config has its upsides and down sides... it's hard to tell which occurrences of names are definitions and which are references, and what they refer to. I haven't built a good working knowledge of the "interpreter" in my head yet.
IIUC, the launcher pkg attribute refers to a path inside depot (though I wonder how the depot root is found...). Inside the pkg, we expect to find a runtime file, where the <requires> things seem to guide the components gui into prompting for something... services? What consumes a <runtime/>? The launcher <config> is more straightforward; it's the config for the init binary, documented in the book. https://genode.org/documentation/genode-foundations/22.05/system_configurati... and in https://github.com/genodelabs/genode/blob/master/repos/os/src/init/config.xs...
The <content> seems to be input to a dynamic linker; I'm fuzzy on the details, but so far that part "just works".
Then back to the <launcher>, its <route> info seems to be matched with the <requires> part of the <runtime>.
<start>, <launcher>, and <runtime> seem to have some shared structure.
What's the binary of the tool for constructing the components graph? I'm struggling to find it in https://github.com/genodelabs/genode/blob/master/repos/gems/run/sculpt.run I see <start name="leitzentrale" caps="2350" priority="-1"> but like so many others, it contains: <binary name="init"/>
On Tue, Jan 31, 2023 at 12:38 AM Dan Connolly dckc@madmode.com wrote:
On Mon, Jan 30, 2023 at 2:08 PM Alexander Boettcher alexander.boettcher@genode-labs.com wrote: [...]
In the runtime file there are 3 places, at the head, at the vfs node and in the routing rules (end of file). According to your posted link, at the end you seem not tried to modify the routing rules for block0/block1 (at least there are no out-commented lines by you as on the other 2 places), maybe you missed that ?
Aha! yes.
postscript: thanks to that clue, it starts to boot using 4 block devices! grub boots and transfers control to linux!
details, screenshot: https://github.com/dckc/madmode-blog/issues/49#issuecomment-1409921659
on to the next issue...
Hi Dan,
On 1/31/23 7:38 AM, Dan Connolly wrote:
On Mon, Jan 30, 2023 at 2:08 PM Alexander Boettcher alexander.boettcher@genode-labs.com wrote: [...]
In your vbox6 configuration file, you have to use one VMDK per Block device. So in your case it would be 3 different VMDK files.
Really? https://genodians.org/jschlatow/2021-04-23-start-existing-linux-from-sculpt seems to show creating one .vmdk file for 3 partitions:
VBoxManage internalcommands createrawvmdk -filename linux.vmdk \ -rawdisk /dev/sda -partitions 1,4,5 -relative
Oh nice, cool, did not know !
IIUC, the launcher pkg attribute refers to a path inside depot (though I wonder how the depot root is found...). Inside the pkg, we expect to find a runtime file, where the <requires> things seem to guide the components gui into prompting for something... services? What consumes a <runtime/>?
See the depot_deploy and depot_query tools, at [0] you can read about the general workflow.
[0] https://genode.org/documentation/release-notes/18.02#Installation___update
The launcher <config> is more straightforward; it's the config for the init binary, documented in the book. https://genode.org/documentation/genode-foundations/22.05/system_configurati... and in https://github.com/genodelabs/genode/blob/master/repos/os/src/init/config.xs...
The <content> seems to be input to a dynamic linker; I'm fuzzy on the details, but so far that part "just works". Then back to the <launcher>, its <route> info seems to be matched with the <requires> part of the <runtime>.
<start>, <launcher>, and <runtime> seem to have some shared structure.
What's the binary of the tool for constructing the components graph?
Look into the sculpt manager (repos/gems/src/app/sculpt_manager) and look for graph. It generates a report which is consumed by a menu_view, which does the actual graphical presentation.
Cheers,