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 Mon 22 Dec 2014, 15:37
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Partially automated remastering of sfs files
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [31 Posts]   Goto page: 1, 2, 3 Next
Author Message
artsown

Joined: 12 Sep 2012
Posts: 147

PostPosted: Sun 12 Jan 2014, 16:34    Post subject:  Partially automated remastering of sfs files
Subject description: Quick remasters
 

I used manual remastering info from here:
http://www.smokey01.com/coolpup/remastering.html
to create machine specific remasters of frugal installs, including
personal Save files that include installs of the latest Firefox
browser, my bookmarks, Flash player, Sylpheed, Pan, wireless
setup, and the Freecell game. Included also is the MVPS hosts file
in /etc which makes browsing and internet searches much more
sane (ad free). The following script includes merging of the entire
personal Save file. Typically, the new sfs is about 60 meg
larger in size. I have no interest in trying to remove anything.
Sda2 is a 10 gig ext2 partition I use for strictly for this purpose:
-------------- Save this text as makesfs.sh ----------------------------
echo "Please wait. Copying files from original squash file ..."
mkdir -p /mnt/sda2/work
cp -a /initrd/pup_ro2/* /mnt/sda2/work
echo "Merging files from personal Save file ..."
cp -a /initrd/pup_rw/* /mnt/sda2/work
echo "Creating remaster ..."
mkdir -p /mnt/sda2/remaster
cd /mnt/sda2
mksquashfs work remaster/puppy.sfs -noappend
echo "Finished! Remastered file puppy.sfs is in /mnt/sda2/remaster"
---------------------------------------------------------------------------------------
Make sure sda2 is mounted, and then open a terminal. If you locate
the file in /root then type:
sh /root/makesfs.sh

When it finishes, rename puppy.sfs to the particular
name of the puppy .sfs file. I rename the old .sfs and
.2fs files before copying the remastered .sfs file to
their directory. If all is well, I then delete the old
renamed files.

I find I create new .sfs files in four to six minutes using this
script, which is fast enough that I don't mind using it when
a new version of Firefox is available. I manually delete the
/work and /remaster directories when finished with them
so I'm ready to run the script again in the future.

01micko's article on remastering (above link) includes a long line
of text used to create a new iso file that contains the new .sfs
file. I've used that (modified) line in a script I named makeiso.sh
which I run in a terminal. The creation of a new .iso (if that's
your goal) just takes another few seconds. However, I have
little use for remastered .iso files. My interest is strictly in
protecting the work I put into personalizing a frugal installed
pup.

Art
Back to top
View user's profile Send private message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 548

PostPosted: Tue 14 Jan 2014, 10:50    Post subject: Re: Partially automated remastering of sfs files
Subject description: Quick remasters
 

artsown wrote:
I used manual remastering info from here:
http://www.smokey01.com/coolpup/remastering.html


Just a quick thought from my long list of things for later:

If only that which I've changed goes into the main SFS and the old SFS gets turned into an "addon" SFS that gets loaded, under the main one, the new SFS will be small and fairly easy to create. The tick would be automating the action.
Back to top
View user's profile Send private message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Tue 14 Jan 2014, 15:52    Post subject: Re: Partially automated remastering of sfs files
Subject description: Quick remasters
 

Moose On The Loose wrote:
Just a quick thought from my long list of things for later:

If only that which I've changed goes into the main SFS and the old SFS gets turned into an "addon" SFS that gets loaded, under the main one, the new SFS will be small and fairly easy to create. The tick would be automating the action.

That should be easily to be created (since I'm already using something similar in my Personal Data & Config SFS Manager)!

1. do a snapshot right after X is running of /initrd/pup_rw
- - means: write (echo) everything that is found in there into a first list
2. do your changes and installations etc.pp.
3. do a gain a snapshot of /initrd/pup_rw
- - means: write (echo) everything that is found in there into a second list
4. read out the second list and copy everything that's not found in first list into a directory where to create the new SFS from
5. rename the Puppy's main SFS
6. rename the new created SFS to the main SFS

One could define also lists of directories and/or files that included or even excluded in each case of a remaster!

The real problem here will be then the init script in initrd.gz!

Smarter solution would be to not to rename the SFS Modules and to use the script by mikeb, to mount SFS Modules on top of the top layer. You can find a link to this script at the second post of A vote for a modular use of Puppy Linux.

Another solution could be just to load the new created SFS before X is running, copying all files into the OS and immediately unload the SFS again.

My Personal Data & Config SFS Manager does it exactly this way for a config SFS and a data SFS separately. I'm adding new files or removing included files just by right-click action. Everything und /mnt is excluded and blocked.

My funny little private quick-remaster!

RSH

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
Smithy


Joined: 12 Dec 2011
Posts: 461

PostPosted: Tue 14 Jan 2014, 17:12    Post subject:  

Code:
-------------- Save this text as makesfs.sh ----------------------------
echo "Please wait. Copying files from original squash file ..."
mkdir -p /mnt/sda2/work
cp -a /initrd/pup_ro2/* /mnt/sda2/work
echo "Merging files from personal Save file ..."
cp -a /initrd/pup_rw/* /mnt/sda2/work
echo "Creating remaster ..."
mkdir -p /mnt/sda2/remaster
cd /mnt/sda2
mksquashfs work remaster/puppy.sfs -noappend
echo "Finished! Remastered file puppy.sfs is in /mnt/sda2/remaster"


Groovy, can this Quick Remaster be done in ram, no save file just tweaks?
After doing tweaks to a Live Ram Puppy, could this be used to create a new sfs and just dumped to root? Then you can put your newly created sfs on a stick with the other bits.
That would be Quick Quick Remaster Wink
Back to top
View user's profile Send private message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Tue 14 Jan 2014, 17:35    Post subject:  

This method will of course include some files that I've seen often recommended NOT to include in a remaster, like:

- /etc/.XLOADED
- .wh. files
- generally files in /root, /etc and /tmp

Might be suitable for private use only - and probably only for the computer used to remaster the OS.

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2534
Location: Heart of Texas

PostPosted: Tue 14 Jan 2014, 17:50    Post subject:  

Ive posted my multisession sloppy remaster. It removes most known duplicates from initrd and almost all tmp files not in temp. the X file must be removed. But it snapshots a running copy so that is different then this I think. It will also show how to get the name of what its running in, Progress popup etc. Feel free to borrow and update..
Back to top
View user's profile Send private message 
artsown

Joined: 12 Sep 2012
Posts: 147

PostPosted: Tue 14 Jan 2014, 19:19    Post subject:  

Smithy, I just ran across this:
http://murga-linux.com/puppy/viewtopic.php?search_id=543376888&t=89173
I haven't tried it yet but since the new squash file creation takes up most
of the remastering time, (not the file copying) it looks interesting.

Art
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9067

PostPosted: Wed 15 Jan 2014, 04:57    Post subject:  

Check out mksquashfs options... you can choose compression options ... for my save I choose no compression...gives similar speed to tar that way. Without lzma there is a considerable speedup I notice (slax module building for example) Xz would be similar as xz is just a later form of lzma.

Agreed the whiteouts could do with better handling but don't use snap merge as a reference on that.

mike
Back to top
View user's profile Send private message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 548

PostPosted: Wed 15 Jan 2014, 09:57    Post subject:  

mikeb wrote:
Check out mksquashfs options... you can choose compression options ... for my save I choose no compression...gives similar speed to tar that way. Without lzma there is a considerable speedup I notice (slax module building for example) Xz would be similar as xz is just a later form of lzma.

Agreed the whiteouts could do with better handling but don't use snap merge as a reference on that.

mike


Perhaps a tool that took the SFS and 2SF files as inputs instead of doing it on a live system would be better. You could do two frugal installs on the same machine. One can serve as the backup in case you mung the other. Running in the backup one, a tool could let you move things in and out of the SFSs from the 2SF of the normal system.
Back to top
View user's profile Send private message 
artsown

Joined: 12 Sep 2012
Posts: 147

PostPosted: Wed 15 Jan 2014, 11:19    Post subject:  

Ok, I tried the mksquashfs from here:
http://murga-linux.com/puppy/viewtopic.php?search_id=543376888&t=89173
and it is indeed fast. Instead of 4 to 6 minutes to remaster, the time is more like
100 seconds ... about 50 seconds to copy files and 50 seconds to make the new squash
file. Thiis is on a twelve or thirteen year old desktop having a 2 ghz p4 and 768 meg RAM.

I used file finder to locate the existing mksquashfs files and found there were copies
in both /usr/bin and /usr/sbin I used the existing symlinks to point to the new
executeable which I renamed. (The old ones had names like mkquashfs4).

This added step of replacing the mksquashfs file is now part of my customization
plan.

I have remastered a number of different puppy versions, and I like to run them without
creating/using a personal Save file. The only artifact that often exists is a message
during bootup that a power fail was detected. I simply choose Ignore, but for the fun
of it, I might next take a look at removing this message.

Art
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9067

PostPosted: Wed 15 Jan 2014, 13:30    Post subject:  

Check out mksquashfs options... you can choose compression options ... for my save I choose no compression...gives similar speed to tar that way. Without lzma there is a considerable speedup I notice (slax module building for example) Xz would be similar as xz is just a later form of lzma.

How do you think I disable compression...by hanging my legs out of the window?

have fun

mike
Back to top
View user's profile Send private message 
Smithy


Joined: 12 Dec 2011
Posts: 461

PostPosted: Wed 15 Jan 2014, 14:02    Post subject:  

Artsowen, that power failure message at the boot could be related to Xloaded, I remember a tip to rem out something or delete xloaded.

Mike, you touch type with your toes then Smile

Anyone still using pizzagood's edit sfs. Really good, and Don I think added an option to do two compression types at the end. Some of those printer drivers break it (option at beginning to decompress to partition or ram, just defaults to ram).
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9067

PostPosted: Wed 15 Jan 2014, 14:48    Post subject:  

Quote:
Mike, you touch type with your toes then Smile


ever since I learned to juggle.

I forget that we have the option to colour our posts...these technical forums are just too plain....

miswak


Back to top
View user's profile Send private message 
artsown

Joined: 12 Sep 2012
Posts: 147

PostPosted: Wed 15 Jan 2014, 15:44    Post subject:  

No need to shout, mikeb. I heard you the first time Smile I certainly hope you don't start
a fad here of kiddie cartoon printing. The world is far too looney as it is.

Art
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9067

PostPosted: Wed 15 Jan 2014, 15:49    Post subject:  

Just want to bring some colour to thee world.

Anyway, ever heard of anyone shouting in green?

As for the loony world we went out in it this afternoon and got reminded of why we avoid it Very Happy

Perhaps I want a new career painting forum threads....for those who have an aversion to white.

Laugh, and the world run a mile,

mike

ps nice ideas by the way in yer thread
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [31 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.0922s ][ Queries: 12 (0.0048s) ][ GZIP on ]