How to make your puppy able to load more than 6 .sfs files

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#16 Post by RSH »

Tried the same using JWM as default window manager.

JWM needs no manual refresh and all menu entries of the 9 sfs files loaded at boot up are available. :)

Seems only fbpanel acts different. :? :? :?
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#17 Post by RSH »

Update:

Code: Select all

    [ $CNTLOOP -eq 16 ] && break
Editing line 1430 in LazY Puppy (file init in initrd.gz) and setting 10 to 16 fixes the redraw issue of fbpanel at boot up. :D

Unfortunately, after this, there are only 6 sfs files loaded at boot up. :shock:

Inserting a little script in diretory /root/Startup, instead of editing line 1430, using command

Code: Select all

#!/bin/sh
if (grep openbox /etc/windowmanager) then
exec pfbpanel refresh start
fi
fixes redraw issue of fbpanel as well and loads all 9 sfs files at boot up. :? :D :?

I will go on to improve this a little more...
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

excess sfs using sfs_load

#18 Post by shinobar »

Do you know? The sfs_load > 1.3 allows more than 6 sfs without any change of the initrd.gz.
http://www.murga-linux.com/puppy/viewtopic.php?t=64354

The trick is the script /etc/init.d/sfs_load loads them after boot, the excessive sfs's (more than 6) which the initrd did not load. (idea from jamesbond)
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

Re: excess sfs using sfs_load

#19 Post by RSH »

shinobar wrote:Do you know? The sfs_load > 1.3 allows more than 6 sfs without any change of the initrd.gz.
http://www.murga-linux.com/puppy/viewtopic.php?t=64354

The trick is the script /etc/init.d/sfs_load loads them after boot, the excessive sfs's (more than 6) which the initrd did not load. (idea from jamesbond)
Hello shinobar,

i must say, i do love your sfs_load really much and i do use it every day several times.

And now, you do make me also happy by your post. Not because of the so named "trick", but because of what i did find inside the script /etc/init.d/sfs_load. I did not know the --cli parameter/command that lets load sfs files without having a gui and/or clicking any OK button. :D

I did try to modify your sfs_load but failed very quickly and gave up.

Now i can rewrite my scripts to load all the LazY Puppy sfs files without any clicking.

Btw. there has been another user asking for that option - i do have to inform this user of this feature

Regarding the code in /etc/init.d/sfs_load:

Code: Select all

[ "$EXTRASFSLIST" ] || exit
I can not read these steno-type scripting. Would you please translate this example into an if then else form and give an example, how to use this to load more than six sfs files at boot up?

I can not see the solution. :(
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: excess sfs using sfs_load

#20 Post by shinobar »

RSH wrote:Regarding the code in /etc/init.d/sfs_load:

Code: Select all

[ "$EXTRASFSLIST" ] || exit
I can not read these steno-type scripting. Would you please translate this example into an if then else form and give an example, how to use this to load more than six sfs files at boot up?
Is it a question of the bash syntax?
it is equal to:

Code: Select all

if  [ "$EXTRASFSLIST" = ""  ]; then exit; fi
Meaning: do nothing if the EXTRASFSLIST is blank.

The trick is:
  1. The sfs_load makes additional mount point /initrd/pup_roXX for the sfs more than 6, and load it.
  2. The sfs_load leaves the list of the loaded sfs(can be more than 6) in EXTRASFSLIST at /etc/rc.d/BOOTCONFIG.
  3. At next boot, the initrd loads the sfs looking up the EXTRASFSLIST, but only 6. The excess are not loaded but the file names are still in the EXTRASFSLIST.
  4. The script /etc/init.d/sfs_load finds the sfs which are in the EXTRASFSLIST but not loaded.
  5. The sfs_load loads on-the-fly the sfs not loaded at boot.
Other reply i have made at next post:
http://www.murga-linux.com/puppy/viewto ... 174#614174
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#21 Post by R-S-H »

Wow.

It took more than a year to solve this and I did never really try to use shinobar's suggestion at previous post.

However, this is solved by now!

After my last post in this thread here, I did some more research on this, but could not find a solution - so, I gave up.

The last weeks I was busy to add the so called "adrv"-option to my private version of LazY Puppy. After succesful work on this -thanks to mavrothal- it came back to me, suddenly, today, a few moments ago.

So, here it is. The Guide to make your puppy able to load more than 6 sfs files at boot up (when using personal storage file). I will show this for a count up to 15 pup_ro(x) directories, which means, the puppy is then able to load 12 sfs files at boot up.

1. Edit the initrd.gz

If you need a tool to edit the initrd.gz, here is Edit-Initrdgz-1.4.pet. Install the PET, copy the initrd.gz to /root and execute the program (must be somewhere in menu utility). This tool opens the init script plus other files in geany. Otherwise open the init script in a text editor.

Then found and edit the following (added pup_ro 10 ... pup_ro15):

Code: Select all

#if same dir exists lower layer, then wipe the opaque file...
[ -d /pup_ro3${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro4${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro5${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro6${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro7${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro8${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro9${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro10${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro11${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro12${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro13${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro14${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro15${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
Then found and edit the following (added pup_ro 10 ... pup_ro15):

Code: Select all

#cpio archive does switch_root, lose the initial-ramfs, so move all mntd...
mkdir -p /pup_new/initrd
mkdir -p /pup_new/initrd/pup_ro1
mkdir -p /pup_new/initrd/pup_ro2
mkdir -p /pup_new/initrd/pup_ro3
mkdir -p /pup_new/initrd/pup_ro4
mkdir -p /pup_new/initrd/pup_ro5
mkdir -p /pup_new/initrd/pup_ro6
mkdir -p /pup_new/initrd/pup_ro7
mkdir -p /pup_new/initrd/pup_ro8
mkdir -p /pup_new/initrd/pup_ro9
mkdir -p /pup_new/initrd/pup_ro10
mkdir -p /pup_new/initrd/pup_ro11
mkdir -p /pup_new/initrd/pup_ro12
mkdir -p /pup_new/initrd/pup_ro13
mkdir -p /pup_new/initrd/pup_ro14
mkdir -p /pup_new/initrd/pup_ro15
mkdir -p /pup_new/initrd/pup_rw
mkdir -p /pup_new/initrd/pup_z
mkdir -p /pup_new/initrd/mnt
mkdir -p /pup_new/initrd/mnt/data
mkdir -p /pup_new/initrd/mnt/dev_ro1
mkdir -p /pup_new/initrd/mnt/dev_ro2
mkdir -p /pup_new/initrd/mnt/dev_save
mkdir -p /pup_new/initrd/mnt/swap
mkdir -p /pup_new/initrd/mnt/tmpfs
mkdir -p /pup_new/initrd/mnt/tmpfs2
mkdir -p /pup_new/initrd/mnt/zdrv
mkdir -p /pup_new/initrd/tmp
Then found and edit the following (changed [ $CNTLOOP -eq 10 ] && break to [ $CNTLOOP -eq 16 ] && break):

Code: Select all

  UMNTRO="" ; EXTRASFSLIST=""
  if [ -s /tmp/EXTRASFSS ];then #100711
   CNTLOOP=4
   for ONEEXTRA in `cat /tmp/EXTRASFSS | tr '\n' ' '`
   do
    ONEBASE="`basename $ONEEXTRA`"
    EXTRASFSLIST="${EXTRASFSLIST}${ONEBASE} " #construct list of actually used.
    losetup /dev/loop${CNTLOOP} $ONEEXTRA
    mount -r -t squashfs -o noatime /dev/loop${CNTLOOP} /pup_ro${CNTLOOP}
    [ $? -eq 0 ] && UMNTRO="${UMNTRO}:/pup_ro${CNTLOOP}=ro"
    CNTLOOP=`expr $CNTLOOP + 1`
    [ $CNTLOOP -eq 16 ] && break
    #...only support adding 3 extra .sfs files, as performance degrades as each layer added.
    #...v410 bugfix, change 6 to 7 so can have 3 sfs files.
    #...w015 change 7 to 10 so can have 6 sfs files.
    #...LazY200 change 10 to 16 so can have 12 sfs files.
   done
  fi
Execute the following script, but first change Init_rd_tmp to the extraction directory of your initrd.gz:

Code: Select all

for i in 11 12 13 14 15 16;
do
	mknod -m664 /root/Init_rd_tmp/dev/loop$i b 7 $i
done
exit 0
Rebuild the initrd.gz and copy back to your boot directory (backup the original!!!)

2. Remaster Puppy

File /etc/MAXEXTRANUM must have included the new max extra sfs files number (in this here example would be 12). You need to take this file manually when option to edit /tmp/etc is given at remaster process!

I can remember editing another file, but currently can't find it and also can't say if it would be needed. Will add this to here as soon as I've found the file...

---

I'm currently running a Save-File-Version of my private LazY Puppy using this feature and having loaded sfs files up to pup_ro28 at boot up! :D

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#22 Post by R-S-H »

Ok, I've found the file.

The file is: /etc/rc.d/rc.update

Change

Code: Select all

  #v431 added 6 7 8 9
  for LAYERNUM in 3 4 5 6 7 8 9
  do
   [ -f /initrd/pup_ro$LAYERNUM/root/Choices/ROX-Filer/PuppyPin ] && cat /initrd/pup_ro$LAYERNUM/root/Choices/ROX-Filer/PuppyPin >> /root/Choices/ROX-Filer/PuppyPin
   [ -f /initrd/pup_ro$LAYERNUM/root/Choices/ROX-Filer/globicons ] && cat /initrd/pup_ro$LAYERNUM/root/Choices/ROX-Filer/globicons >> /root/Choices/ROX-Filer/globicons
  done
to

Code: Select all

  #v431 added 6 7 8 9
  for LAYERNUM in 3 4 5 6 7 8 9 10 11 12 13 14 15 16
  do
   [ -f /initrd/pup_ro$LAYERNUM/root/Choices/ROX-Filer/PuppyPin ] && cat /initrd/pup_ro$LAYERNUM/root/Choices/ROX-Filer/PuppyPin >> /root/Choices/ROX-Filer/PuppyPin
   [ -f /initrd/pup_ro$LAYERNUM/root/Choices/ROX-Filer/globicons ] && cat /initrd/pup_ro$LAYERNUM/root/Choices/ROX-Filer/globicons >> /root/Choices/ROX-Filer/globicons
  done
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

Post Reply