System sfs boot parameters - revisited

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

System sfs boot parameters - revisited

#1 Post by gyro »

In the current "init" script there is code to support boot parameters for ""pupsfs", "zdrv", "adrv" and "ydrv". These have a comment "requested by technosaurus". As far as I am aware they work.

So why "revisited". In this topic, http://www.murga-linux.com/puppy/viewto ... 602#852602 mavrothal found that it the specified file does not exist, then the boot crashes, not too user friendly.

This implementation checks the existence of the specified file, and ignores the parameter if the file does not exist. To do this, the code is moved into the "search_func" where partitions are mounted.

Here is the "PUPSTATE" file from my test:

Code: Select all

PUPMODE=12
PDEV1='sda4'
DEV1FS='ext4'
PUPSFS='sda4,ext4,/sfss/puppy_tahr_6.0.2.sfs'
PUPSAVE='sda4,ext4,/tahr/tahrsave'
PMEDIA='atahd'
#ATADRIVES is all internal ide/pata/sata drives, excluding optical, excluding usb...
ATADRIVES='sda '
#ATAOPTICALDRIVES is list of non-usb optical drives...
ATAOPTICALDRIVES='sr0 '
#these directories are unionfs/aufs layers in /initrd...
SAVE_LAYER='/pup_rw'
PUP_LAYER='/pup_ro2'
#The partition that has the tahrsave file is mounted here...
PUP_HOME='/mnt/dev_save'
#(in /initrd) ...note, /mnt/home is a link to it.
#this file has extra kernel drivers and firmware...
ZDRV='sda4,ext4,/sfss/zdrv_tahr_6.0.2.sfs'
ADRV='sda4,ext4,/apps/pcmanfm-1.2.3-5.sfs'
YDRV='sda4,ext4,/sfss/ydrv_tahr_6.0.2.sfs'
#complete set of modules in the initrd (moved to main f.s.)...
ZDRVINIT='no'
#Partition no. override on boot drive to which session is (or will be) saved...
PSAVEMARK=''
PSUBDIR='/tahr'
Note that none of the system sfs files are in the frugal install directory, but they are all in the same partition.

There is a limitation with specifying these sfs files in another partition. When "init" is loading the sfs files, only the pupsfs and savefile/savefolder sections of the code actually mount partitions. The code for all the other sfs files assume that their partition is already mounted. So at most there are only 2 possible partitions to choose from, the one that contains the savefile/savefolder and the one that contains the pupsfs. I have not tested putting files on other partitions.

There is one facility of the original implementation that this one does not reproduce. In the original code, if "pupsfs" is specified, then searching for other files is limited to the same partition. This implementation cannot do that, the "pdev1" boot parameter has to be specified to limit the search to a single partition.

Edit:
Patched "initrd.gz" files for tahrpup 6.0.2 are available here:
noPAE: http://www.fishprogs.software/puppy/tah ... s_nopae.gz
PAE: http://www.fishprogs.software/puppy/tah ... sfs_pae.gz
Download, rename to "initrd.gz", move to frugal install directory, reboot.

I have attached a gzipped patch file for the "init" script, "init.chksfs.diff.gz".

gyro
Attachments
init.chksfs.diff.gz
gunzip to produce "init.chkfs.diff"
(1.81 KiB) Downloaded 253 times
Last edited by gyro on Mon 13 Jul 2015, 04:21, edited 3 times in total.

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#2 Post by gyro »

I forgot to mention that the end of the patch file contains a fix to the way "PSUBDIR" is written to "PUPSTATE". I don't know why it insists on "PSUBDIR" being the directory that contains the puppy sfs. I would have simply removed the whole "zPSUBDIR" stuff, but I'm not sure why it's there.
gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#3 Post by gyro »

Uploaded patched "initrd.gz" files for Tahrpup 6.0.2. See first post for download link.
gyro

gcmartin

#4 Post by gcmartin »

Hello @Gyro

I am aware that at one point, you reviewed LightHouse64.

Questions
  • Is this covering how it, too, handles the ability to have various SFSs in the boot media that will be incorporated into system during system boots?
  • In this post on another thread, I saw this: "I have also noticed that the cow system is like unionfs if you put another sfs file in the same folder it will be mounted and merged when mint boots off of the live usb." Does this describe?
Thanks in advance

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#5 Post by gyro »

gcmartin wrote:Is this covering how it, too, handles the ability to have various SFSs in the boot media that will be incorporated into system during system boots?
This is only transferable to other puppies if the "init" script is similar enough for the patch to successfully apply.
gcmartin wrote:I saw this: "I have also noticed that the cow system is like unionfs if you put another sfs file in the same folder it will be mounted and merged when mint boots off of the live usb." Does this describe?
No, If an sfs is supplied as a parameter, and it exists, it replaces the one that would have been found.
gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#6 Post by gyro »

gcmartin wrote:Is this covering how it, too, handles the ability to have various SFSs in the boot media that will be incorporated into system during system boots?
Sorry, I initially mis-read your question.
No, this is for normal puppy files, 'puppy...sfs', 'zdrv...sfs', 'adrv...sfs' and 'ydrv...sfs'. Specifying them with boot parameters instead of letting puppy find them. In the example 'PUPSTATE' above, 'pcmanfm-1.2.3-5.sfs' has been loaded as the adrv.
gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#7 Post by gyro »

Actually this could be a "nosearch" project.
If the minimum required files are specified as boot parameters, e.g. pupsfs, zdrv and pupsave are specified, then don't search.
gyro

gcmartin

#8 Post by gcmartin »

Wrongly directed.

Post Reply