Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 28 May 2017, 18:34
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Replace your savefile/folder with an sfs storage file
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 5 [70 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
nic007


Joined: 13 Nov 2011
Posts: 1995
Location: Cradle of Humankind

PostPosted: Fri 24 Feb 2017, 19:45    Post subject:  

corvus wrote:
nic007 wrote:
BTW - Why did you include /initrd/pup_ro1 in your first script?

Because I want to include my savefolder stuff in "adrv" and when I run puppy with savefolder /initrd/pup_a/ is only an empty folder as shown in screenshot 1, the savefolder stuff are stored in /initrd/mnt/dev_save/tahr64/tahr64save and /initrd/pup_ro1 is a symlink to that folder as shown in screenshot 2.


Strange. In my Tahr605 /initrd/pup_rw is a symlink to the savefolder. But it worked for you so all well. Did you see my prior post with regards to booting SFS files automatically?
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 1995
Location: Cradle of Humankind

PostPosted: Fri 24 Feb 2017, 19:54    Post subject:  

Added another dialog box to script to indicate that operation is completed, see first post.
Last edited by nic007 on Sat 25 Feb 2017, 00:29; edited 1 time in total
Back to top
View user's profile Send private message 
corvus


Joined: 12 Jun 2015
Posts: 125
Location: In the peninsula shaped like a boot.

PostPosted: Fri 24 Feb 2017, 20:13    Post subject:  

nic007 wrote:
Did you see my prior post with regards to booting SFS files automatically?

Yes I did and I'll try to create an ydrv from the sfs I need although I think it is better to put a command in /etc/rc.d/rc.local, as you suggested, but don't know what command, can you give me some tips?

Thanks in advance.

Best regards.

_________________
Hoc unum scio, me nihil scire. Socrate
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 1995
Location: Cradle of Humankind

PostPosted: Sat 25 Feb 2017, 01:03    Post subject:  

corvus wrote:
nic007 wrote:
Did you see my prior post with regards to booting SFS files automatically?

Yes I did and I'll try to create an ydrv from the sfs I need although I think it is better to put a command in /etc/rc.d/rc.local, as you suggested, but don't know what command, can you give me some tips?

Thanks in advance.

Best regards.

Example:
Code:
sfs_load -c -q /mnt/sda3/Opera11.sfs

You can add several with the same command. If you only have one sfs to load you can just rename it to the name of the ydrv of course and move it to the directory where your other puppy files are located.
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1029
Location: GERMANY

PostPosted: Sat 25 Feb 2017, 05:26    Post subject:  

Hi corvus !
Tested your script with Savefolder


Quote:
#!/bin/sh
mkdir /mnt/home/puppyfilesystem
cp -a /initrd/pup_ro1/* /initrd/pup_rw/* /mnt/home/puppyfilesystem
wait
cd /mnt/home/puppyfilesystem
rm -r ./tmp ./mnt ./initrd ./sys ./root/.cache/* ./root/.thumbnails/* ./root/.Trash/* ./root/.XLOADED ./var/log
wait
Xdialog -center -msgbox "Puppyfilesystem ready. Check and edit if needed. Press OK to proceed" 0 0
rm /mnt/home/tahr64/adrv_tahr64_6.0.5.sfs
mksquashfs /mnt/home/puppyfilesystem /mnt/home/tahr64/adrv_tahr64_6.0.5.sfs -comp xz
rm -r /mnt/home/puppyfilesystem

exit


Now works .......with Savefolder loaded .....
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 1995
Location: Cradle of Humankind

PostPosted: Sat 25 Feb 2017, 05:41    Post subject:  

backi wrote:
Hi corvus !
Tested your script with Savefolder


Quote:
#!/bin/sh
mkdir /mnt/home/puppyfilesystem
cp -a /initrd/pup_ro1/* /initrd/pup_rw/* /mnt/home/puppyfilesystem
wait
cd /mnt/home/puppyfilesystem
rm -r ./tmp ./mnt ./initrd ./sys ./root/.cache/* ./root/.thumbnails/* ./root/.Trash/* ./root/.XLOADED ./var/log
wait
Xdialog -center -msgbox "Puppyfilesystem ready. Check and edit if needed. Press OK to proceed" 0 0
rm /mnt/home/tahr64/adrv_tahr64_6.0.5.sfs
mksquashfs /mnt/home/puppyfilesystem /mnt/home/tahr64/adrv_tahr64_6.0.5.sfs -comp xz
rm -r /mnt/home/puppyfilesystem

exit


Now works .......with Savefolder loaded .....

Right, tested with a usb drive/ssd card and indeed in this case /initrd/pup_ro1 must be included. I also copied some files to root and noticed that it's recorded in /initrd/pup_ro1 and not in /initrd/pup_rw. The question is now whether it's necessary to also include /initrd/pup_rw when you are running with usbdrive and savefolder/file to capture the contents of the savefile/folder. Can someone test and give us a definite answer so that I can make a few notes accordingly in the first post. Thanks

Edit: I've decided to make one uniform script which will give the desired result and to limit confusion.
Back to top
View user's profile Send private message 
corvus


Joined: 12 Jun 2015
Posts: 125
Location: In the peninsula shaped like a boot.

PostPosted: Sat 25 Feb 2017, 10:34    Post subject:  

backi wrote:
Hi corvus !
Tested your script with Savefolder


Quote:
#!/bin/sh
mkdir /mnt/home/puppyfilesystem
cp -a /initrd/pup_ro1/* /initrd/pup_rw/* /mnt/home/puppyfilesystem
wait
cd /mnt/home/puppyfilesystem
rm -r ./tmp ./mnt ./initrd ./sys ./root/.cache/* ./root/.thumbnails/* ./root/.Trash/* ./root/.XLOADED ./var/log
wait
Xdialog -center -msgbox "Puppyfilesystem ready. Check and edit if needed. Press OK to proceed" 0 0
rm /mnt/home/tahr64/adrv_tahr64_6.0.5.sfs
mksquashfs /mnt/home/puppyfilesystem /mnt/home/tahr64/adrv_tahr64_6.0.5.sfs -comp xz
rm -r /mnt/home/puppyfilesystem

exit


Now works .......with Savefolder loaded .....

I'm glad it works for you but it's not my script, I have only tweaked nic007's script in accordance with what he himself recommended to do on several post.

nic007 wrote:
.....
Put your sfs-addons in your ydrv like I do and/or add to your zdrv so they are loaded automatically at startup OR load them automatically by way of including a command in /etc/rc.d/rc.local. Smile
.....

I chose to edit the /etc/rc.d/rc.local file as you suggested me to do. Thanks again nic007 for your tips.

nic007 wrote:
.....
The question is now whether it's necessary to also include /initrd/pup_rw when you are running with usbdrive and savefolder/file to capture the contents of the savefile/folder.
......

I think that /initrd/pup_rw contains the changes made during the session, include it or exclude it depends on whether or not you want to save the changes made during the session, and not permanently saved, in the new adrv file.

Regards.

_________________
Hoc unum scio, me nihil scire. Socrate
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 1995
Location: Cradle of Humankind

PostPosted: Sat 25 Feb 2017, 11:04    Post subject:  

corvus wrote:
backi wrote:
Hi corvus !
Tested your script with Savefolder


Quote:
#!/bin/sh
mkdir /mnt/home/puppyfilesystem
cp -a /initrd/pup_ro1/* /initrd/pup_rw/* /mnt/home/puppyfilesystem
wait
cd /mnt/home/puppyfilesystem
rm -r ./tmp ./mnt ./initrd ./sys ./root/.cache/* ./root/.thumbnails/* ./root/.Trash/* ./root/.XLOADED ./var/log
wait
Xdialog -center -msgbox "Puppyfilesystem ready. Check and edit if needed. Press OK to proceed" 0 0
rm /mnt/home/tahr64/adrv_tahr64_6.0.5.sfs
mksquashfs /mnt/home/puppyfilesystem /mnt/home/tahr64/adrv_tahr64_6.0.5.sfs -comp xz
rm -r /mnt/home/puppyfilesystem

exit


Now works .......with Savefolder loaded .....

I'm glad it works for you but it's not my script, I have only tweaked nic007's script in accordance with what he himself recommended to do on several post.

nic007 wrote:
.....
Put your sfs-addons in your ydrv like I do and/or add to your zdrv so they are loaded automatically at startup OR load them automatically by way of including a command in /etc/rc.d/rc.local. Smile
.....

I chose to edit the /etc/rc.d/rc.local file as you suggested me to do. Thanks again nic007 for your tips.

nic007 wrote:
.....
The question is now whether it's necessary to also include /initrd/pup_rw when you are running with usbdrive and savefolder/file to capture the contents of the savefile/folder.
......

I think that /initrd/pup_rw contains the changes made during the session, include it or exclude it depends on whether or not you want to save the changes made during the session, and not permanently saved, in the new adrv file.

Regards.

It's only when you have a savefile/folder loaded when using a pendrive that the session is saved to /initrd/pup_ro1 and not /initrd/pup_rw . I checked it. Only usb drives work this way. No savefile/folder and all other cases /initrd/pup_ro1 stays empty. So it's an exception. In all other cases you only need to copy initrd/pup_rw. It's good that you pointed out the use of /initrd/pup_ro1 with pendrive and savefile/folder, I didn't know that. Once you don't load any savefile/folder with USB /initrd/pup_rw saves session changes.
Back to top
View user's profile Send private message 
kerl

Joined: 16 Apr 2013
Posts: 132

PostPosted: Mon 06 Mar 2017, 13:56    Post subject:  

Hi Nick. Thanks for sharing Smile
Could you elaborate Step 5 ?
What happens if there is a power outage before running the script?
On shutdown, if a savefile cannot be found, won't Puppy nag with a dialog asking to create one? as when one runs Puppy for the first time
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 1995
Location: Cradle of Humankind

PostPosted: Mon 06 Mar 2017, 15:14    Post subject:  

kerl wrote:
Hi Nick. Thanks for sharing Smile
Could you elaborate Step 5 ?
What happens if there is a power outage before running the script?
On shutdown, if a savefile cannot be found, won't Puppy nag with a dialog asking to create one? as when one runs Puppy for the first time

Hi, kerl

Step 5 - If you have your savefile/folder loaded the path to your puppy files will most probably be /mnt/home.... The script assumes this is the case at the first run of the script to save the contents of your savefile/folder. If no savefiles/folder are loaded or none are available this path will change, so you have to edit the script accordingly.

Power outage - you will lose any system changes for that particular session. You can of course run the script at anytime during a session to capture changes in which case you will only lose changes that occurred after the capture.

Yes the save screen will popup by default at reboot/shutdown however you can use one of the following methods:
- Rename the shutdownconfig script found in /usr/sbin to something like 1shutdownconfig (you keep this as a backup). Create a new empty script called shutdownconfig. In this case the saving dialog will not appear at all and reboot/shutdown will follow without issues.
- Edit the timeout seconds in the shutdownconfig script to something like 3 seconds. In this case the save dialog will only appear for 3 seconds before reboot/shutdown commence automatically.

If not using one of the abovementioned methods, you will need to select "No" everytime.
Back to top
View user's profile Send private message 
kerl

Joined: 16 Apr 2013
Posts: 132

PostPosted: Tue 07 Mar 2017, 14:22    Post subject:  

Thanks nic007,
I have to check out why my official Slacko takes so long to boot. I must have a ton of hidden things to boot from a meager 1gb ram. I really need a bathtub
Back to top
View user's profile Send private message 
jd7654

Joined: 06 Apr 2015
Posts: 123

PostPosted: Sat 11 Mar 2017, 05:44    Post subject:  

I was trying something similar, albeit manually without the script, with Slacko 5.7 on an old computer.

The setup is to load normally with savefile, but selecting boot option with pfix=ram loads only base system plus extra software and configs for wireless networking and other personalizations in a zdrv. Basically having a clean read-only environment available on demand for security purposes.

Only problem was a few configs were missing. Not sure of the layers: assuming it was because the zdrv is under the base sfs? What Puppy versions have adrv loaded by default, and is that on top of base sfs layer?

The Quirky frugal mode actually works great with the s.sfs for this purpose, plus having a save button. Was also wondering if the Puppy desktop save button could be integrated into this somehow.
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 1995
Location: Cradle of Humankind

PostPosted: Sat 11 Mar 2017, 07:04    Post subject:  

jd7654 wrote:
I was trying something similar, albeit manually without the script, with Slacko 5.7 on an old computer.

The setup is to load normally with savefile, but selecting boot option with pfix=ram loads only base system plus extra software and configs for wireless networking and other personalizations in a zdrv. Basically having a clean read-only environment available on demand for security purposes.

Only problem was a few configs were missing. Not sure of the layers: assuming it was because the zdrv is under the base sfs? What Puppy versions have adrv loaded by default, and is that on top of base sfs layer?

The Quirky frugal mode actually works great with the s.sfs for this purpose, plus having a save button. Was also wondering if the Puppy desktop save button could be integrated into this somehow.

Yes with older puppys the base sfs takes preference to the zdrv that's why you have to do the swop as suggested in my first post. In newer puppys (tahr, etc.) the adrv and ydrv takes preference to the base sfs and the zdrv which works nicely. The file DISTRO_SPECS found in /etc will generally give an indication if your distribution support the adrv/ydrv. Call the script save (or whatever), select an icon for it and drag to desktop. Delete the old save icon from desktop. To run the script then just click on the icon on your desktop. This method replaces the use of a savefile. BTW - Don't know if this will work with Quirky. Quirky is an experimental release with some things that may or not work like the standard puppys, never tried it myself.
Back to top
View user's profile Send private message 
jd7654

Joined: 06 Apr 2015
Posts: 123

PostPosted: Sat 11 Mar 2017, 13:05    Post subject:  

Tried the base sfs and zdrv swap with Racy 5.5 and screen freaked out with fuzzy lines during bootup, but eventually the desktop appeared and all seemed normal. Don't know what causes that.

With Slacko 5.7 the zdrv swap worked as expected, no difference to normal boot.
Back to top
View user's profile Send private message 
jd7654

Joined: 06 Apr 2015
Posts: 123

PostPosted: Mon 13 Mar 2017, 06:17    Post subject:  

Tested a few Puppies I had installed with test savefiles I had for another purpose, to be able to quickly test.

For newer adrv pups, Tahr 6.0.5 and Slacko 6.3.2 seemed to work OK, but noticed a bit of slowness. Not sure if sign of problems to come. Xenial 7.0.3 partially worked on the first run, but then after the 2nd run started to fail with missing panel and menus. I think something is corrupted.

For older pups with the zdrv swap, Precise 5.7.1 always reverts to Xorg Wizard. Slacko 5.7.0 seems to work the best, seems normal. Racy 5.5 worked but required a few workarounds in the script.

I think one major thing is the danger of running this script on VFAT/Fat32 frugal install. And not sure how much NTFS is fully compliant. I made a change in the Racy test to use a Linux filesystem instead of the vfat on /mnt/home, and then it seemed to work OK.

Probably a lot to ask of a single script to account for all situations and pup versions. Even individual Puppies have many workarounds in the save scripts like snapmergepuppy, etc. And even now Quirky 8.1.6 frugal persistence is broken, so it's par for the course.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 5 [70 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2349s ][ Queries: 14 (0.0145s) ][ GZIP on ]