I'm sorry if my initial description was to vague, more detals below..Unfortunately, that would break many other ways of booting OSes, like using autoboot.txt, or conditional sections in config.txt, or booting directly from one OS to another, etc.
During installation of OS'es, PINN looks for a boolean field, let's call it "label_required", in "partitions.json" which defines whether the OS requires a partition to have the specified "label" set for the OS to function properly. If multiple OS'es requires the same label for a partition, PINN ensures that no partition is created with the specific label.
The following assumes that "Wonky OS", "RecalBox" and "Batocera" is installed and that both RecalBox and Batocera have "label_required" set to "true" for a partition named "SHARE" and that Wonky OS also has a partition named "SHARE" which does not have "label_required" set. Whilst being installed, the three "SHARE" partitions are created as "SHARE1" (Wonky), "SHARE2" (Recal) and "SHARE3" (Bato).
Since Wonky OS has its partition setup handled in "partition_setup.sh" during installation, nothing has to be done when it is launched - regardless of how it is launched.
When PINN launches RecalBox, PINN loads config for the OS and detects that it has a required label for one partition. PINN changes the label from "SHARE2" to "SHARE" and stores this modification to a config file before launching RecalBox. For every subsequent launch of RecalBox, or any other OS not requiring the "SHARE" label, no changes has to be made prior to launch.
Now PINN is instructed to launch "Batocera". PINN detects that "SHARE3" has to be renamed to "SHARE" and that "SHARE2" is already named "SHARE". PINN changes "SHARE" back to "SHARE2" and "SHARE3" to "SHARE" and stores the modification to a config file before launching Batocera.
The only caveat I can see from this is that if user wants to boot from Wonky OS to RecalBox whilst Batocera has the "SHARE" partition set, RecalBox may detect Batocera's "SHARE" partition as its own and that may cause problems.
I think that this would allow multiple OS'es, which requires the same label for a partition, to co-exist as long as they are launched from PINN. This would not have any effect on existing PINNified OS'es, it would only change the launch procedure of new PINNifications with the "label_required" field set to true.
Statistics: Posted by NotRequired — Wed Aug 07, 2024 6:28 pm