Save.dat container (SOLVED)

Post here if you are a new Porteus member and you're looking for some help.
User avatar
Ed_P
Contributor
Contributor
Posts: 3402
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: Save.dat container

Post#46 by Ed_P » 16 Dec 2013, 15:33

francois wrote:What do you want to do? The question is not clear to me.
Hello neighbor. Sorry my question was kinda vague.

When I start Porteus from the ISO without the save.dat file I have to enter my WiFi password, my Porteus signon password, run my NTFS and touchpad fixes and etc. etc. Having the save.dat file saves me all that which is great and I've come to put a lot of importance on the save.dat file.

If I start Porteus and wish to experiment with new apps, new console commands, new scripts that I create, etc. I'm afraid I will screw up my system, and if that happens I don't want any of the changes I've made to be saved. I want to reboot and try again, not totally from scratch but from the last good save.dat so I don't have to reenter my passwords, fixes, etc.

Is that any clearer as to what I'm trying to do?
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5652
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Save.dat container

Post#47 by brokenman » 16 Dec 2013, 15:53

In that case you can simply save your sessions as a module. In the porteus settings centre (found in the menu) click on the image of the floppy disk at the top. Then click on the session saver button. Please them all into a folder called something like 'mysessions'. You can make modules from your sessions. Then you can boot with the cheatcode load=/path/to/mysessions and all the modules in this folder (your saved sessions will be loaded.)

This is how i would do it.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3402
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: Save.dat container

Post#48 by Ed_P » 16 Dec 2013, 18:51

brokenman wrote:In that case you can simply save your sessions as a module. In the porteus settings centre (found in the menu) click on the image of the floppy disk at the top. Then click on the session saver button. Please them all into a folder called something like 'mysessions'. You can make modules from your sessions. Then you can boot with the cheatcode load=/path/to/mysessions and all the modules in this folder (your saved sessions will be loaded.)

This is how i would do it.
:shock: Wow!! I like this idea. :good:

Let me be sure I understand this, I start Porteus, it uses my save.dat and restores my passwords and etc. I then try something like getting java to work, actually get it to work (I like to dream), I then save my session as a module, I reboot in Fresh mode, but with the cheatcode to load= and I will have my passwords, and etc and my java work?
Ed

tome
Contributor
Contributor
Posts: 575
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: Save.dat container

Post#49 by tome » 16 Dec 2013, 22:51

Ed_P, you can also move your save.dat file to your modules and change name to save.dat.xzm

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: Save.dat container

Post#50 by phhpro » 17 Dec 2013, 00:51

As brokenman suggested, that's almost how I save all the time. Just create a module from your home folder, done. Before switching off the box, I simply put it back on the server. Next time logged in, fetch it, activate and do a quick logout, login. Hello? All my settings and data is there, love it. ;)

User avatar
Ed_P
Contributor
Contributor
Posts: 3402
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: Save.dat container

Post#51 by Ed_P » 17 Dec 2013, 03:16

tome wrote:Ed_P, you can also move your save.dat file to your modules and change name to save.dat.xzm
!! Interesting.
phhpro wrote:As brokenman suggested, that's almost how I save all the time. Just create a module from your home folder, done. Before switching off the box, I simply put it back on the server. Next time logged in, fetch it, activate and do a quick logout, login. Hello? All my settings and data is there, love it. ;)
Ah... thank you @phhpro but that sounds like more work than switching to root and running a script to reapply changes. Hopefully with the load= cheatcode there's less steps.
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 3402
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: Save.dat container

Post#52 by Ed_P » 17 Dec 2013, 03:58

brokenman wrote:In the porteus settings centre (found in the menu)
Found in the System Tools section.
click on the image of the floppy disk at the top. Then click on the session saver button. Please them all into a folder called something like 'mysessions'.
Which must be a POSIX compatible format and NTFS is not. Does saving to a file work as a module? I saved it as a module just in case.
Then you can boot with the cheatcode load=/path/to/mysessions and all the modules in this folder (your saved sessions will be loaded.)
Just to clarify, /path/to/ is E:/Porteus/ or /sda6/Porteus/?
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5652
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Save.dat container

Post#53 by brokenman » 17 Dec 2013, 13:31

Ed, if you are using a save.dat file then there is no need to save your session since all changes you make are applied to your save.dat file. That means when you get java to run, whatever you changed was saved into your save.dat file. Might i suggest setting up your system how you like it, and then using the 'save session' function to create a module which you place into the 'modules' folder. Then you can boot into fresh mode and play around. You can't mess anything up and if you want to save your session after doing something you want to keep, save your session again.

It is important to note (thanks phhpro) that you must save the module (save session) onto a linux filesystem otherwise you may mess up important permissions.

Does saving to a file work as a module?
It creates a save.dat file. As tome mentioned you can treat it as a module with more versatility.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3402
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: Save.dat container

Post#54 by Ed_P » 17 Dec 2013, 16:52

brokenman wrote:Ed, if you are using a save.dat file then there is no need to save your session since all changes you make are applied to your save.dat file.
Exactly, and if I make a bad change or an inadvertent change it gets saved also so when I try to repeat a test I can't.
That means when you get java to run, whatever you changed was saved into your save.dat file. Might i suggest setting up your system how you like it, and then using the 'save session' function to create a module which you place into the 'modules' folder. Then you can boot into fresh mode and play around. You can't mess anything up and if you want to save your session after doing something you want to keep, save your session again.
Yes, I would like to use that approach but ran into a problem noted previously. Can the module be stored within Porteus, ie in a /guest/home/ folder or something? Because the machine I'm running Porteus on is all NTFS so saving to a folder on it isn't allowed. I can save as a module or a file though. Where does Porteus save it's modules?
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5652
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Save.dat container

Post#55 by brokenman » 17 Dec 2013, 22:15

Exactly, and if I make a bad change or an inadvertent change it gets saved also so when I try to repeat a test I can't.
Using the two together makes no sense, but there are other options for you.

You can't save your session as a module to anywhere in the aufs file system (e.g /home/guest or /tmp). It must be saved on a real file system (and not NTFS or FAT).

You can however choose to save the session to a save.dat file. This can be an existing save.dat or you can create one. This means you can boot without your changes= cheatcode. Work until you want to save and then save your session into the existing save.dat file (that is not in use).
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4623
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Save.dat container

Post#56 by fanthom » 17 Dec 2013, 22:35

@Ed_P
you could also boot with 'changes=EXIT:/path/save.dat' (more info about EXIT: extension in /boot/docs/cheatcodes.txt) and delete /mnt/live/tmp/changes-exit file when dont want to save the session.
if you want to save then do not touch this file.
(now you got some secret porteus knowledge which only advanced users should know)
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 3402
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: Save.dat container

Post#57 by Ed_P » 18 Dec 2013, 00:04

brokenman wrote:You can't save your session as a module to anywhere in the aufs file system (e.g /home/guest or /tmp). It must be saved on a real file system (and not NTFS or FAT).
Actually I think I can. On my /mnt/sda6/ NTFS drive I have a changes-131216.xzm file. I haven't booted with the load= cheatcode pointing to it yet so I can't verify that it works.
You can however choose to save the session to a save.dat file. This can be an existing save.dat or you can create one. This means you can boot without your changes= cheatcode. Work until you want to save and then save your session into the existing save.dat file (that is not in use).
But at some point to reuse the saved session I have to use the save.dat file and if I want to tweak it it is in use.
fanthom wrote:@Ed_P
you could also boot with 'changes=EXIT:/path/save.dat' (more info about EXIT: extension in /boot/docs/cheatcodes.txt) and delete /mnt/live/tmp/changes-exit file when dont want to save the session.
if you want to save then do not touch this file.
(now you got some secret porteus knowledge which only advanced users should know)
:D Thanks @fanthom.

At this point when using the changes=EXIT cheatcode I try not to save changes by pressing a key other than enter or space bar when rebooting. But sometimes I forget or am distracted or just plain dumb.
Ed

jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Re: Save.dat container

Post#58 by jimwg » 18 Dec 2013, 02:30

brokenman wrote:
It is important to note (thanks phhpro) that you must save the module (save session) onto a linux filesystem otherwise you may mess up important permissions..
Seasons Greetings!

I'm just guessing, but is there any way to directly save a session as a image file or a zip file? According my reads those retain all your file's qualities no matter whether you're saving on a Windows or Mac disk or flash.

Just asking and learning!

Jim in NYC

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: Save.dat container

Post#59 by phhpro » 18 Dec 2013, 03:50

@jimwg: xzm is pretty much an xz compressed archive with an m (m_odule??) added. No need to re-pack.

@Ed_P: Write a script to match your needs and add a link to the menu. Optional, you could edit your conf to exec the script either automatically or interactive at logoff, shutdown. You'd only need to do this once. I understand your concern regarding (auto)loading a corrupt save file; that's why I default to completely export the thing. If then I activate the module, and for some reason something goes oops, just say deactivate. However, that's fairly unlikely, since your system would break long before. In that case, I usually kill the whole box before booting from scratch. Easy enough to save different configs for different purposes. YMMV ;)

User avatar
Ed_P
Contributor
Contributor
Posts: 3402
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: Save.dat container

Post#60 by Ed_P » 18 Dec 2013, 05:12

Ok, no joy.

Tried load=/changes-131216.xzm - didn't work.
Tried load=/save.xzm (a copy of save.dat renamed) - didn't work.

:(
Ed

Locked