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 Wed 28 Jun 2017, 17:19
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Yet another basic remaster script for frugal install
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [40 Posts]   Goto page: 1, 2, 3 Next
Author Message
nic007


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

PostPosted: Mon 13 Mar 2017, 12:02    Post subject:  Yet another basic remaster script for frugal install  

I have done three reworked versions of the original builtin remaster script. You don't need a savefile/folder to use these versions. Remasterpup(ISO-CD)(Final) is a comprehensive version dealing with the remaster of the base sfs and providing the options of making an ISO and/or burning to CD (you will need your distribution's ISO or live cd to use this version). Remasterpup(BaseSFS)(Final) was created to remaster the base sfs only. It only has 3 input screens ie. work space options, compression options and configuration options. You don't need the ISO/CD to use this version. Remasterpup(Auto) runs with preset options and no user input required.
Remasterpup.pet
Description 
pet

 Download 
Filename  Remasterpup.pet 
Filesize  17.12 KB 
Downloaded  6 Time(s) 
Remasterpup(Auto).zip
Description 
zip

 Download 
Filename  Remasterpup(Auto).zip 
Filesize  3.51 KB 
Downloaded  13 Time(s) 
Remasterpup(BaseSFS)(Final).zip
Description 
zip

 Download 
Filename  Remasterpup(BaseSFS)(Final).zip 
Filesize  5.41 KB 
Downloaded  17 Time(s) 
Remasterpup(ISO-CD)(Final).zip
Description 
zip

 Download 
Filename  Remasterpup(ISO-CD)(Final).zip 
Filesize  12.89 KB 
Downloaded  17 Time(s) 

Last edited by nic007 on Mon 26 Jun 2017, 08:08; edited 30 times in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10344
Location: Gatineau (Qc), Canada

PostPosted: Tue 28 Mar 2017, 00:50    Post subject:  

HI nic007.

On your copy line, wouldn't
Code:
cp -a /initrd/pup_ro?/* /initrd/pup_rw/*  /mnt/home/puppyfilesystem
be ok?

Or does the pup_ro1 need to be copied after the others?

But very nice. Simpler remastering than this, you die! Wink

BFN.

_________________
musher0
~~~~~~~~~~
« Un insensé sur le trône n'est qu'un singe sur le haut d'un toit. » / "A madman
on the throne is just a monkey on top of a roof." (Bernard de Clervaux)
Back to top
View user's profile Send private message 
nic007


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

PostPosted: Tue 28 Mar 2017, 02:54    Post subject:  

musher0 wrote:
HI nic007.

On your copy line, wouldn't
Code:
cp -a /initrd/pup_ro?/* /initrd/pup_rw/*  /mnt/home/puppyfilesystem
be ok?

Or does the pup_ro1 need to be copied after the others?

But very nice. Simpler remastering than this, you die! Wink

BFN.

pup_ro1 needs to be copied after the others as it holds the contents of the savefile when booting from usb flashdrive. pup_rw records the latest changes during a session so needs to be copied last. Where pup_ro1 is not in use your suggestion should work.
Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 741

PostPosted: Mon 29 May 2017, 13:23    Post subject: Re: Yet another basic remaster script for frugal install  

nic007 wrote:
I use this quick and very basic script to remaster the base sfs sometimes so thought I'd just share it anyway. This should capture the contents of your savefile/folder (ie.programs installed, etc.) as well as the contents of extra sfs files loaded at the time. The working directory must be in a linux filesystem environment (a linux partition works best). Run the script immediately at desktop after booting with savefile/folder and loading any extra sfs files you want to include with your remaster before doing anything else. Note: this is an example script and you may need to change the paths in the script according to your setup. After the new sfs has been created, rename it to the correct name of your distribution's base sfs and move it to where your puppy files reside. Rename the old base sfs and the savefile to something like 1xxxxx (as backup should things not work out as expected). Reboot (without your savefile) and see if your remaster has been successful (afterwhich you can delete the old base sfs and savefile). I tested this with Racy. Puppy's newer than that will probably have the file .XLOADED in /root instead of /etc so you need to change that in the script if so. Hope this is useful to some.

Code:
#!/bin/sh
mkdir /mnt/home/puppyfilesystem
cp -a /initrd/pup_ro2/* /initrd/pup_ro3/* /initrd/pup_ro4/* /initrd/pup_ro5/* /initrd/pup_ro6/* /initrd/pup_ro7/* /initrd/pup_ro8/* /initrd/pup_ro9/* /initrd/pup_rw/*  /mnt/home/puppyfilesystem
wait
cd /mnt/home/puppyfilesystem
rm -r ./initrd ./sys ./etc/.XLOADED
Xdialog -center -msgbox "Puppyfilesystem ready. Check and edit if needed. Press OK when ready" 0 0
mksquashfs /mnt/home/puppyfilesystem /mnt/home/new.sfs -noappend
wait
rm -r /mnt/home/puppyfilesystem
Xdialog -center -title "SUCCESS!!!"  --no-buttons -infobox "Operation completed, exiting now" 0 0 3000
   
exit

Note
The above code is for frugal install to harddrive. If you are booting and running puppy from flashdrive, you need to replace /initrd/pup_rw/* with /initrd/pup_ro1/* in the script (in the same order).


Hi nic007,

I just wanted to post and say 'thank you' for this script. I use it on everything, from old pups up to the very newest (just changing that part you noted in the script for .XLOADED). For me, since I do everything via "frugal" installs, your simple script allowing me to remaster the 'main-puppy.sfs' only is much better than trying to fully remaster a puppy. It s quicker, cleaner and gives me simple flexibility when setting other frugal installs/folders up.

Thank again. Wink
Back to top
View user's profile Send private message 
nic007


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

PostPosted: Mon 29 May 2017, 16:32    Post subject:  

Glad you find it useful belham2. BTW - you can actually just add ./root/.XLOADED to the rm line of the script. The script will delete the applicable file depending on the Puppy you are running and the non-applicable one will not hinder the running of the script.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4583
Location: New Zealand

PostPosted: Tue 30 May 2017, 02:10    Post subject: Re: Yet another basic remaster script for frugal install  

nic007 wrote:
Code:
#!/bin/sh
mkdir /mnt/home/puppyfilesystem....
I always run my puppy without any savefile and I don't have any /mnt/home - everything is done in ram.

Can you suggest any modification of this script to cover my situation? I would like to be able to grab any sfs files that are loaded.

Thus far I have been using an earlier version of one of your remaster scripts and it grabs pets that are loaded but not sfs files.

cheers!

EDIT : I just had a go at making some changes and came up with the following:
Code:
#!/bin/sh
mkdir /tmp/puppyfilesystem
cp -a /initrd/pup_ro2/* /initrd/pup_ro3/* /initrd/pup_ro4/* /initrd/pup_ro5/* /initrd/pup_ro6/* /initrd/pup_ro7/* /initrd/pup_ro8/* /initrd/pup_ro9/* /initrd/pup_rw/*  /tmp/puppyfilesystem
wait
cd /tmp/puppyfilesystem
rm -r ./initrd ./sys ./etc/.XLOADED
Xdialog -center -msgbox "Puppyfilesystem ready. Check and edit if needed. Then please wait for 'success'. message. Press OK when ready." 0 0
mksquashfs /tmp/puppyfilesystem /tmp/new.sfs -noappend
wait
rm -r /tmp/puppyfilesystem
Xdialog -center -title "SUCCESS!!!"  --no-buttons -infobox "Operation completed, exiting now" 0 0 3000
exit


Seems to work - I hope to test it in more depth.
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 8813
Location: Charleston S.C. USA

PostPosted: Tue 30 May 2017, 02:51    Post subject:  

Grabbing loaded SFS packages.

To me that seems to negate the purpose of SFS packages you load.
The idea of SFS packages, of programs, was to be able to use the program and not have it as part of the save or Puppy main SFS package.

If the original SFS package is present.
After you do the remaster, just load it when you want to use it.

The idea of a remaster is to get the contents of the save added as part of the main Puppy SFS.
The custom setup, added installed programs, etc.....

You can get the main Puppy SFS package too big, where it will take a lot of memory to load into memory.

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4583
Location: New Zealand

PostPosted: Tue 30 May 2017, 02:56    Post subject:  

bigpup wrote:
To me that seems to negate the purpose of SFS packages you load.The idea of SFS packages, of programs, was to be able to use the program and not have it as part of the save or Puppy main SFS package.
.
Possibly - but what if you wanted to load (and grab) the devx and remaster it into your new puppy?

There are times where grafting an sfs might be useful.
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 8813
Location: Charleston S.C. USA

PostPosted: Tue 30 May 2017, 03:47    Post subject:  

Sure, anything is what you may want to do. Laughing

However, in your example. The devx is only needed when compiling.
The stuff in it is not needed, normally, to use Puppy and run programs.
Python, may be the only thing in it, you may need to run some programs.
In that situation, install Python.

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send private message 
mfb

Joined: 22 Mar 2016
Posts: 16

PostPosted: Tue 30 May 2017, 05:18    Post subject:  

Hi greengeek,

The screenshot below shows the code I use to remaster from tahr-64-6.0.5 running entirely in ram including two loaded sfs files (one of which is its 100+MB 32 bit compatibility sfs), but I only load the devx.sfs (from the normally unmounted sda2) when I want to use it.

I boot from a CD (with a copy of the main sfs on my hard drive partition sda2 - to bypass the main sfs file on the CD and reduce elapsed boot time from some 200+ seconds to about 65 seconds).

I like gzip level 1 compression and with 3GB total ram (1GB used) it takes 32 seconds to complete the remastered 640MB main sfs (there are many installed pets as well as the loaded sfs files).

The actual script is also available for download. After download, rename it deleting the final three (dot gz) characters and make it executable.

importantly, before running the script you may wish to edit:

* the name of any current main sfs you want to keep (if it might otherwise be overwritten by the remastered version)

* /mnt/sda2/puppy_tahr64_6.0.5.sfs - to reflect your personal choice of main sfs location and/or the exact name as preset for your Pup distribution's main sfs

* gzip1 compression to xz or perhaps lz4 if available (Packit from SFR, though not used to remaster, will show your options if you view its "sfs" drop-down-list).

Extra notes:

* the script can be run from anywhere, but may be best placed on the same partition where the remastered sfs will be located - so the partition is mounted before clicking to run the script.

* The script just runs, without any further action, so just wait for the beep and the centre screen message showing the time taken - then mouse over the message to exit - do not save before rebooting to test.
ram2sfs.png
 Description   
 Filesize   59.24 KB
 Viewed   953 Time(s)

ram2sfs.png

ram2sfs.gz
Description 
gz

 Download 
Filename  ram2sfs.gz 
Filesize  331 Bytes 
Downloaded  22 Time(s) 
Back to top
View user's profile Send private message 
nic007


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

PostPosted: Tue 30 May 2017, 06:10    Post subject: Re: Yet another basic remaster script for frugal install  

greengeek wrote:
nic007 wrote:
Code:
#!/bin/sh
mkdir /mnt/home/puppyfilesystem....
I always run my puppy without any savefile and I don't have any /mnt/home - everything is done in ram.

Can you suggest any modification of this script to cover my situation? I would like to be able to grab any sfs files that are loaded.

Thus far I have been using an earlier version of one of your remaster scripts and it grabs pets that are loaded but not sfs files.

cheers!

EDIT : I just had a go at making some changes and came up with the following:
Code:
#!/bin/sh
mkdir /tmp/puppyfilesystem
cp -a /initrd/pup_ro2/* /initrd/pup_ro3/* /initrd/pup_ro4/* /initrd/pup_ro5/* /initrd/pup_ro6/* /initrd/pup_ro7/* /initrd/pup_ro8/* /initrd/pup_ro9/* /initrd/pup_rw/*  /tmp/puppyfilesystem
wait
cd /tmp/puppyfilesystem
rm -r ./initrd ./sys ./etc/.XLOADED
Xdialog -center -msgbox "Puppyfilesystem ready. Check and edit if needed. Then please wait for 'success'. message. Press OK when ready." 0 0
mksquashfs /tmp/puppyfilesystem /tmp/new.sfs -noappend
wait
rm -r /tmp/puppyfilesystem
Xdialog -center -title "SUCCESS!!!"  --no-buttons -infobox "Operation completed, exiting now" 0 0 3000
exit


Seems to work - I hope to test it in more depth.

That's doing it in RAM, should work if you have enough RAM. The following thread may be of interest to you: http://www.murga-linux.com/puppy/viewtopic.php?t=109745
I keep the original base sfs intact, load sfs's for my applications and record any personal settings also in an sfs file.
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 1734
Location: 500 seconds from Sol

PostPosted: Tue 30 May 2017, 11:44    Post subject: Unload SFSes before Remaster  

[quote="bigpup"]Grabbing loaded SFS packages.

To me that seems to negate the purpose of SFS packages you load.
The idea of SFS packages, of programs, was to be able to use the program and not have it as part of the save or Puppy main SFS package./quote]

Seems to me that this objection could be overcome if, before running remaster, unwanted SFSes are unloaded. Or am I missing something? Coding isn't my strong suit. But, as I read it, this line

cp -a /initrd/pup_ro2/* /initrd/pup_ro3/* /initrd/pup_ro4/* /initrd/pup_ro5/* /initrd/pup_ro6/* /initrd/pup_ro7/* /initrd/pup_ro8/* /initrd/pup_ro9/* /initrd/pup_rw/*

copies loaded SFSes into the remaster. If any of the "ro"s are not in use, noting from that "ro" gets copied.

Since I always run portable-wine (a 32-bit application) from Tahrpup64 and Xenialpup64, part of my initial setup routine is to load the 32-bit compatibility SFS.* On the other hand, I prefer to use the most current web-browsers and LibreOffice SFSes. If I understand the script correctly, a remaster would accomplish my goal if, before remastering, I unloaded Libreoffice and webbrowsers but left the 32-bit compatibility SFS loaded.

mikesLr

* Actually, I've long since converted the compatibility SFS to an installable pet. Consider the statement for the purpose of illustration. Perhaps core Qt4 and Qt5 SFSes would have been better. Both are relatively small, and some applications I use need one, and some the other.
Back to top
View user's profile Send private message 
nic007


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

PostPosted: Tue 30 May 2017, 13:05    Post subject: Re: Unload SFSes before Remaster  

[quote="mikeslr"]
bigpup wrote:
Grabbing loaded SFS packages.

To me that seems to negate the purpose of SFS packages you load.
The idea of SFS packages, of programs, was to be able to use the program and not have it as part of the save or Puppy main SFS package./quote]

Seems to me that this objection could be overcome if, before running remaster, unwanted SFSes are unloaded. Or am I missing something? Coding isn't my strong suit. But, as I read it, this line

cp -a /initrd/pup_ro2/* /initrd/pup_ro3/* /initrd/pup_ro4/* /initrd/pup_ro5/* /initrd/pup_ro6/* /initrd/pup_ro7/* /initrd/pup_ro8/* /initrd/pup_ro9/* /initrd/pup_rw/*

copies loaded SFSes into the remaster. If any of the "ro"s are not in use, noting from that "ro" gets copied.

Since I always run portable-wine (a 32-bit application) from Tahrpup64 and Xenialpup64, part of my initial setup routine is to load the 32-bit compatibility SFS.* On the other hand, I prefer to use the most current web-browsers and LibreOffice SFSes. If I understand the script correctly, a remaster would accomplish my goal if, before remastering, I unloaded Libreoffice and webbrowsers but left the 32-bit compatibility SFS loaded.

mikesLr

* Actually, I've long since converted the compatibility SFS to an installable pet. Consider the statement for the purpose of illustration. Perhaps core Qt4 and Qt5 SFSes would have been better. Both are relatively small, and some applications I use need one, and some the other.

Correct. The script will only include the contents of those extra sfs's which are loaded at the time of the remaster. The installed pets, loaded sfs's and configuration settings will be included in a new base sfs. Some people prefer to have everything included in their base sfs and it is probably the way to go if you want to make your own puplet for sharing.
Back to top
View user's profile Send private message 
Moat


Joined: 16 Jul 2013
Posts: 679
Location: Mid-mitten, USA

PostPosted: Tue 30 May 2017, 19:15    Post subject:  

Plus, it seems some programs are not readily available as .pet packages, but are available as an SFS - and testing a program by running it for a while as an SFS before deciding to include it in the base/main SFS sounds to me like a really great option. Kudos to nic007 for this! Cool

I admit to being one who prefers everything in the base SFS (within reason) - sure, can take longer to boot, but it's always there at the ready when needed, and no fiddling with loading/unloading and interrupting the workflow.

Bob
Back to top
View user's profile Send private message 
ndujoe1

Joined: 04 Dec 2005
Posts: 762

PostPosted: Tue 30 May 2017, 19:28    Post subject:  

Question: so if I remove all the default puppy applications I don't wish to use, the will remaster everything I do use, personal files and sfs's?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [40 Posts]   Goto page: 1, 2, 3 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.0710s ][ Queries: 15 (0.0055s) ][ GZIP on ]