Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 16 Aug 2017, 13:44
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Suggestions
adrv, ydrv, etc.
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [25 Posts]   Goto page: 1, 2 Next
Author Message
nic007


Joined: 13 Nov 2011
Posts: 2115
Location: Cradle of Humankind

PostPosted: Thu 27 Oct 2016, 06:27    Post subject:  adrv, ydrv, etc.  

I'm a supporter of the added sfs module system whilst keeping the base sfs intact and the same. I'm using Tahr 6.0.5 and the usage of the adrv, ydrv and zdrv has been implemented. I would like an expansion on the latter. My suggestion would be the implementation of more drv's at top system level ala the adrv (perhaps bdrv, cdrv,etc.) and those at lower system level than the base sfs like the zdrv's (perhaps xdrv,wdrv,etc.) Also, I would like to be able to rename these drv's eg. ydrv_ tahr_games.sfs. This will make it possible to load "categories" of sfs files categorized by the user for personal use. Curently I'm using the adrv (for system changes), the ydrv for essential sfs add-ons and the zdrv for additional drivers. Thanks
Last edited by nic007 on Thu 27 Oct 2016, 08:58; edited 1 time in total
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1230
Location: GERMANY

PostPosted: Thu 27 Oct 2016, 07:32    Post subject:  

Hi !
Where can i find more infos how to make-use adrive,zdrive ....etc. ?
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 1401
Location: Italy

PostPosted: Thu 27 Oct 2016, 08:20    Post subject:  

I have bookmarked the following posts:

http://www.murga-linux.com/puppy/viewtopic.php?p=906486#906486

http://www.murga-linux.com/puppy/viewtopic.php?p=871006&sid=64ea618dd3afc7c999a219214595df6a#871006
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1230
Location: GERMANY

PostPosted: Thu 27 Oct 2016, 08:57    Post subject:  

Thanks watchdog !
Back to top
View user's profile Send private message 
drunkjedi


Joined: 24 May 2015
Posts: 684

PostPosted: Thu 27 Oct 2016, 10:13    Post subject:  

Hi friends,
May be a functionality like Fadog might be of interest to you.

Take a look at Fatdog's Boot Parameters.
Look in section extrasfs.

You can load any sfs placed anywhere on any connected drive, and instruct it to load in ram or expand in ram or not.
You can specify many sfs files separated by comma.
Quote:
Example: extrasfs=/mnt/home/s1.sfs,ram:/mnt/home/s2.sfs,device:sdb:/path/to/s3.sfs,/dev/sdc

The last specification will load the entire partition of /dev/sdc as an SFS.

No need to merge many needed programs in one adrv, ydrv.

Ohh ya almost forgot, Fatdog loads extrasfs over basesfs not below it. Even Fatdog's sfs_load script works this way.
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 1939
Location: Germany

PostPosted: Thu 27 Oct 2016, 11:05    Post subject:  

This extra sfs option of fatdog is quite similar to of what I'm doing in my T.O.P.L.E.S.S. and its configuration files. There are several options.

Code:
# Auto-Load of SFS Modules at /etc/profile.local
#-----------------------------------------------
# Choose 1 to load the SFS Modules listed, 0 to not to load them at all
MYBOOTSFSLOADLISTOPT=0
# Choose 1 to load the Boot SFS to top layer, 0 to normal layer
MYBOOTSFSTOPLAYEROPT=0
# List of Boot SFS Modules - KEEP THE QUOTES, USE SPACES !
MYBOOTSFSLOADLIST=""


The above options let me switch on/off the use of .sfs modules to be loaded at boot up, switch on/off to load them to a top layer and to define a list of .sfs modules. Needs only the name of the .sfs module to load from boot directory - or in my special set up to load from a specified directory at boot partition containing all of my .sfs modules at one place useable for all my T.O.P.L.E.S.S. made Puppies.

Code:
# Auto-Load of SFS Modules at /root/Startup
#------------------------------------------
# Choose 1 to load the SFS Modules listed, 0 to not to load them at all
MYSFSLOADLISTOPT=0
# List of SFS Modules - KEEP THE QUOTES, USE SPACES !
MYSFSLOADLIST=""


The above option let me switch on/off the use of .sfs modules to be loaded after the graphical desktop is running and to define a list of .sfs modules to load to a normal layer (below the main sfs).

Those configuration files also have options like to install .pet packages automatically and quiet etc.pp.

Though, it can't load whole partitions as an .sfs module. Probably I should have a look at its code? Wink

_________________
RSH

Die etablierten Parteien in Deutschland setzen mathematische Regeln außer Kraft. Zuviele Nullen vor dem Komma - das ist gefährlich.
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1230
Location: GERMANY

PostPosted: Thu 27 Oct 2016, 11:13    Post subject:  

Thanks everyone ! ........will have a look into these advices
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 1939
Location: Germany

PostPosted: Thu 27 Oct 2016, 12:56    Post subject: Re: adrv, ydrv, etc.  

nic007 wrote:
I'm a supporter of the added sfs module system whilst keeping the base sfs intact and the same.

Me too, best way to use programs in Puppy imo.

nic007 wrote:
...I'm using Tahr 6.0.5 and the usage of the adrv, ydrv and zdrv has been implemented. I would like an expansion on the latter. My suggestion would be the implementation of more drv's at top system level ala the adrv (perhaps bdrv, cdrv,etc.) and those at lower system level than the base sfs like the zdrv's (perhaps xdrv,wdrv,etc.) Also, I would like to be able to rename these drv's eg. ydrv_ tahr_games.sfs. This will make it possible to load "categories" of sfs files categorized by the user for personal use. Curently I'm using the adrv (for system changes), the ydrv for essential sfs add-ons and the zdrv for additional drivers. Thanks

Since the code for a use of adrv and ydrv is already existing in init script of initrd.gz, it should be easy to modify/extend this for bdrv, cdrv etc.pp.

Though, attention: you would need to modify/extend sfs_load also for the use of bdrv, cdrv etc.pp.

Or join in and do a pull request at woof-ce/git team - though, no idea how to make such...

_________________
RSH

Die etablierten Parteien in Deutschland setzen mathematische Regeln außer Kraft. Zuviele Nullen vor dem Komma - das ist gefährlich.
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 1939
Location: Germany

PostPosted: Thu 27 Oct 2016, 14:40    Post subject: Re: adrv, ydrv, etc.  

LazY Puppy wrote:
nic007 wrote:
I'm a supporter of the added sfs module system whilst keeping the base sfs intact and the same.

Me too, best way to use programs in Puppy imo.

nic007 wrote:
...I'm using Tahr 6.0.5 and the usage of the adrv, ydrv and zdrv has been implemented. I would like an expansion on the latter. My suggestion would be the implementation of more drv's at top system level ala the adrv (perhaps bdrv, cdrv,etc.) and those at lower system level than the base sfs like the zdrv's (perhaps xdrv,wdrv,etc.) Also, I would like to be able to rename these drv's eg. ydrv_ tahr_games.sfs. This will make it possible to load "categories" of sfs files categorized by the user for personal use. Curently I'm using the adrv (for system changes), the ydrv for essential sfs add-ons and the zdrv for additional drivers. Thanks

Since the code for a use of adrv and ydrv is already existing in init script of initrd.gz, it should be easy to modify/extend this for bdrv, cdrv etc.pp.

Though, attention: you would need to modify/extend sfs_load also for the use of bdrv, cdrv etc.pp.

Or join in and do a pull request at woof-ce/git team - though, no idea how to make such...

I have successfully extended the init script and the initrd.gz for the use of a bdrv_yara_1.5.sfs in Yara OSX 1.5 which is based on tahr 6.0.2.

Though, I haven't yet modified the sfs_load for bdrv sfs, so it may corrupt my system when trying to unload another loaded .sfs module from a pup_roX directory.

Edit:

The names for the (a)-drives are defined in DISTRO_SPECS in initrd.gz
Code:
#Puppy default filenames...
#Note, the 'SFS' files below are what the 'init' script in initrd.gz searches for,
#for the partition, path and actual files loaded, see PUPSFS and ZDRV in /etc/rc.d/PUPSTATE
DISTRO_PUPPYSFS='pup_yara_1.5.sfs'
DISTRO_ZDRVSFS='zdrv_yara_1.5.sfs'
DISTRO_ADRVSFS='adrv_yara_1.5.sfs'
DISTRO_BDRVSFS='bdrv_yara_1.5.sfs'
DISTRO_YDRVSFS='ydrv_yara_1.5.sfs'

so, easy to change its names to e.g,: ydrv_ tahr_games.sfs

Edit 2:

Successfully extended sfs_load for bdrv sfs. Loads and unloads .sfs to/from pup_roX mount-points/directories as usual. I'm still using a already modified version of sfs_load 2.3 named to lazy_sfs_load.

ToDo:

Extending the initrd.gz, the init script and lazy_sfs_load for the use of (a)-drives from c-drive (cdrv) to x-drive (xdrv) in my TOPLESS LazY Yara Puppy 5.1.5. Cool
Using-bdrv-sfs-in-TOPLESS-Yara-1.5.jpg
 Description   
 Filesize   45.34 KB
 Viewed   316 Time(s)

Using-bdrv-sfs-in-TOPLESS-Yara-1.5.jpg


_________________
RSH

Die etablierten Parteien in Deutschland setzen mathematische Regeln außer Kraft. Zuviele Nullen vor dem Komma - das ist gefährlich.
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2115
Location: Cradle of Humankind

PostPosted: Thu 27 Oct 2016, 15:43    Post subject:  

Cool. Which init script, rc.sysinit? Example of how you edited it please. Where in the file system hierarchy did bdrv mount, top level with adrv?
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 1939
Location: Germany

PostPosted: Thu 27 Oct 2016, 17:52    Post subject:  

nic007 wrote:
Cool. Which init script, rc.sysinit? Example of how you edited it please. Where in the file system hierarchy did bdrv mount, top level with adrv?

No, it is not rc.sysinit. When rc.sysinit is executing, the a-drive stuff is already long done.

It's all done just by editing the initrd.gz since it all happens inside of the init script in initrd.gz plus some definitions in its DISTRO_SPECS file.

When changing the code one is able to decide, if bdrv is loaded above adrv or below adrv - matters on how to change the code. I'm doing it all above the main sfs layer and in alphabetical order, so adrv, bdrv, cdrv etc.

By repeating equal steps as done for the bdrv sfs I was able to establish now a cdrv sfs for my T.O.P.L.E.S.S. LazY Yara Puppy.

I can't give any example like a guide atm.

Though, a short description:

- adding the definitions to DISTRO_SPECS
- - Example: DISTRO_BDRVSFS='bdrv_yara_1.5.sfs'

- searching the init script for adrv
- duplicating all code found and changing adrv to bdrv (ADRV to BDRV)
- - mostly it's single lines except a few multiple lines sections
- - in that sections there is some more code using a or A (like: ABASENAME) in front of its name (change to b or B)

- changing the tmpfs2 in duplicated code to tmpfs5 (as tmpfs4 is already there)
- changing /dev/loop2 in duplicated code to /dev/loop5 as /dev/loop4 is already used for the zdrv sfs
- changing pup_a in duplicated code to pup_b

- added directory tmpfs5 to /mnt of extracted initrd.gz
- added directory pup_b to / of extracted initrd.gz

Below this line: "Performing a 'switch_root' to the layered filesystem..." in init script (where it creates lots of directories (mkdir)) I just duplicated the code lines containing pup_a and adrv, changed it to pup_b and bdrv.

At last step searching the init script for ${ALAYER}, duplicating it and change the duplicate to ${BLAYER} - and here it is to decide where the bdrv sfs's layer is placed (above or below).

Everything placed in front of ${UMNTRO1} goes above, everything placed in the back of ${UMNTRO1} goes below main sfs.

That's it.

For sfs_load done the same way. Though, it's less steps to do.
Screenshot-2016-10-27-23-17-23.jpg
 Description   
 Filesize   52.24 KB
 Viewed   285 Time(s)

Screenshot-2016-10-27-23-17-23.jpg


_________________
RSH

Die etablierten Parteien in Deutschland setzen mathematische Regeln außer Kraft. Zuviele Nullen vor dem Komma - das ist gefährlich.
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 1939
Location: Germany

PostPosted: Thu 27 Oct 2016, 20:51    Post subject:  

In addition to my previous post:

By now I have established bdrv, cdrv and ddrv completely to the initrd.gz and to sfs_load version 2.3.

So I thought it would be a good idea, to post the files I'd modified so far and the structure that needed to be added to the initrd.gz. Of course these are the files from Yara OSX 1.5 - based on tahr 6.0.2.

The .gz files are fake .gz files, so just remove the fake .gz and the file appears. The .tar.gz file is a true archive, so just extract it.

Inside of the files search for bdrv and blay and you will find everything that's needed from bdrv to ddrv. Just copy these code parts/sections into the init script of the initrd.gz of the your Puppy. Also the additions from the DISTRO_SPECS file.

Inside of sfs_load search for bdr (not: bdrv) and you will find everything that's needed from bdrv to ddrv.

The content of the .tar.gz archive needs to be added to the directory of the extracted initrd.gz.

Good luck.

Edit:

I have applied this now to all my T.O.P.L.E.S.S. LazY Puppy 5 Systems, but I limited it to bdrv, cdrv, ddrv, edrv and xdrv to avoid the command line in boot menu entry (menu.lst) getting to long. Since my systems do not load those a-drives automatically (if existing) I need to submit a boot parameter to load those a-drives.

Examples:

- padrv=y will load the default adrv defined in DISTRO_SPECS
- padrv=MyADRV.sfs will load the MyADRV.sfs

If padrv is not submitted the adrv sfs will not load. The bdrv, cdrv, ddrv, edrv, xdrv and ydrv is handled equally.

While applying this to all my different T.O.P.L.E.S.S. LazY Puppy 5 Systems (based on tahr 602 & 605, tahr64 605, Unicorn 60, Vivid beta2) I found a small issue in init script of Unicorn or Vivid (can't recall atm). This init script has already code for a f-drive (fdrv, pup_f) which is using tmpfs5 and loop5. So this needs to be changed then to tmpfs8 and loop8.
sfs_load-2.3.gz
Description 
gz

 Download 
Filename  sfs_load-2.3.gz 
Filesize  99.85 KB 
Downloaded  29 Time(s) 
init-yara-1.5.gz
Description 
gz

 Download 
Filename  init-yara-1.5.gz 
Filesize  96.85 KB 
Downloaded  30 Time(s) 
DISTRO_SPECS-yara-1.5.gz
Description 
gz

 Download 
Filename  DISTRO_SPECS-yara-1.5.gz 
Filesize  1.32 KB 
Downloaded  31 Time(s) 
add2initrdgz.tar.gz
Description 
gz

 Download 
Filename  add2initrdgz.tar.gz 
Filesize  209 Bytes 
Downloaded  33 Time(s) 
Screenshot-2016-10-28-02-32-04.jpg
 Description   
 Filesize   31.62 KB
 Viewed   261 Time(s)

Screenshot-2016-10-28-02-32-04.jpg


_________________
RSH

Die etablierten Parteien in Deutschland setzen mathematische Regeln außer Kraft. Zuviele Nullen vor dem Komma - das ist gefährlich.
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2115
Location: Cradle of Humankind

PostPosted: Fri 28 Oct 2016, 01:39    Post subject:  

Thanks, LazY Puppy. I'll play a bit with it over the weekend when I have more time. This is a good addition to what we want to and can do with puppy's configuration. Good work.
Last edited by nic007 on Fri 28 Oct 2016, 02:26; edited 1 time in total
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2115
Location: Cradle of Humankind

PostPosted: Fri 28 Oct 2016, 02:24    Post subject:  

drunkjedi wrote:
Hi friends,
May be a functionality like Fadog might be of interest to you.

Take a look at Fatdog's Boot Parameters.
Look in section extrasfs.

You can load any sfs placed anywhere on any connected drive, and instruct it to load in ram or expand in ram or not.
You can specify many sfs files separated by comma.
Quote:
Example: extrasfs=/mnt/home/s1.sfs,ram:/mnt/home/s2.sfs,device:sdb:/path/to/s3.sfs,/dev/sdc

The last specification will load the entire partition of /dev/sdc as an SFS.

No need to merge many needed programs in one adrv, ydrv.

Ohh ya almost forgot, Fatdog loads extrasfs over basesfs not below it. Even Fatdog's sfs_load script works this way.

Would be nice if this could be implemented in the mainstream puppy. Very easy way of doing things. Do you need to have an existing savefile/savefolder for this to work?
Back to top
View user's profile Send private message 
drunkjedi


Joined: 24 May 2015
Posts: 684

PostPosted: Fri 28 Oct 2016, 11:44    Post subject:  

nic007 wrote:
Would be nice if this could be implemented in themainstream puppy. Very easy way of doing things. Do you need to have an existing savefile/savefolder for this to work?
I have not tested it.
It's been implemented since last 2, 3 updates.

But recently I am not getting much time to experiment much.
I just browse forum on mobile for few days.

But I believe having savefile/folder or not wouldn't matter.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [25 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Suggestions
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0981s ][ Queries: 14 (0.0080s) ][ GZIP on ]