Page 1 of 1

changes=EXIT: manual update

Posted: 05 Oct 2015, 04:32
by Ed_P
changes=EXIT: works great when shutting down Porteus but is there a way to manually perform the save function without shutting down? A command or script that updates the save.dat file the same way the changes=EXIT: cheatcode works.

I'm looking to save USM updates to the save.dat file without the shutdown/reboot senario. Sometimes the updates take a while to complete.

Re: changes=EXIT: manual update

Posted: 05 Oct 2015, 04:56
by donald
While you are running a session with changes=EXIT, you can use the
'dump-session' command (run as root from the command line) to move all
of your changes from RAM to your storage media.

found in cheatcodes.txt.. :wink:

Re: changes=EXIT: manual update

Posted: 05 Oct 2015, 05:47
by Ed_P
:good: Thank you donald. :beer:
donald wrote:found in cheatcodes.txt.. :wink:
I didn't look in that file, but I did look in the FAQ write ups here on the board. Honest. But couldn't find it. :oops:

Re: changes=EXIT: manual update

Posted: 06 Oct 2015, 03:13
by Ed_P
It didn't work donald!!

I boot, update USM, do a dump-session, reboot, updates lost.

Code: Select all

root@porteus:/home/guest# dump-session
syncing what's left in buffers
saving changes to /mnt/sdb1/changes/porteussave.dat - this may take a while...
clearing RAM
session saved
root@porteus:/home/guest# usm -v
 You are using USM version:  3.1.9

root@porteus:/home/guest#
Reboot

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# usm -v
 You are using USM version:  3.1.7

root@porteus:/home/guest# 
bootmode

Code: Select all

root@porteus:/home/guest# ./bootmode.sh
Boot device: /mnt/sdb1
OS: Porteus-v3.0.1
ARCH: x86_64
Kernel: Linux porteus 3.14.15-porteus
quiet \boot\syslinux\vmlinuz from=UUID:F789-E55C extramod=UUID:F789-E55C/Modules;UUID:F789-E55C/modsavedat volume=33 reboot=cold changes=EXIT:UUID:F789-E55C/changes/porteussave.dat initrd=boot\syslinux\initrd.xz
root@porteus:/home/guest# 

Re: changes=EXIT: manual update

Posted: 06 Oct 2015, 23:44
by donald
Hi Ed
That's a pity!

--> changes=EXIT: works great <--> does that mean that the USM updates were stored??

Then you have the 'dump-session' command used, and thereafter rebooted,
and the updates were lost.

now I do have a problem with the logic.
Even if the 'dump-session' did not work, the updates would then be stored at reboot.
(because of the changes=EXIT cheatcode)
Or were the updates never saved?

Re: changes=EXIT: manual update

Posted: 07 Oct 2015, 01:15
by Bogomips
Have been having some sort of problem with usm not being updated. If you try saving something else, does the same occur?

Re: changes=EXIT: manual update

Posted: 07 Oct 2015, 01:56
by Ed_P
Hi guys. :beer:

Well, the situation deepens. I found that NO updates, of any kind, were being saved. :shock: Even simple adds of bookmarks to FF. And the problem is my USB configuration with my rEFInd menu. :wall:

On my USB drive I have:

Code: Select all

guest@porteus:~$ ls -l /mnt/sdb1
total 44
drwxrwxrwx 11 root root 4096 Sep 12 14:59 Backups/
drwxrwxrwx  3 root root 4096 Sep  5 23:29 EFI/
drwxrwxrwx  2 root root 4096 Oct  4 23:27 Modules/
drwxrwxrwx  4 root root 4096 Sep  5 23:40 My_Webpages/
drwxrwxrwx  2 root root 4096 Sep 15 00:01 System\ Volume\ Information/
drwxrwxrwx  4 root root 4096 Oct  5 01:53 Temp/
-rwxrwxrwx  1 root root 1141 Jan 30  2015 USB_INSTALLATION.txt*
drwxrwxrwx  4 root root 4096 Sep  5 23:29 boot/
drwxrwxrwx  2 root root 4096 Oct  4 19:56 changes/
drwxrwxrwx  2 root root 4096 Oct  6 00:28 modsavedat/
drwxrwxrwx  6 root root 4096 Jan 30  2015 porteus/
guest@porteus:~$ ls -l /mnt/sdb1/changes
total 327680
-rwxrwxrwx 1 root root 335544320 Oct  6 00:42 porteussave.dat*
guest@porteus:~$ ls -l /mnt/sdb1/modsavedat
total 327680
-rwxrwxrwx 1 root root 335544320 Oct  6 00:30 porteussave.dat.xzm*
With the porteusave.dat.xzm a copy of my normal porteussave.dat file with the .xzm extention added.

My default boot configuration with the USB drive is to Porteus with a config that has all my changes but without the ability to make changes and have them saved. (Helpful for when the grandkids use a netbook to play games.) Rather than have the changes=EXIT cheatcode I use the extramod= cheatcode with the porteussave.dat.xzm file added on.

Code: Select all

options "from=UUID:F789-E55C extramod=UUID:F789-E55C/Modules;UUID:F789-E55C/modsavedat volume=33 reboot=cold" 
When I want to save changes I boot and use a submenuentry menu that I thought/hoped would override the extramod= cheatcode in the default options parameter.

Code: Select all

	submenuentry "Save changes" {
		add_options "extramod=UUID:F789-E55C/Modules changes=EXIT:UUID:F789-E55C/changes/porteussave.dat" 
    }
I have found that that does not override the override the extramod= cheatcode in the default options parameter.

IF I delete/rename the modsavedat .xzm file and reboot to the Save changes menu saving changes works. Changes are saved when exiting Porteus and when using the dump-session command.

So, at this point I don't know if I need another cheatcode, a different cheatcode, a different rEFInd menu option, a different dump-session command, etc. At least I know what the problem is, and that's half the battle.

Re: changes=EXIT: manual update

Posted: 07 Oct 2015, 03:48
by Ed_P
This arrangement seems to be working.

Code: Select all

	options "from=UUID:F789-E55C extramod=UUID:F789-E55C/Modules;UUID:F789-E55C/modsavedat volume=33 reboot=cold" 
	submenuentry "Save changes" {
		add_options "changes=EXIT:UUID:F789-E55C/changes/porteussave.dat   noload=porteussave.dat.xzm"
    }
Will watch it do a few days to be sure. :)