Author |
Message |
gyro
Joined: 28 Oct 2008 Posts: 1688 Location: Brisbane, Australia
|
Posted: Sat 15 Nov 2014, 10:24 Post subject:
savefile2dir 1.6 - Convert savefile to savefolder Subject description: Now supports converting a mounted savefile |
|
Edit:
There is now a savefile2dir-1.6.pet, specifically for older puppies whose savefile contains "/dev/null". It uses "tar" to copy the files, not "cp".
Please see the post on the next page announcing this.
There is no sfs file for this version.
Edit:
There is now a savefile2dir-1.5.pet, specifically for older puppies where "df" does not support the "--output=" option.
Please see the post on the next page announcing this.
There is no sfs file for this version.
Edit:
Please see post below announcing savefile2dir 1.4.
This is now the preferred version.
Edit:
Please see post below announcing savefile2dir 1.3.
Version 1.1 has been withdrawn, please use either 'savefile2dir-1.3.pet' or 'savefile2dir-1.3.sfs.gz', below.
The attached pet installs a console script 'savefile2dir'.
This script converts a savefile into a savefolder.
It is useful when you have a puppy that supports the savefolder facility, but you already have a savefile containing lots of stuff you don't want to just throw away.
When the script is executed on an unmounted savefile, it does the following:
1) Checks that the savefile meets the criteria for a savefolder.
2) Does an fsck of the savefile, to ensure it's integrity.
3) Mounts the savefile.
4) Creates the directory for the savefolder.
5) Copies the contents of the savefile into the savefolder.
6) Renames the savefile by appending '.bak' to it's name.
Once it is finished the target puppy is ready to be rebooted to use the savefolder.
Although savefile2dir now supports converting a mounted savefile, it is preferred that it be used to convert unmounted savefiles. Preferably from a puppy installation other than the target puppy.
Note1: 'savefile2dir' does not add the savefolder facility to the target puppy.
Note2: 'savefile2dir' does not require the savefolder facility to be present in the puppy on which it is executed.
gyro
Last edited by gyro on Mon 13 Jul 2015, 07:33; edited 10 times in total
|
Back to top
|
|
 |
gyro
Joined: 28 Oct 2008 Posts: 1688 Location: Brisbane, Australia
|
Posted: Sat 15 Nov 2014, 10:35 Post subject:
running 'savefile2dir' in pupmode=5 |
|
1) Download 'savefile2dir-1.1.pet' and move it to the root of the partition containing the target savefile.
2) Boot a puppy in pupmode=5, ('pfix=ram'). This can be the target puppy. Don't bother changing anything in the first setup screen.
3) Mount the partition containing the savefile.
4) Click on 'savefile2dir-1.1.pet' to install it.
5) Open a console and enter a command like the following: Code: | savefile2dir /mnt/sda3/tahr/tahrsave.3fs | 6) Unmount the partition containing the new savefolder.
7) Reboot, but choose not to "save". Your previously saved data is not part of this session.
The next normal boot of the target puppy should find the savefolder and all the data previously saved in the old savefile.
gyro
Last edited by gyro on Sun 16 Nov 2014, 05:39; edited 1 time in total
|
Back to top
|
|
 |
gyro
Joined: 28 Oct 2008 Posts: 1688 Location: Brisbane, Australia
|
Posted: Sun 16 Nov 2014, 05:31 Post subject:
savefile2dir - sfs file |
|
Edit:
Version 1.1 has been withdrawn. Please use 'savefile2dir-1.2.sfs.gz', below.
I've attached 'savefile2dir-1.1.sfs here because I find it very useful to use a command like: Code: | unsquashfs -f -d ./ydrv-tahr-sfs/ /mnt/home/savefile2dir-1.1.sfs | to merge it's files into another pet or sfs directory. The content is the same as the pet.
gyro
Last edited by gyro on Fri 21 Nov 2014, 06:02; edited 2 times in total
|
Back to top
|
|
 |
rek769

Joined: 15 Jul 2010 Posts: 80
|
Posted: Sun 16 Nov 2014, 10:58 Post subject:
Could this be used... |
|
...to deploy an identical encrypted savefile onto several machines and then change the password of each savefile to something unique?
If possible, how could it be done?
Thanks
|
Back to top
|
|
 |
gyro
Joined: 28 Oct 2008 Posts: 1688 Location: Brisbane, Australia
|
Posted: Sun 16 Nov 2014, 11:32 Post subject:
Re: Could this be used... |
|
rek769 wrote: | ...to deploy an identical encrypted savefile onto several machines and then change the password of each savefile to something unique?
If possible, how could it be done?
Thanks | No idea.
It's certain that this utility has nothing to contribute to such a scenario.
gyro
|
Back to top
|
|
 |
gyro
Joined: 28 Oct 2008 Posts: 1688 Location: Brisbane, Australia
|
Posted: Thu 20 Nov 2014, 05:56 Post subject:
Announcing savefile2dir 1.2 Subject description: now supporting mounted savefile |
|
This represents a significant rewrite of the code.
Main change is that it now supports converting a currently mounted savefile. So you can use it without booting 'pfix=ram'. But of course it cannot do an 'fsck' of the savefile, or rename it.
If the savefile is not currently mounted, it is checked by 'fsck' before it is mounted. The savefile also gets renamed by appending ".bak", so it will not be found by the next normal boot of the target puppy.
Both '/etc/.XLOADED' and '/etc/rc.d/BOOTCONFIG' are modified to improve the smoothness of the next normal boot.
Just like the previous version, it does not require 'savefolder' to be implemented in the host puppy. It should run on just about any puppy.
I have attached both a .pet and a .sfs.
gyro
Description |
Just 'gunzip' it to get the .sfs file
|

Download |
Filename |
savefile2dir-1.2.sfs.gz |
Filesize |
3.83 KB |
Downloaded |
432 Time(s) |
Description |
A normal pet file
|

Download |
Filename |
savefile2dir-1.2.pet |
Filesize |
3.89 KB |
Downloaded |
454 Time(s) |
|
Back to top
|
|
 |
gyro
Joined: 28 Oct 2008 Posts: 1688 Location: Brisbane, Australia
|
Posted: Sat 29 Nov 2014, 10:31 Post subject:
Announcing savefile2dir 1.3 |
|
This is a small fix, now supports "/root/.XLOADED" as well as "/etc/.XLOADED".
gyro
Description |
Just 'gunzip' it to produce sfs file
|

Download |
Filename |
savefile2dir-1.3.sfs.gz |
Filesize |
3.85 KB |
Downloaded |
396 Time(s) |
Description |
Ordinary .pet file
|

Download |
Filename |
savefile2dir-1.3.pet |
Filesize |
3.91 KB |
Downloaded |
432 Time(s) |
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 5087 Location: Arizona, U.S.A.
|
Posted: Sun 30 Nov 2014, 23:54 Post subject:
|
|
Hi gyro; Don`t think Ive ever talked to you before.
I was not aware any Puppy version supported Save folders.
I suggested this many years ago to Barry and others, but little interest.
I think Barry never used it because it takes longer to do a Save folder fsck.
Where as a Save file or partition is no bigger than the actual Save space.
.
|
Back to top
|
|
 |
gyro
Joined: 28 Oct 2008 Posts: 1688 Location: Brisbane, Australia
|
Posted: Mon 01 Dec 2014, 11:53 Post subject:
|
|
sunburnt wrote: | I was not aware any Puppy version supported Save folders. | It's only been developed this year, http://murga-linux.com/puppy/viewtopic.php?t=93559 and http://murga-linux.com/puppy/viewtopic.php?t=95922.
The first version is currently in woof-ce and hence native in TahrPup 6.0 CE.
The newer implementation using symbolic links, is available in patching mechanisms for a number of puppies.
Edit: I think "FatDog" also has the facility.
gyro
|
Back to top
|
|
 |
bigpup

Joined: 11 Oct 2009 Posts: 12972 Location: S.C. USA
|
Posted: Thu 23 Apr 2015, 02:26 Post subject:
|
|
The save folder (directory) has to be put on a partition that is formatted with a Linux format. (ext 2, 3 ,or 4)
_________________ The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
|
Back to top
|
|
 |
gyro
Joined: 28 Oct 2008 Posts: 1688 Location: Brisbane, Australia
|
Posted: Fri 24 Apr 2015, 10:58 Post subject:
Updated to savefile2dir 1.4 |
|
This script checks the file-system containing the source savefile.
If it's not a Linux file-system then it aborts with an error message.
If it is a Linux file-system then it creates a savefolder in the same directory.
If the created savefolder is moved, make sure the destination partition contains a Linux file-system, (ext2|ext3|ext4|reiserfs|minix|f2fs|tmpfs).
I have attached a pet and sfs of savefile2dir 1.4.
This version contains a more reliable method of determining the file-system type. (Uses "df --output=fstype FILE | tail -1")
gyro
Description |
gunzip file to produce sfs file
|

Download |
Filename |
savefile2dir-1.4.sfs.gz |
Filesize |
3.79 KB |
Downloaded |
337 Time(s) |
Description |
normal .pet file
|

Download |
Filename |
savefile2dir-1.4.pet |
Filesize |
3.81 KB |
Downloaded |
341 Time(s) |
|
Back to top
|
|
 |
Griot

Joined: 12 Sep 2014 Posts: 131 Location: Serbia
|
Posted: Mon 22 Jun 2015, 10:06 Post subject:
|
|
Hello, gyro.
I'm trying to convert Slacko 5.7.0 (NoN PAE k.3.4.82) savefile to savedir... Success=0
(RAM mode)
Code: | savefile2dir /mnt/sda1/slacko-570/slackosave-k15.3fs
df-FULL: unrecognized option '--output=fstype'
Try 'df-FULL --help' for more information. |
(mounted savefile)
Code: | savefile2dir /mnt/home/slacko-570/slackosave-k15.3fs
df-FULL: unrecognized option '--output=fstype'
Try 'df-FULL --help' for more information. |
All partitions are ext3 and I'm not using wine/virtual box.
Any tip how to do this without fresh install?
Thanx!
|
Back to top
|
|
 |
gyro
Joined: 28 Oct 2008 Posts: 1688 Location: Brisbane, Australia
|
Posted: Mon 22 Jun 2015, 13:28 Post subject:
|
|
@Griot,
It appears the script is using a "df" option that your "df" might not support.
What is the output from the following command?
If it doesn't contain any reference to "--output" then I will have to find a different of determining the fstype of the partition.
Or:
Since you assure me that it is an ext3 partition,
the fstype test can be fudged by replacing line 63: Code: | FSTYP="`df --output=fstype \"$imgFile\" | tail -1`" | with
gyro
|
Back to top
|
|
 |
Griot

Joined: 12 Sep 2014 Posts: 131 Location: Serbia
|
Posted: Mon 22 Jun 2015, 14:14 Post subject:
|
|
Thanks for the tip, gyro.
FWIW here's a complete info.
a) You're spot on. No reference about df --output.
Here's a terminal output:
Code: | df --help
Usage: df-FULL [OPTION]... [FILE]...
Show information about the file system on which each FILE resides,
or all file systems by default.
Mandatory arguments to long options are mandatory for short options too.
-a, --all include dummy file systems
-B, --block-size=SIZE scale sizes by SIZE before printing them. E.g.,
'-BM' prints sizes in units of 1,048,576 bytes.
See SIZE format below.
--total produce a grand total
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si likewise, but use powers of 1000 not 1024
-i, --inodes list inode information instead of block usage
-k like --block-size=1K
-l, --local limit listing to local file systems
--no-sync do not invoke sync before getting usage info (default)
-P, --portability use the POSIX output format
--sync invoke sync before getting usage info
-t, --type=TYPE limit listing to file systems of type TYPE
-T, --print-type print file system type
-x, --exclude-type=TYPE limit listing to file systems not of type TYPE
-v (ignored)
--help display this help and exit
--version output version information and exit
Display values are in units of the first available SIZE from --block-size,
and the DF_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).
SIZE is an integer and optional unit (example: 10M is 10*1024*1024). Units
are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of 1000).
Report df-FULL bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'df-FULL invocation' |
b) Terminal output after changing line 63 of the script 'savefile2dir' /root/my-applications/bin/ :
Code: | # savefile2dir /mnt/home/slacko-570/slackosave-k15.3fs
Success:
/initrd/mnt/dev_save/slacko-570/slackosave-k15 created, with contents from /initrd/mnt/dev_save/slacko-570/slackosave-k15.3fs |
Thanks again. Rebooting with savedir.
EDIT: Nope, it doesn't recognize newly created savedir.
Rebooted twice after creating savedir (created from mounted savefile, look for term-out above). Jumped off to RAM, renamed savefile, no luck.
Then I deleted savedir (in RAM mode), tried the same procedure from the beginning and this time savefile iz renamed to .bak and savedir is created but Slacko doesn't recognize it.
Any usefull commands/logs to look for?
Thanks.
|
Back to top
|
|
 |
gyro
Joined: 28 Oct 2008 Posts: 1688 Location: Brisbane, Australia
|
Posted: Mon 22 Jun 2015, 15:36 Post subject:
|
|
@Griot
You have installed the "savefolder" facility for Slacko 5.7, http://www.murga-linux.com/puppy/viewtopic.php?p=809368#809368?
Slacko 5.7 does not support "savefolder" by default.
gyro
|
Back to top
|
|
 |
|