how its made: puppy linux

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
learnhow2code

how its made: puppy linux

#1 Post by learnhow2code »

to get puppy, you download an iso image and put it on cd or dvd (or usb.) to put it on cd, you can use a graphical burner. you can also use this command if its installed:

# wodim name-of-puppy-iso.iso


that will create a bootable puppy cd/dvd (IMPORTANT NOTE: if you want to leave the session open, you will probably need to add other options.)


i have not checked how many puppy isos are dd-able. using dd is easy, but if you give it the wrong option its possible to overwrite your entire drive, so i wont include dd commands in this post. use dd with the appropriate level of accuracy and caution.

if you have an iso that will not boot when you dd it to an iso, like this one for example: https://archive.org/download/Puppy_Linu ... gos1.0.iso

that url was not made "hybrid" for usb / other devices. it only works on a cd or dvd writer. the way i make it work for usb is to run isohybrid, which comes with syslinux-utils in debian: https://packages.debian.org/jessie/i386 ... s/filelist


# isohybrid name-of-iso.iso

you probably dont want to run that on an iso that is already a hybrid, so check first (if you can. i can probably devise a way to check this using qemu, if youre interested.)

once the iso is hybridized, you can put it on a usb with dd-- ive even puts isos directly onto the hard drive this way. (probably not what you want to do, but its doable.)


but how is puppy made?

puppy consists primarily of the following:

* bootloader and bootloader config files (for cds/dvds, usually isolinux)
* puppy sfs, zdrv sfs, other optional sfs files <- this is over 90% of puppy right here
* kernel (vmlinuz)
* initrd (a small part of the os to start things up)
* the iso these files are placed in


note that some people just do a frugal install, which consists of the following:

* install the bootloader, or use the one from another version of gnu/linux
* copy vmlinuz, initrd file, and sfs files
* configure the bootloader to use those vmlinuz and initrd files

which means that some people upgrade (or remaster) puppy by only changing the larger sfs file.


you can find details on the forum for doing any of these steps, but then there are a few ways to MAKE YOUR OWN puppy:

* use a remaster script, like woofy
* use the woof-ce scripts, which is the official way
* create your own script to either build, remaster, or auto-remaster puppy


how does a remaster script work?

first of all, woof-ce works a lot like a remaster script. it has the same features, but instead of taking an iso, opening it up, opening the sfs files, and changing them-- it puts them together. sounds like a major difference, right? kind of. for one, it compiles the kernel and puts together the initrd.

but then it will "zip up" (or rather squashfs) the same things that a remaster script will, and package it back up into an iso with the bootloader.

a remaster script does that, too.

so woof-ce is basically a remaster script PLUS the tools to "master" the other parts mentioned. thats the part of woof-ce that is extra impressive and useful.


so what are your options for making your own puppy?

* remaster an existing puppy with a remaster script or auto-remaster script
* make your own remaster auto-remaster script
* run woof-ce


what will these scripts do?

* grab and configure a bootloader
* compile and compress vmlinuz and initrd
* grab and install (or add) packages
* squash most of the files into puppy sfs and zdrv sfs
* create an iso file and possibly hybridize it


here are the things my own auto-remaster script does:

* open two isos
* grab the bootloader and configuration from puppy, and the vmlinuz and initrd from both
* grab (and open) the sfs files from both
* change the contents of the sfs files and mksquashfs the new versions
* create the new iso with the parts just listed, using genisoimage


the way puppy is made is unique in the details. but if you know how to make puppy, you have a good idea about making other distros, too.

for example, the way that puppy is made and the way that refracta (based on devuan) is made, are mostly compatible.

whats the difference between a remaster script and an "auto-remaster" script?

not much. the remaster script may output an iso if you run it unmodified, but it lets you change a lot of things without changing the script itself.

an "auto-remaster" script is meant to just run as-is. it may ask questions, but it shouldnt require any (significant) changes to the system in order to produce an iso. (obviously you need the paths to the urls to be ones that work, and you need things like genisoimage installed.)


how are scripts made?

if you do enough on the command line, you will eventually want to put some of it in scripts. thats how scripts are made.

sometimes a command is just the name of the program, like a shortcut on the desktop:

df #### this will tell you how much free space you have, where

this part after the "#" is a comment ^


other times, the command will have parameters or "options", like this:

df -h #### the -h tells df to report sizes in "human-readable" units, instead of kb


commands can be run one after each other on the same line using semicolons:

df -h ; du


or they can be connected together using a vertical pipe: |

df -h | cat -n #### show df human-readable, and number each line of the output from df, using cat -n (-n means add a number for each line)


there are other commands which are useful only for scripting, or repeating, or doing things conditionally.


its easier to learn how to modify a script than write your own script but if you do enough modifications and like working with scripts, you may end up writing your own.


and thats (more or less) how puppy is made!


here is one part of puppy called "setup-spot" https://github.com/puppylinux-woof-CE/w ... setup-spot


you may look at that and say to yourself, "i couldnt write that!"

well maybe you could, and maybe not. maybe i could, but i wouldnt-- because i dont want to.

but could i "setup spot" without this script?

YES.

so why cant i make a script to setup spot?

well, i probably could.

and if i could, then whats the difference between a complex script like this, and a much easier one?


heres the secret of doing your own scripts.

your own script doesnt have to be as complex, because it doesnt have to work for 500 people.

over time, those scripts were tweaked, revised, added to, with different parameters and options for different users in different circumstances.

thats why its so complex. thats often why EVERYTHING is so complex.


but no one ever said HEY! lets make this so complex, that only we can write it!

they probably made it a lot simpler to begin with. and as people contributed, (even as barry himself made changes) it got more and more... and more...

the more you learn about scripting, the more you may want to add to your scripts.

but you dont always have to.

whether you make puppy using woof-ce or using some way of remastering, puppy is made its own way, using lots of existing software-- you can do that too, if you want.


corrections welcome (though its possible they will be disputed.)

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#2 Post by Sailor Enceladus »

I read this. My dad watches "How it's made" a lot, I hate that show because the girls predictable voice patterns annoy me. :lol:

learnhow2code

#3 Post by learnhow2code »

Sailor Enceladus wrote:I hate that show because the girls predictable voice patterns annoy me. :lol:
misophonia is under-researched. im sure its actually a symptom of several different issues, and not necessarily a disorder. no one loves nails on a chalkboard that i know of. familiarity and triggers probably play a role too-- some people hate dogs barking (like when puppy 2 or later started up) and others love grunge music, while some people think its noise designed to bother them. i think its a legitimate thing to research, though i hate to think how the research will be used.

User avatar
Pete
Posts: 660
Joined: Sun 02 Mar 2014, 18:36

#4 Post by Pete »

Sailor Enceladus wrote:I read this. My dad watches "How it's made" a lot, I hate that show because the girls predictable voice patterns annoy me. :lol:
They use different voice over artists for different countries the show is aired in.
The original is Tony Hirst with his dreadful puns. :D

learnhow2code

#5 Post by learnhow2code »

Pete wrote:They use different voice over artists for different countries the show is aired in.
this is surprisingly on-topic, considering they basically "remaster" the episode-- removing one audio track and putting in a custom one. (also they re-use scripts, but now we are stretching.)

User avatar
Pete
Posts: 660
Joined: Sun 02 Mar 2014, 18:36

#6 Post by Pete »

learnhow2code wrote: ....they basically "remaster" the episode-- removing one audio track and putting in a custom one....
Yup, you pretty much got it figured out. :D

BTW, sometimes the original audio track is left intact and another added.
Often seen this especially on shows that are dubbed, and yes broadcasters do sometimes select the wrong audio track and the wrong language is played out. :oops:

learnhow2code

#7 Post by learnhow2code »

Pete wrote:BTW, sometimes the original audio track is left intact and another added.
well they obviously stole my idea! :o

User avatar
Pete
Posts: 660
Joined: Sun 02 Mar 2014, 18:36

#8 Post by Pete »

learnhow2code wrote: well they obviously stole my idea! :o
I think so. :D

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#9 Post by s243a »

can one use dd instead od wodim?

learnhow2code

#10 Post by learnhow2code »

s243a wrote:can one use dd instead od wodim?
for the most recent versions of fig os? yes.

for the most recent versions of tahr? i think so. i may have run isohybrid on my copy.

for older 3rd-party pups like pizzapup 3.0? no-- i checked the iso.

apart from using dd and booting the usb, i devised a way to tell if an iso is hybrid (dd-able) using qemu. this command should work on both 32 and 64 bit machines, and both 32 and 64 bit isos (even a 64 bit iso on a 32 bit machine):

# qemu-system-x86_64 -cdrom puppy.iso # this boots on both dd-able and non-dd-able isos

# qemu-system-x86_64 -hda puppy.iso # this boots ONLY hybrid (dd-able) isos, and can be used to check if an iso is dd-able; if it isnt, run # isohybrid puppy.iso to make it dd-able

i know two ways to make an iso dd-able: one is isohybrid (which is what the latest fig os now uses-- older versions did not do this step for you) and the other is xorriso.

for any given puppy iso, i cannot tell you if the iso is already dd-able or not, without trying it out.

theoretically, any puppy iso can be made dd-able with:

# isohybrid puppy.iso # i recommend seeing if the iso is already dd-able before you run this.

there is probably some kind of string you can look for in the beginning of a hybridized iso to tell it is hybridized.

short answer: give me a url to an .iso you want to know about, and i will tell you.

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#11 Post by slavvo67 »

Forgive me if I skipped over something ... so what file or files make one puppy distinguishable from the other.... i.e. Slackware (Slacko) vs. Xerus vs. Lucid for examples...

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#12 Post by tallboy »

True freedom is a live Puppy on a multisession CD/DVD.

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#13 Post by slavvo67 »

Hi Tallboy:

I haven't seen you around in a while. Thank you for the links; unfortunately many of the links are dated and no longer working.

Kind regards,

Slavvo67

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#14 Post by Burn_IT »

They are based on different Linux versions.
They can often use binaries for that base version - but that is not guaranteed without them being "puppified".
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#15 Post by tallboy »

slavvo67 wrote:I haven't seen you around in a while.
'Been sittin' in a corner, just observing. I'm a little shy, you know... 8)

tallboy
True freedom is a live Puppy on a multisession CD/DVD.

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#16 Post by slavvo67 »

Sorry, all. I probably should have started a new thread for this. I'm not sure if I was clear or not so what file or files determine the type of puppy (i.e. Slacko vs Tahr). It's not just the Kernal, right?

Post Reply