HOW TO: Use the PMEDIA, PDEV1, PSUBDIR Boot Parameters

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
ICPUG
Posts: 1308
Joined: Mon 25 Jul 2005, 00:09
Location: UK

HOW TO: Use the PMEDIA, PDEV1, PSUBDIR Boot Parameters

#1 Post by ICPUG »

IMPORTANT NOTE:
This Howto was written in 2008 and was valid for version 4 Puppies. In late 2010 the Woof system changed the searching technique to improve the boot up time. Any Puppy based on woof from that point (such as Puppy Lucid 5.2) will be improved from what is written below.

----------------------------------------------------------------------------------


There is a lot of confusion about the purpose of the PMEDIA, PDEV1 and PSUBDIR boot parameters, relevant to frugally installed Puppies.

They were introduced in Series 2 Puppy but only really started working for their intended purpose in Series 3 Puppy.

At that time I had a look at the boot up script to see how PMEDIA, PDEV1 and PSUBDIR are used. I think it is still relevant to the latest Puppies.

There are three main beliefs of the use of PMEDIA, PDEV1 and PSUBDIR in the community.

Belief 1 - Speeds up boot time by directing where Puppy should look for the Puppy files.

The belief is wrong because of the way the boot script is written. There are two process steps.

Process 1

First Puppy searches for all possible partitions and keeps a record of them.

If PMEDIA is specified then this list of partitions is filtered so that only those on devices defined by PMEDIA are left in the record. It is a crude filtering, effectively resulting in either (a) external usb partitions (slow) , (b) internal media partitions (fast),
(c) all partitions (no filtering)

If PDEV1 is specified this list is filtered again so that only the partition(s) specified by PDEV1 are left.

Note: There is no speedup here because all partitions are looked for irrespective. If the boot script were written to just check for the existence of the partitions specified in PMEDIA and PDEV1 and get its details then there would be a speedup.

Process 2

A search is carried out for all puppy files (puppy_XXX.sfs, zdrv_XXX.sfs when it existed, pupsave.2fs, pupswapfile and initrd.gz (!!)) on all partitions in the partition list. A list of ALL puppy files found is kept, together with some details about them.

If PSUBDIR is specified this list is filtered so that only those defined by PSUBDIR are left in the list.

If PDEV1 AND PSUBDIR are NOT specified then the location of initrd.gz is taken as the boot partition.

Note
Irrespective of whether PSUBDIR is specified Puppy hunts for all files on all partitions in the partition list. No speed up then. Actually, not quite true. If PMEDIA, PDEV1 has been defined then only that device/partition will be searched, rather than all devices/partitions, so there is a little speed improvement.

The belief that the search is limited to PSUBDIR only is wrong. However, only those files found in PSUBDIR are ultimately used as the Puppy Files.

Belief 2 - Specifies the location of the fixed Puppy files but the NOT the user defined pupsave.2fs file

This belief is also wrong because of the filtering by PSUBDIR in Process 2.

If PSUBDIR is used then ALL puppy files including the pupsave.2fs and swap file must be in the subdirectory. Additional sfs files are not put in this directory because they are not searched in this start up process. They must be located in the root of the boot partition.

If you want to put your pupsave file on a separate partition then do not specify PDEV1 and PSUBDIR. If you want to put the pupsave on a separate device then do not specify PMEDIA either.

Belief 3 - The use of PMEDIA, PDEV1 and PSUBDIR allows the user to isolate a version of Puppy in its own directory. This allows for the installation of multiple Puppies WITH NO INTERFERENCE BETWEEN THEM.

This is the correct belief and the reason why PDEV1 and PSUBDIR were introduced. It is a marvellous feature for those who want to keep multiple puppies. This is quite relevant because some features of series 2/3 Puppies have been lost in series 4. If you want those functions in the older series then you have multiple pups.

It is also good for testing.

Note that the pupsave is isolated as well, which means there is no inadvertent updating of the pupsave of a previous Puppy. People who stick their pupsave files on separate partitions/devices will not have this protection.

I think this isolation of Puppy is good practice for the Lin'N'Win method as well - which is why I use these parameters.

There is one rider to this belief. Additional .sfs files cannot be isolated to a Puppy version. The counter argument to allowing this is that for multiple pups the additional .sfs files would need to be stored many times, which is wasting space. I guess how you use Puppy will sway which side of the fence you sit on that one!

I hope this little tutorial has been beneficial to your understanding and if any puplet developers come this way please consider the benefits of making your init script compatible with this way of working. This was the killer app for series 3 Puppy for me.

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#2 Post by darkcity »

It has been brought to my attention that the Boot Parameter descriptions on the Wikka wiki are incomplete and not arranged very well.

People are invited to improve the wiki 8) , see the page specifically on Puppy options-
http://puppylinux.org/wikka/BootParametersPuppy

The boot index goes some way to pointing to the different pages-
http://puppylinux.org/wikka/BootIndex

:twisted:

Post Reply