vinnie wrote: ↑05 Oct 2024, 11:15
2)Then I go to edit by hand the file “/mnt/sdxy/config/cheatcodes” and add the lines “from=UUID:03fcfe32-857f-4884-b2bd-48a2c1fe7891” (to avoid wrong partition at boot)
and the line “changes=/mnt/sdb1/porteus/saves/porteussave.dat” (exactly as recommended by the previous dialog box).
On reboot, however, it appears that the changes were not restored at reboot.
could be a bug
..it's possible that this is one cheatcode that won't work via the cheatcodes config
.. in this case the APPEND line in /boot/syslinux/porteus.cfg is the way to go..
vinnie wrote: ↑05 Oct 2024, 11:15
1) The savefile.dat seems to be fixed size (it even makes me choose the filesystem type), how is savefile.dat supposed to work?
pretty much requires you to guess how much space you think you'll need, usually overestimating is best.
vinnie wrote: ↑05 Oct 2024, 11:15
It is my understanding that the saved changes are the difference between the current state and the startup state (including any mounted save modules). So if you overwrite a module while you haven't yet done a reboot you don't lose the contents of the overwritten module, but as soon as you do a reboot and load it, if you overwrite it you lose it.
sounds correct, though not ideal
vinnie wrote: ↑05 Oct 2024, 11:15
If it works that way ok, however there would need to be at least a check to avoid overwriting and give the possibility to merge two saves (doing it by hand with xzm2dir seems impossible with the save modules, this error is returned: "FATAL ERROR: write_file: failed to lstat file new/.wh..wh.aufs, because Operation not permitted").
certainly, a check for a same named module that would overwritten should probably occur, with at least a warning.
it is possible to xzm2dir a save module with whiteouts in a posix directory outside the live filesystem ie. some mounted volume (which admittedly isn't always available)
but, there's probably no reason for those whiteout files (.wh..wh.*) to be included in the first place, so here's an edited /usr/local/bin/save-session that should exclude those:
which will allow for extraction within the live filesystem.
(also excluded /mnt for the hell of it)
which has me thinking of moving the exclude list to a user configurable one somewhere in the config folder.
EDIT:
just looking at the config folder, i noticed the "backup" file:
Code: Select all
### Service backup file.
### Files listed here will be copied into a module when you run
### the script /usr/local/bin/setup-config-files
### Files must be listed one per line without space before them.
###
/home/guest/.bashrc
/root/.bashrc
/etc/passwd
/etc/group
/etc/shadow
/etc/gshadow
/etc/login.defs
first correction: it should be /usr/local/bin/backup-config-module
this should work in the opposite fashion to save-session, only keeping what is explicitly included, which is handy when you know exactly what you want to keep, not so much if you don't.