JusGellin wrote: Fri Sep 20, 2024 12:46 am
I was wondering if the number in front of the sfs file is the order it is loaded or is just a reference to tell the system to load the sfs.
Thanks
The number of the sfs file is CRUCIALLY IMPORTANT, because the numbers are the layered filesystem stack order. Files in lower number layers are overwritten by files with the same name in higher number layers.
The below considerations are especially important if you installed anything in upper_changes using the package manager before backing up and squashing:
You can roll back to a previous upper_changes by deleting the current one, but you can't skip numbers and delete an upper_changes with a lower number while leaving the higher. That will mess up the package manger,
So if I backup an upper_changes and call it 20upper_changes-SomeNewApps.sfs, delete current upper_changes.
Then I reboot and install more apps in the newly created upper_changes. Back it up, squash it to 21upper_changes-AddtionalApps.sfs. Delete current upper_changes.
Reboot again, and install more apps, backup and squash to 22upper_changes-EvenMoreApps.sfs.
Now the filesystem is stacked like this:
00-Modules.sfs
01-Firmware.sfs
07-RootFileSystem.sfs
20upper_changes-SomeNewApps.sfs
21upper_changes-AdditionalApps.sfs
22upper_changes-EvenMoreApps.sfs
It's a guarantee that you'll break your package manager if you delete or hide 20upper_changes and try to run with 21upper_changes and 22upper_changes.
You can roll back to 21upper_changes, or remove or hide 22 and 21 to roll back to 20.
It has to be sequential.
But as tried to demonstrate in a post above, it's possible to do all sorts of things with layers and removing and editing them if you don't mess up the crucial logic of the system, mostly the package manager.
EDIT: I say it has to be sequential, but you can renumber the layers, and there can be gaps in the numbering, but they have to be in the proper order to maintain the integrity of the package manager,
So I could renumber those three squashed layers:
20upper_changes-SomeNewApps.sfs
30upper_changes-AdditionalApps.sfs
58upper_changes-EvenMoreApps.sfs
and that will work just fine because the layers will still be stacked in the proper order.