Don't know about elegant but I'm glad it works for you.backi wrote:Hi nic007 !
Your elegant Script answers a lot of Questions mentioned here on this Thread :
http://www.murga-linux.com/puppy/viewtopic.php?t=109585
Cheers !
Replace your savefile/folder with an sfs storage file
Hi nic007 !
As far as i understood your Script does not work/create adrv.sfs when Save/File/Folder is loaded at bootup .?
How to accomplish including Savefile or Savefolder ..Well, not so sophisticated but useful nevertheless. Just to add - if you have a savefile or savefolder, the script will include that data in the created sfs file (less browser cache and trash items, etc. unless you want to keep it). After running the script, you can rename your existing savefile/folder so that it doesn't load at next boot. If you are happy with the result you can delete the savefile/folder and never use one again. The script is an EXAMPLE and you need to adapt it according to your setup and needs.
As far as i understood your Script does not work/create adrv.sfs when Save/File/Folder is loaded at bootup .?
Same script should work if you make sure the paths are correct. If your savefile/folder is big though, it's going to take longer to create the adrv to include that data.backi wrote:Hi nic007 !
How to accomplish including Savefile or Savefolder ..Well, not so sophisticated but useful nevertheless. Just to add - if you have a savefile or savefolder, the script will include that data in the created sfs file (less browser cache and trash items, etc. unless you want to keep it). After running the script, you can rename your existing savefile/folder so that it doesn't load at next boot. If you are happy with the result you can delete the savefile/folder and never use one again. The script is an EXAMPLE and you need to adapt it according to your setup and needs.
As far as i understood your Script does not work/create adrv.sfs when Save/File/Folder is loaded at bootup .?
The directories when you boot with a savefolder and when you boot without savefolder may be different. Booting with a savefile/folder may give you a mnt/home directory. Check and change the script accordingly. Your stck must be mounted because you are writing data to the stick.backi wrote:Sorry for steeling your precious time nic007 .
But tried with loaded SaveFOLDER at startup .......in this case the "puppyfilesystem" will not be created ....so no adrv.sfs .
Booting without SaveFOLDER loaded .........in this case the "puppyfilesystem" will e created ....so the adrv.sfs .
When booting with Savefolder loaded at bootup
I replaced in my case sdb1 with home in the script ....now adrive will be created .
But looking in puppyfilesystem Folder in Usb Stick alot of Directories are missing opt for example
Creating the adrive is happening after modifying my script but a lot of .....Rebooted
but it seems it will not work correctly . Seems it will not work with loaded Savefolder as a kind of saving or remastering the whole running System into an adrive .
Maybe one have to copy Folder root and Folder etc into tmp as in the remaster procedure .
I replaced in my case sdb1 with home in the script ....now adrive will be created .
But looking in puppyfilesystem Folder in Usb Stick alot of Directories are missing opt for example
Creating the adrive is happening after modifying my script but a lot of .....Rebooted
but it seems it will not work correctly . Seems it will not work with loaded Savefolder as a kind of saving or remastering the whole running System into an adrive .
Maybe one have to copy Folder root and Folder etc into tmp as in the remaster procedure .
How did you install your programs, are you using any sfs-addons? This script only includes stuff that were installed to savefile/savefolderbacki wrote:When booting with Savefolder loaded at bootup
I replaced in my case sdb1 with home in the script ....now adrive will be created .
But looking in puppyfilesystem Folder in Usb Stick alot of Directories are missing opt for example
Creating the adrive is happening after modifying my script but a lot of .....Rebooted
but it seems it will not work correctly . Seems it will not work with loaded Savefolder as a kind of saving or remastering the whole running System into an adrive .
Maybe one have to copy Folder root and Folder etc into tmp as in the remaster procedure .
Thanks for your support .
But for me it seems not to work with a Savefolder loaded at Startup.....for what reason ever .In the moment i find it to complicated to research deeper into this type of Replacement for a Savefolder .
On the first sight looked like an easy alternative for a Save/folder/file... but seems not to work the way i expected ....its not your fault .
I myself don`t have any Problems with Save File/Folder ......nevertheless ....find your script quite interesting .
But for me it seems not to work with a Savefolder loaded at Startup.....for what reason ever .In the moment i find it to complicated to research deeper into this type of Replacement for a Savefolder .
On the first sight looked like an easy alternative for a Save/folder/file... but seems not to work the way i expected ....its not your fault .
I myself don`t have any Problems with Save File/Folder ......nevertheless ....find your script quite interesting .
I'm surprised that the script works reliably with "pfix=nocopy" in the boot entry.backi wrote:title Puppy tahr 6.0.6 (sdb1)
find --set-root --ignore-floppies --ignore-cd /puppy_tahr_6.0.6.sfs
kernel /vmlinuz pmedia=usbflash pfix=fsck,nocopy
initrd /initrd.gz
Usually the "init" script copies these sfs files into a tmpfs in ram and uses those. So the adrv on disk is not in use and so can be deleted and recreated, and the affect is not seen until the next boot.
But, with "pfix=nocopy", these sfs files are not copied and the ones on disk are mounted and active in the aufs stack. So I'm surprised that deleting and re-creating such a file works reliably.
But hey, if it works for you, go for it.
Hmm.., you could be saved by Unix/Linux.
An open file can be "deleted" and the process retains access to the file via it's "inode" until it closes the file, only then does the file actually go away.
So perhaps the aufs stack continues to use the "deleted" copy of the adrv file.
gyro
Hi all, following my experience about:
Puppy booted from USB key with savefolder:
"adrv" created successfully, in my case 18MB in 10 seconds.
Rebooted and reloaded puppy with pfix=ram, during boot "adrv" loaded with success, mounted sdb1 (my USB stick) and renamed my savefolder "1tahr64save".
At this point I changed again nic007's script in order to save any changes.
The only drawback with this method is that you have to load on the fly your .sfs file and configuring them each time.
Thank's for your work nic007 much appreciated.
Puppy booted from USB key with savefolder:
Code: Select all
#!/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
Rebooted and reloaded puppy with pfix=ram, during boot "adrv" loaded with success, mounted sdb1 (my USB stick) and renamed my savefolder "1tahr64save".
At this point I changed again nic007's script in order to save any changes.
Code: Select all
#!/bin/sh
mkdir /mnt/sdb1/puppyfilesystem
cp -a /initrd/pup_a/* /initrd/pup_rw/* /mnt/sdb1/puppyfilesystem
wait
cd /mnt/sdb1/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/sdb1/tahr64/adrv_tahr64_6.0.5.sfs
mksquashfs /mnt/sdb1/puppyfilesystem /mnt/sdb1/tahr64/adrv_tahr64_6.0.5.sfs -comp xz
rm -r /mnt/sdb1/puppyfilesystem
exit
Thank's for your work nic007 much appreciated.
Last edited by corvus on Fri 24 Feb 2017, 19:41, edited 1 time in total.
[b]We are waves of the same sea, leaves of the same tree, flowers of the same garden.[/b]
Do a proper remaster and then use the script from then on to record your changes in future. The other thing is that this should definitely work with a current savefile, perhaps the same can not be achieved with a savefolder (although I can not see why not). This is not a remaster script as such that's why I asked the questions. I don't install anything but use sfs add-ons instead. So I have the base sfs, sfs-addons (additional programs) which gets loaded automatically at boot and then my adrv with personal changes (about 5MB). Personally I hate big savefile/folders but some like them. Works a treat for me but each to their own.backi wrote:Thanks for your support .
But for me it seems not to work with a Savefolder loaded at Startup.....for what reason ever .In the moment i find it to complicated to research deeper into this type of Replacement for a Savefolder .
On the first sight looked like an easy alternative for a Save/folder/file... but seems not to work the way i expected ....its not your fault .
I myself don`t have any Problems with Save File/Folder ......nevertheless ....find your script quite interesting .
BTW - I seem to remember from long ago when I still did remasters that somehow /opt (normally the java installation) does not copy from /initrd/pup_rw so you will have to copy it from the main running system located at /opt if you want to save that data from your savefolder to your adrv. You only need to do this once of course.
Last edited by nic007 on Fri 24 Feb 2017, 21:29, edited 1 time in total.
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.corvus wrote:Hi all, following my experience about:
Puppy booted from USB key with savefolder:
"adrv" created successfully, in my case 18MB in 10 seconds.Code: Select all
#!/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
Rebooted and reloaded puppy with pfix=ram, during boot "adrv" loaded with success, mounted sdb1 (my USB stick) and renamed my savefolder "1tahr64save".
At this point I changed again nic007's script in order to save any changes.
Code: Select all
#!/bin/sh mkdir /mnt/sdb1/puppyfilesystem cp -a /initrd/pup_a/* /initrd/pup_rw/* /mnt/sdb1/puppyfilesystem wait cd /mnt/sdb1/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/sdb1/tahr64/adrv_tahr64_6.0.5.sfs mksquashfs /mnt/sdb1/puppyfilesystem /mnt/sdb1/tahr64/adrv_tahr64_6.0.5.sfs -comp xz rm -r /mnt/sdb1/puppyfilesystem exit
The only drawback with this method is that you have to load on the fly your .sfs file and configuring them each time.
Thank's for your work nic007 much appreciated.
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.nic007 wrote:BTW - Why did you include /initrd/pup_ro1 in your first script?
- Attachments
-
- Screenshot_1.png
- (28.65 KiB) Downloaded 373 times
-
- Screenshot_2.png
- (22.94 KiB) Downloaded 371 times
[b]We are waves of the same sea, leaves of the same tree, flowers of the same garden.[/b]
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?corvus wrote: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.nic007 wrote:BTW - Why did you include /initrd/pup_ro1 in your first script?
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?nic007 wrote: Did you see my prior post with regards to booting SFS files automatically?
Thanks in advance.
Best regards.
[b]We are waves of the same sea, leaves of the same tree, flowers of the same garden.[/b]
Example:corvus wrote: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?nic007 wrote: Did you see my prior post with regards to booting SFS files automatically?
Thanks in advance.
Best regards.
Code: Select all
sfs_load -c -q /mnt/sda3/Opera11.sfs
Hi corvus !
Tested your script with Savefolder
Tested your script with Savefolder
Now works .......with Savefolder loaded .....#!/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