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 Sat 27 May 2017, 11:46
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 1 [3 Posts]  
Author Message
nic007


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

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

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).

Last edited by nic007 on Sat 01 Apr 2017, 06:02; edited 2 times in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10168
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: 1995
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 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
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.0360s ][ Queries: 11 (0.0047s) ][ GZIP on ]