(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 04 Dec 2020, 01:40
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
When should I load xdrv?
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 4 [48 Posts]   Goto page: 1, 2, 3, 4 Next
Author Message
ozsouth

Joined: 01 Jan 2010
Posts: 862
Location: S.E Australia

PostPosted: Wed 05 Feb 2020, 18:51    Post subject:  When should I load xdrv?  

Is there a technical reason that I shouldn't load an xdrv at boot, (between ydrv & adrv)?
I use ydrv for office packages, adrv for browsers, fdrv for firmware, zdrv for kernel. Hence if I make customisations & want to load those every boot, I'm out of drvs. By editing DISTRO_SPECS in etc as well as it & init in initrd.gz, it boots with no obvious issues. In example, I made browser xdrv & late settings adrv - to load last.
with-xdrv.jpg
 Description   
 Filesize   110.32 KB
 Viewed   454 Time(s)

with-xdrv.jpg

Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Wed 05 Feb 2020, 20:07    Post subject:  

It should work fine as far as I'm concerned provided you make the above edits that you mentioned.
_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
nic007


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

PostPosted: Wed 05 Feb 2020, 23:53    Post subject:  

No problem. I guess the main thing would be to decide in which order to have them boot (and perhaps which of them shoud be copied to RAM or not). Post a copy of your initrd.gz as an example how you have managed it. Thanks.
_________________
nicOS-Utility-Suite
Back to top
View user's profile Send private message 
ozsouth

Joined: 01 Jan 2010
Posts: 862
Location: S.E Australia

PostPosted: Thu 06 Feb 2020, 01:02    Post subject:  

With initrd.gz expanded (click on it in ROX-Filer), DISTRO_SPECS is edited as in original post, folder pup_x is added, & init is edited as per attached (remove .fake.gz). Then re-saved (click on it again in ROX-Filer). /etc/DISTRO_SPECS also needs editing to be as in original post. My load order is f z y x a (using x for browsers & a for late settings). Lines 1047-1065 in init seem to set this order. Not sure I got lines 82-83 right. End of original line 82 referred to adrv ilo ydrv which looked wrong to me.
init.fake.gz
Description  remove .fake.gz
gz

 Download 
Filename  init.fake.gz 
Filesize  52.5 KB 
Downloaded  200 Time(s) 
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Thu 06 Feb 2020, 04:44    Post subject:  

Hi ozsouth.

Sorry to rain on the party, but I tried something similar a while back, and it didn't work
because editing the "index card" is not enough.

The number of "drvs" ( a f y z ) one can load in Puppy is hard-coded in the general init
script, IIRC. You'd have to edit that too. ( I got lost because BK uses a lot of vars and
internal functions in that script.)

IHTH.

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
ozsouth

Joined: 01 Jan 2010
Posts: 862
Location: S.E Australia

PostPosted: Thu 06 Feb 2020, 04:58    Post subject:  

@musher - it actually loaded & ran - I edited init in initrd.gz too, but reading 3builddistro on github, as you say f z y a are setup by that build script, so you'd think it may work in certain circumstances. That's what I was hoping devs would clarify.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Thu 06 Feb 2020, 05:16    Post subject:  

Ah. Ok. Sorry.
_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
nic007


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

PostPosted: Thu 06 Feb 2020, 06:24    Post subject:  

A while back I tried to add a bdrv, cdrv, etc. editing the initrd.gz, DISTRO_SPECS as well as the sfs_load script. The additional drv's were created (the folders) correctly but I couldn't get the actual files (contents) of the additional drives to load. Sad
_________________
nicOS-Utility-Suite
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Thu 06 Feb 2020, 09:41    Post subject:  

ozsouth wrote:
@musher - it actually loaded & ran - I edited init in initrd.gz too, but reading 3builddistro on github, as you say f z y a are setup by that build script, so you'd think it may work in certain circumstances. That's what I was hoping devs would clarify.


I'm pretty sure you said it worked, so why the self doubt?

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
ozsouth

Joined: 01 Jan 2010
Posts: 862
Location: S.E Australia

PostPosted: Thu 06 Feb 2020, 19:23    Post subject:  

@s243a - I'm worried about hidden 'gotyas'. The reference to 3builddistro which specifies f z y a drvs only & with adrv appearing twice in original init lines below, I'm concerned about unforseen consequences. The init I attached higher up doesn't follow the pattern of the original code below. In refs to YDRVSFS (& then XDRVSFS), I didn't refer to adrv. I'm hoping the devs will explain why the original is necessary. Both ways seem to work.

Original code:

#precaution - if DISTRO_SPECS was not processed by 3builddistro...
[ ! "$DISTRO_ZDRVSFS" ] && DISTRO_ZDRVSFS="zdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_FDRVSFS" ] && DISTRO_FDRVSFS="fdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_ADRVSFS" ] && DISTRO_ADRVSFS="adrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_YDRVSFS" ] && DISTRO_YDRVSFS="adrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"


Part of my change attached to my post above (without multiple adrv refs):

#precaution - if DISTRO_SPECS was not processed by 3builddistro...
[ ! "$DISTRO_ZDRVSFS" ] && DISTRO_ZDRVSFS="zdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_FDRVSFS" ] && DISTRO_FDRVSFS="fdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_ADRVSFS" ] && DISTRO_ADRVSFS="adrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_YDRVSFS" ] && DISTRO_YDRVSFS="ydrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_XDRVSFS" ] && DISTRO_XDRVSFS="xdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"

Last edited by ozsouth on Thu 06 Feb 2020, 21:42; edited 1 time in total
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Thu 06 Feb 2020, 20:10    Post subject:  

In any case, a-f-y-z-drv code aside, we need to remember that we can load ANY sfs
by scripting sfs_load, which makes the number of sfs's a Puppy can load near infinite
-- if we need to.

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
ozsouth

Joined: 01 Jan 2010
Posts: 862
Location: S.E Australia

PostPosted: Thu 06 Feb 2020, 20:38    Post subject:  

yes, musher - is interesting experiment, but I think you're right.
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Thu 06 Feb 2020, 20:58    Post subject:  

ozsouth wrote:
@s243a - I'm worried about hidden 'gotyas'. The reference to 3builddistro which specifies f z y a drvs only & with adrv appearing twice in original init lines below, I'm concerned about unforseen consequences.

You can verify the aufs layers once it boots up. The layers are in:

/sys/fs/aufs/$AUFS_ROOT_ID/

I think that br0 is the top layer. If there are are unforeseen consequences than either your blocking/replacing something important or the puppy code needs to be modified to make it more generic/universal. If you find such an unforeseen consequence please report it as a bug. I'll at least take it seriously regardless of whether or not the puppy dev team will.


Quote:
The init I attached higher up doesn't follow the pattern of the original code below. In refs to YDRVSFS (& then XDRVSFS), I didn't refer to adrv. I'm hoping the devs will explain why the original is necessary. Both ways seem to work.

Original code:

#precaution - if DISTRO_SPECS was not processed by 3builddistro...
[ ! "$DISTRO_ZDRVSFS" ] && DISTRO_ZDRVSFS="zdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_FDRVSFS" ] && DISTRO_FDRVSFS="fdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_ADRVSFS" ] && DISTRO_ADRVSFS="adrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_YDRVSFS" ] && DISTRO_YDRVSFS="adrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"


Part of my change attached to my post above (without multiple adrv refs):

#precaution - if DISTRO_SPECS was not processed by 3builddistro...
[ ! "$DISTRO_ZDRVSFS" ] && DISTRO_ZDRVSFS="zdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_FDRVSFS" ] && DISTRO_FDRVSFS="fdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_ADRVSFS" ] && DISTRO_ADRVSFS="adrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_YDRVSFS" ] && DISTRO_YDRVSFS="ydrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
[ ! "$DISTRO_XDRVSFS" ] && DISTRO_YDRVSFS="xdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"


You should be able to assume with reasonable confidence that this is a bug that needs to be fixed. Either report the bug on github or do a merge/pull request.

P.S. it still looks like there is a bug in your code. Notice in the last line your are assigning the xdrv to the ydrv. I think you want:

Code:

[ ! "$DISTRO_XDRVSFS" ] && DISTRO_XDRVSFS="xdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Thu 06 Feb 2020, 21:08    Post subject:  

ozsouth wrote:
yes, musher - is interesting experiment, but I think you're right.


I like the option of being able to have extra *DRVSFS type files. However, a more generic approach then adding a new letter might be to use numbered suffixes. Then for each of these *DRVSFS we have an inner loop that adds a layer for each numbed suffix.

Anyway, your xdrv is a quick fix for what you want and if someone decides to implement the numbered suffixes later, your xdrv can be one of the parameters in the outer loop.

_________________
Find me on minds and on pearltrees.

Last edited by s243a on Thu 06 Feb 2020, 21:12; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Thu 06 Feb 2020, 21:09    Post subject:  

musher0 wrote:
In any case, a-f-y-z-drv code aside, we need to remember that we can load ANY sfs
by scripting sfs_load, which makes the number of sfs's a Puppy can load near infinite
-- if we need to.


It's good to have both options Smile

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 4 [48 Posts]   Goto page: 1, 2, 3, 4 Next
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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.4138s ][ Queries: 12 (0.3103s) ][ GZIP on ]