Last Edited: 01 May 2008 by superuser
Importered from old WiKi -- 30/04-08 17:04.

HackyRemaster--v3.1

*Download HackyRemaster v3.1
This will work with Puppy 1.0.9 and earlier.

Intro
HackyRemaster is a script for remastering Puppy. It is not automated like AlienX's script, and it is not like Puppy Unleashed. What this does is sets up an entire filesystem that you can go into and edit to your heart's content. It puts that filesystem inside a partition image (like pup001) so it can be saved on the harddrive even if you don't have linux partitions. The script automates setting it up and putting it back togeather. It includes HackyPupBeGone, which makes removing the built in stuff easier. It also has a built in burning script that is mostly like Barry's BurnISO2CD script, but it also supports blanking CDRWs.

What You'll Need -- Requirements
Unfortunatly, I can't just set down hard requirements as much of this is variable. You will need two free loop devices. This script will create some if there aren't enough. Puppy 1.0.8 and earlier come with five and can have up to eight, so it shouldn't be a problem. If you have seven in use, though, you'll need to free one.
You will need roughly 320 megabytes if you don't plan to change Puppy's size. Puppy is nearly 200 megabytes decompressed. The extracted iso is 60, and the iso you will generate will be another 60. If you plan to increase the size you'll need more than 320, and if you plan to decrease, youll need less than 320. I suggest 400 just to be safe.
As for ram and processor speed, they should only affect the speed you get done, unless you're in a strange situation with minimal ram.

Getting Started
First, you'll want to get HackyRemaster installed. Download HackyRemaster v3.1∞. You can click on the .pup file to install it.
Once it's in, you can go to /root/my-roxapps and click on HackyRemaster (it has a strange duck/monkey/doctor looking icon). That will start the control panel. (If you right click that icon, you can choose to run it with a terminal in the background, which might help you locate an error. It's uneeded otherwise.)
Now that it's running, you can use the first icon, which says "Setup" to set up the environment. It will ask how big you want to make the image file and where you want to put it. That file will contain the entire Puppy filesystem decompressed and editable. It's size will vary based on which Puppy you start with and how much you want to add to it. I suggest 256 megabytes, as the standard Puppy is roughly 200 when decompressed. If you plan to add a lot, you might want more. Unfortunately, there is not yet the option to resize it if it's too small, so choose wisely. You can choose any directory that Puppy can write to for placing the files, and it will make a directory named "remaster" there that will contain everything. Keep in mind that it will need roughly 400 megabytes, depending on how much you plan to add or remove.
Next you will need to choose a source Puppy to remaster. This can be either a cd or an iso file. It does not need to be a standard version of Puppy either. You can remaster other people's (or your own) remasters. Keep in mind, however, that they may be set up in a way that HackyRemaster will be incompatible with them. It's unlikely, but possible. Once you make your choice, HackyRemaster will load the filesystem from the source, decompress it, and put it in the image file that was created. Finally, it will mount the filesystem on /mnt/hackyroot. You will not need to use the second button, that says "Mount /mnt/hackyroot" this first time.

Editing
Before you can edit anything, you'll need the filesystem mounted. If you just ran the "Setup" script, it already is. Otherwise hit the button that says "Mount /mnt/hackyroot/". Now you can go to /mnt/hackyroot/filesystem/ and edit to your heart's content. Keep in mind that you should edit /root0 rather than /root. Also, remember that anything not in /usr will be inside image.gz. That means don't put large files in anything but /usr if you can help it, as image.gz should be as small as possible.
While in this stage, you may wish to remove packages that Puppy comes with by default. For this purpose I included HackyPupBeGone, which works like Pupget in reverse: the only packages that show up are the ones that came by default. Once removed it will not put them back. It edits the /root0/.packages/ stuff for you. It is tweaked from a hack from Pupget, so it's not the most elegant solution. It still saves a good bit of time compared to removing the packages yourself. When you choose to remove a package, it needs to have the actual package to analyze in order to know which files to remove, so it will download it. It does give you the option of using a local package if you already have it downloaded, though.

Recompressing
This stage takes the decompressed filesystem and compresses it into the image.gz and usr_cram.fs files. You need the filesystem mounted for this. First, run the "Recompress usr_cram.fs" button. That will take a good while unless you have very few things in /usr. It will beep when finished and update a file in /etc that says how large usr_cram.fs is.
Next you need to run the "Recompress Image" button, which creates image.gz. This is faster than making usr_cram.fs since it's smaller. If the size is larger than a pre-set value in the kernal, it will need to have a boot parameter. It will take care of this on its own unless you don't let it create the isolinux.cfg file later.

Edit Isolinux.cfg and Other Stuff in the ISO
Now is when you can edit the things that will be in the actual iso file (what you see when you put the cd in the harddrive and read it, like image.gz, usr_cram.fs, vmlinuz, isolinux.cfg, etc.). The main thing is isolinux.cfg, which will probably need to be edited to have the correct size in the boot parameter. You can click the "Replace isolinux.cfg" button to do this. If you let it create the file, it will handle it automatically. Otherwise you will have to add ramdisk_size=XXXXXX where XXXXXX is the correct size to the line with kernal parameters. The auto script will cover that, allow you to choose the name for the pupfile, set the size for the pupfile, and chose the default boot option. You can still edit it afterwards.
If you wish to edit other things, like vmlinux or boot.msg, you'll have to browse to the directory you chose when setting up the environment and go to "/remaster/iso".

Creating the ISO
This stage is where it puts everything togeather into a .iso file. Just click the button that says "Make Iso", and after a moment or three it will be done. A window will be opened in the location with the iso (the_directory_you_chose_when_setting_up_the_environment/remaster/puppy.iso). This is as far as you need to go if you don't plan to burn it to a cd/dvd.

Burning the ISO
If you wish to burn the ISO to a cd or dvd, click the "Burn Iso" button. It will run a modified version of Barry's BurnISO2CD script that allows the blanking of CDRWs.

Ending a Session of Work
If you are done for the day, click the "Unmount Environment" button to unmount /mnt/hackyroot. If you don't, the filesystem may be corrupted when you reboot.

Eliminating the Mess You Made
When you are totally done, and have no more desire to do any more editing with the specific remaster you are working on, you click the "Delete Filesystem" button. It will remove the directory named "remaster" in the location you chose at the begginning. If you left the iso in there, it too will be deleted. This is only for when you are completely done, and have the iso tucked safely away somewhere.

Tips
You can close this script and run it again in between stages. You can even reboot if the directory you chose is in a persistant location.
You cannot use this script on multiple remasters at once. You must delete the one you are using before it may start another. If you do start a new one without removing the old, it will no longer be able to delete or use the old one (unless you manually edit the correct files in /root/my-roxapps/HackyRemaster to point to the correct places).
If the size for image.gz is bigger than the kernal default (it will tell you), make sure you tell people. Otherwise they will try to usb boot or something without the parameter, then accuse you of having bugs. They'll do it anyway, of course, but then you can say "I told you so."



CategoryHowto