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 26 Nov 2014, 04:55
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
HOWTO Remaster a big Puplet (~700 MB)
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Wed 17 Feb 2010, 05:54    Post_subject:  HOWTO Remaster a big Puplet (~700 MB)
Sub_title: Memory, Swap, and other issues I found while making SageLivePUP
 

Hi,

I recently made a Live CD version of Sage math package based on Puppy Linux. I had a nicely running version on my computer. I thought using puppies remaster wizard would make it a breeze, but the process to get a working iso was harder, than I imagined. I think I share my experience. Disclaimer: I write this as a first timer for other first timers, but I also have some questions for the experienced.

Desktop and Menu structure
I put some effort in to create Desktop icons and menu entries but was very disappointed that they didn't appear in my remastered Isos. Since remastering 700 MB takes time it took me hours, 2 CD's and a forum request (thanks @ Minimatter and mil0001) to find that:
To preserve menus and Desktop design it is necessary to copy the relevant files of the /root and /etc directory manually when prompted by the wizard. I found most of the files at last, but one thing I missed was the file where the text color of the Desktop Icons is saved (Anybody knows this?). In the end I settled to copy ALL of /root and /etc to the tmp/root and /tmp/etc folder and then carefully deleted any unneeded files. E.g. there was a big storage file (8 MB) in the /root/.sage directory which could be deleted without problem!
Two questions: Is there a List of files which must be copied to preserve your Desktop design? Is it save to delete all application folders in /root (especially browser and similar which could contain remnants of private data)?

Testing the ISO
It is a good idea to test your remaster before burning it to CD. The following should work: ad a frugal install entry to your Grub menu.ls for the puppylivecdbuild directory. Skip to burn CD when remastering but reboot the frugal version and test it. If OK burn iso to CD.

Memory issues - Crashes!
The version I remastered ran fine on my computer.It included base puppy 431, some smaller pets and 3 (big) sfs Files. After the remaster everything went into the new pup-431.sfs (close to 690 MB). I have 1 GB RAM and my remasterd puplets were a) very slow opening the big sage package b) crashed silently if I opened several processes.
Manually creating swap space solved the crashes (but applications still were slow).
What happend is that startup scripts for Puppy are made for a 100 MB OS, not for a 700 MB. On my base install the big sfs files are only loaded if needed, there was enugh free RAM for smooth operation. In the remasterd version 700 MB were initially loaded into RAM, opening the big Sage easily used the small rest and put the system over the edge.
This very enlightning thread (thx @Pizzasgood)
http://www.murga-linux.com/puppy/viewtopic.php?t=24899
showed
a) where puppy decides to load completly into RAM (or not) at startup.
b) since this is done in the initrd.gz, how to modify it and repack a tuned initrd.gz.

In the base version Puppy loads completly to RAM if there is more than 256 MB (100 MB OS). I settled for a value of 1.4 GB (700 MB OS). Probably it could also be forced by a bootparameter pfix=noram in the
isolinux.cfg of the CD, but then it would loose some of the built in smartness. Would such a bootparamter be preserved by the various iinstallers (USB, frugal)? The initrd.gz surly is preserved, so the install wizards should work.

Swapspace
Since 700 MB is big and surly sage wraps some memory hogging functionality additional swapspace is an excellent idea. Surly there is already something included in the exisiting scripts, but also this is tuned for a Size of 100 MB and I couldn't figure out how it is done and where.
I had the idea to make it as painless as possible for the enduser, so opimum would be to have a wizard at startup to check available RAM/Swapspace and activate or create some Swap if necessary.
II have created a script (my first bash script ever, so be lenient).
It should check if enough RAM /SWAPSPACE is present.
if not check all harddisk drives for existing pupswap.swp files or - secondary option - pagefile.sys files and activate them.
If no existing inactive Swapfile is found and it is a Linux partition, create an appropriate pupswap.swp file. Don't do that with Windows partitions but inform the user how he could do this manually.

This swapwizard is not linked correctly in my published ISO, maybe this is better, because I'd liked this reviewed by someone knowledgable. I attach my swapwizard, would be nice to get some feedback about it. I am sure there will be much more elegant solutions,
but hey .. it's my first script. If something else works better please share. I know there could be issues if using Windows pagefile.sys as swapfile, but I tried it now for a week and had no problems with my XP.




UNetbootin install into Windows partition - no safe file

In the end my version runs smoothly and should work on reasonable hardware. I tested the Unetbootin install to a windows partition which is VERY easy and a nice option for firsttimers in my opinion.
One disadvantage is, that puppy doesn't create a safe file in that case (probably because of the windows partition). Is there a way to make it a safefile in another (Linux) partition, or an USB or something. I guess this is should be somewhere in the shutdown scripts, but I couldn't reliably find it.

thanks,
emil
swapwizard.tar.gz
Description  Script to automatically set up swapfiles if needed
gz

 Download 
Filename  swapwizard.tar.gz 
Filesize  2.56 KB 
Downloaded  445 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Wed 17 Feb 2010, 15:59    Post_subject: edited script download  

script download was broken, should work now
Back to top
View user's profile Send_private_message Visit_website 
Frank Cox

Joined: 01 Nov 2009
Posts: 381

PostPosted: Sat 20 Feb 2010, 21:05    Post_subject: Swap Space  

Interesting thread.
My question is wouldn't it be easier to simply create a swap partition or invest 20.00 in another ram stick if possible?
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4379

PostPosted: Sun 21 Feb 2010, 01:03    Post_subject:  

my first swag was this will give your the size of your pupsave file so that you can decide dynamically based on sfs size
Code:
ls -l $PUPSFS |cut -d " " -f 5


but it looks like Barry used a different way to get the file size:
Code:
  SIZESFSK=`du -k ${PUPSFSDEVMNTPT}${PUPSFSFILE} | cut -f 1`
  SIZESFSK=`expr $SIZESFSK + 1000` #some slack.


(I personally would use ls because it is faster in newer busybox versions, but maybe the busybox version has quirks - so I would go with Barry's judgement on that one)

the size calculation should be done before instead of after this
Code:
 [ "`echo -n "$FASTPARTS0" | grep "$PUPSFSDEV"`" != "" ] && [ $RAMSIZE -gt 280000 ] && COPY2RAM="yes"
 if [ "$COPY2RAM" = "yes" ];then


with code in between (but check my bash math - its been a while)
Code:
MINRAM2CPY=(($SIZESFSK * 2))


such that you can replace [ $RAMSIZE -gt 280000 ] with [ $RAMSIZE -gt $MINRAM2CPY ]

I hope thats not too confusing

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Mon 22 Feb 2010, 09:31    Post_subject:  

Hi

@Frank
Hi Frank, sure it is perfect if you create a swap partition, or even better stick in 4 GB of Ram by default.
But the target population of this distribution include users who don't want to mess with their system, definitly not buying Ram or repartition.
For some of them the thought of another OS somewhere on their C:/ drive is disturbing.
In a nutshell it is about making the Live CD newbie friendly and "JUST WORK" for as wide an an platform range as possible.

I have a build in HTML help and I recommend a 10 GB Linux Partition with frugal install and a 2-4 GB swap partition. But "automagic" feature would be perfect.

@technosaurus
thank you for your ideas - I need some time to test and think about it, I have pressing rl matters at the moment so could need some time.

thanks
emil
Back to top
View user's profile Send_private_message Visit_website 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Mon 22 Feb 2010, 10:00    Post_subject:  

This SwapWizard should be very useful. So when I go on other peoples computers (which you can forget repartitioning!) I can use windows swap file if I need it. Great Very Happy!
Back to top
View user's profile Send_private_message Visit_website 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Mon 22 Feb 2010, 10:01    Post_subject:  

Thanks for the tips. These will help me a lot Very Happy.
Back to top
View user's profile Send_private_message Visit_website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Mon 22 Feb 2010, 11:00    Post_subject:  

Hi abushcrafter,

thanks, but I have to make a disclaimer - some people think that using pagefile.sys might cause problems. Some other think it is no problem. I have tried it and for me it was ok, however - use at your own risk Wink!

I am still not sure if I include the autoswap to pagefile.sys per default. I probably skip it (there are people out there who will advocate that this will break windows, and I shun to defend from that because I cant prove otherways).

emil

PS: there is still a canonical way to make swap file on a windows partition:

Boot to windows
open command line (Dos window)
type: fsutil file createnew C:\pupswap.swp 1024000000
--> this will create 1 GB pupswap.swp
reboot to puppy
check memory with command free
open terminal in directory of pupswap.swp
type: mkswap pupswap.swp
type: swapon pupswap.swp
check memory again
Swapfile with name pupswap.swp is recognised and activated by puppy if it is in the mnt/home directory (same directory than pup_xxx.sfs at frugal install).
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4379

PostPosted: Mon 22 Feb 2010, 11:33    Post_subject:  

Check Barry's blog. He has incorporated this fix into woof.

http://bkhome.org/blog/?viewDetailed=01408

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Tue 23 Feb 2010, 04:32    Post_subject: keymap preserved  

technosaurus thanks for contacting Barry and thanks for the quick fix!
I try to change this myself.

Ok - an additional aspect:

one bug beeing reported is, that at startup no menu for Localisation and Time Zone comes up.

It can be fixed with Menu>Desktop> choose Country localisation
or by editing the file /etc/keymap

I am not sure but I think this is a bug in Puppy remaster script. I found something on
http://www.murga-linux.com/puppy/viewtopic.php?t=47563&start=180
page 13 bottom: /usr/lib/local is not cleaned while remastering.

Fix when remastering should be to delete the directory /usr/lib/local before remastering. Anyone has experience about that?

emil
Back to top
View user's profile Send_private_message Visit_website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Tue 02 Mar 2010, 07:51    Post_subject: Some comments  

I am preparing a bugfix verison of my SageLivePup and here are some comments:

Boot to ram or noram
I will include the fix from Barry in my initrd.gz, but I will also include the fix from pizzasgood (see link above) to make it noram by default: reason - people complained about the long boottime when loading 700 MB to ram.

Localisation
it seems to be necessary to delete /usr/lib/local before remastering to
get a working localisation dialog in the Live CD. I will try that.

Swapfilewizard
I made a slight change to my swapwizard. It will detect/activate or create swapfiles (pupswap.swp) on linux partitions (1GB default). It will also detect pupswap.swp on Windows partitions.
It will not use pagefile.sys (Windows pagefile) automatically by default. But it can with the option -win, i.e call swapwizard.sh -win

Xorg Gamma correction
The Gamma correction is not working by default. It is possible to fix this with the program xgamma and Panzerkopfs xgamma-gui.pet.
http://www.murga-linux.com/puppy/viewtopic.php?t=47563&start=180
you will need xgamma (put it in /usr/bin), from here
http://www.murga-linux.com/puppy/viewtopic.php?t=45829
swapwizard.tar.gz
Description 
gz

 Download 
Filename  swapwizard.tar.gz 
Filesize  2.62 KB 
Downloaded  431 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0908s ][ Queries: 13 (0.0065s) ][ GZIP on ]