HOWTO Remaster a big Puplet (~700 MB)
HOWTO Remaster a big Puplet (~700 MB)
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
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
- Attachments
-
- swapwizard.tar.gz
- Script to automatically set up swapfiles if needed
- (2.56 KiB) Downloaded 644 times
edited script download
script download was broken, should work now
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?
My question is wouldn't it be easier to simply create a swap partition or invest 20.00 in another ram stick if possible?
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
my first swag was this will give your the size of your pupsave file so that you can decide dynamically based on sfs size
but it looks like Barry used a different way to get the file size:
(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
with code in between (but check my bash math - its been a while)
such that you can replace [ $RAMSIZE -gt 280000 ] with [ $RAMSIZE -gt $MINRAM2CPY ]
I hope thats not too confusing
Code: Select all
ls -l $PUPSFS |cut -d " " -f 5
Code: Select all
SIZESFSK=`du -k ${PUPSFSDEVMNTPT}${PUPSFSFILE} | cut -f 1`
SIZESFSK=`expr $SIZESFSK + 1000` #some slack.
the size calculation should be done before instead of after this
Code: Select all
[ "`echo -n "$FASTPARTS0" | grep "$PUPSFSDEV"`" != "" ] && [ $RAMSIZE -gt 280000 ] && COPY2RAM="yes"
if [ "$COPY2RAM" = "yes" ];then
Code: Select all
MINRAM2CPY=(($SIZESFSK * 2))
I hope thats not too confusing
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
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
@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
- abushcrafter
- Posts: 1418
- Joined: Fri 30 Oct 2009, 16:57
- Location: England
- Contact:
- abushcrafter
- Posts: 1418
- Joined: Fri 30 Oct 2009, 16:57
- Location: England
- Contact:
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
!
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).
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 ;)](./images/smilies/icon_wink.gif)
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).
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
Check Barry's blog. He has incorporated this fix into woof.
http://bkhome.org/blog/?viewDetailed=01408
http://bkhome.org/blog/?viewDetailed=01408
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
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/viewto ... &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
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/viewto ... &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
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/viewto ... &start=180
you will need xgamma (put it in /usr/bin), from here
http://www.murga-linux.com/puppy/viewtopic.php?t=45829
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/viewto ... &start=180
you will need xgamma (put it in /usr/bin), from here
http://www.murga-linux.com/puppy/viewtopic.php?t=45829
- Attachments
-
- swapwizard.tar.gz
- (2.62 KiB) Downloaded 615 times