HOWTO Remaster a big Puplet (~700 MB)
Posted: Wed 17 Feb 2010, 09:54
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