Multiple SFS support in initrd

This is where threads concerning the development of the next version of Puppy live.
Message
Author
gcmartin

#31 Post by gcmartin »

Hi @Mavrothal and thanks for this discussion. This thread provides insights that developers wrestle with when working in Puppyland to produce distros. And its helpful, I'm sure to those who also build in that it presents some ideas of interest in good methods for the people they envision are the targets for their distros and their work.
Mavrothal wrote: ... do you load 15-20 SFS on the union in the initrd or with SFS_load/boot manager ...
I saw your post about loading 10-15 SFS in LightHouse64.

TaZoC designed this feature about 2 years ago. It happens at boot-time and it will load any OR all SFS it finds in root at boot.

The easiest view of this is to download his LightHouse64 Mariner edition (requires 64bit PC) burn a CD/DVD and boot it without ANY parms.

It will boot and provide you a selection for all the SFSs it sees and when arrival after boot, you will have a desktop comprised of all of the SFSs you allowed at boot time. Further, you can add more SFSs to the root of the CD/DVD and on subsequent boot, the boot subsystem will intelligently present them, as well for selection.

Finally, upon completion of your running session, at shutdown, the LH64 system will allow one to create a save-file of all of their work to minimize subsequent boot needs,

Should you choose to investigate his approach, when you boot the CD/DVD hit F3 and F2 to see some of the boot selection offering and explanations available to users.

One thing of note is that ALL of the SFSs that he provides in Mariner are one he has tested to ensure compatibility. Thereby eliminating "unexpectations" at boot.

Here to help

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#32 Post by mavrothal »

sunburnt wrote:Tiny Core Linux does not use SFS files that are unioned, it uses Squash files.
Tiny Core does not use a union, it uses thousands of links in the main O.S.
It`s newer SCM files are very like AppPkg, RoxApp, or AppDir, no union.


The main arguments are in the article I posted a link to. It speaks for itself.


Q5sys; But what`s the performance on a low ram old PC with 20 layers?
This type of setup has limits to it`s usefulness. But not no-union apps.
I guess I was not clear enough pointing to the fact that the TC system is not a unionfs but that's because I did not realize that you just want a non-uninion filesystem for puppy.
Unionfs do have their problems as pointed in the article you mentioned, however I doubt any of the ones mentioned in the article have anything to do with 99.999% of puppy usage.
Regarding low specs machines, believe me I know about them and union is the least of their problems.

I do not really say that unionfs is a "must" for puppy(full installs are also available) but I would really like to see what "use case" we are trying to cover here. This may focus and help the discussion a bit more.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
Q5sys
Posts: 1105
Joined: Thu 11 Dec 2008, 19:49
Contact:

#33 Post by Q5sys »

sunburnt wrote:Q5sys; But what`s the performance on a low ram old PC with 20 layers?
This type of setup has limits to it`s usefulness. But not no-union apps.
I've never done any actual testing... so I cant really make a reliable statement on that.
I've used 5 to 10 on my netbook... but i've never done any comparisons with it.
Also keep in mind that Lighthouse is 64bit... so 'low ram old pcs' cant run it.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#34 Post by mavrothal »

gcmartin wrote: TaZoC designed this feature about 2 years ago. It happens at boot-time and it will load any OR all SFS it finds in root at boot.
From what I can see in TaZoC's init code, his mods just do "automatically" what bootmanager/SFS_load does on a case by case (manual) setting.
These multiple SFSs are loaded in the union as mount points but are *not* loaded in RAM as the main SFS does.
What the adrv/ydrv patch does is to load multiple SFSs of the unionfs in the RAM as one (if enough RAM available).
So TaZoC's mods are very nice but not relevant. Actually his mods could work in parallel to the ones proposed here as they have no overlap.

As mentioned many times so far, the goal of adrv/ydrv is to facilitate *development* of different flavors/customizations of a given puppy, not to change the way puppy works.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
Q5sys
Posts: 1105
Joined: Thu 11 Dec 2008, 19:49
Contact:

#35 Post by Q5sys »

mavrothal wrote:
gcmartin wrote: TaZoC designed this feature about 2 years ago. It happens at boot-time and it will load any OR all SFS it finds in root at boot.
From what I can see in TaZoC's init code, his mods just do "automatically" what bootmanager/SFS_load does on a case by case (manual) setting.
These multiple SFSs are loaded in the union as mount points but are *not* loaded in RAM as the main SFS does.
What the adrv/ydrv patch does is to load multiple SFSs of the unionfs in the RAM as one (if enough RAM available).
So TaZoC's mods are very nice but not relevant. Actually his mods could work in parallel to the ones proposed here as they have no overlap.

As mentioned many times so far, the goal of adrv/ydrv is to facilitate *development* of different flavors/customizations of a given puppy, not to change the way puppy works.
Actually LHP64 can load all SFS into ram. You have the option to run them from disk or load to ram.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#36 Post by sunburnt »

Puppy will always be a union type O.S., that`s how Barry wants it.
And after all, it is his baby, so that`s just how it should be... Right?

Users find little wrong with unions, but they don`t put it all together.
My thought was more to new Linux O.S.s that drop the legacy crap.

The real Q: If it`s not really needed, then why have it at all?
It`s just an unnecessary complication that enables blending loose files
and Squash files into a sudo-writable file system. There`s better ways.

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

#37 Post by R-S-H »

mavrothal wrote:RSH,
Is not clear to me if you figured it by now but the whole trick is the splitting of "${UMNTMAIN}" to "${UMNTRW}${UMNTRO0}${ALAYER}${BLAYER}${UMNTRO1}"
The {a-z}drvs are mounted to /initrd/mnt/tmpfs{2-25} if there is enough RAM to hold them (ie 2x the total SFSs size) or to /initrd/pup_{a-z}.
All {a-z}drvs mounted this way in the initrd show as one so if you have the same files in 2 SFSs and try to mount them this way you may end up in trouble...
Hi, mavrothal.

Meanwhile I did change UMNTMAIN to UMNTRW, so the code is now equal. But I'm a bit confused - still after reading all new posts in this thread. :cry:

Inside the code of your patches, the adrv uses loop2

Code: Select all

mount -r -t squashfs -o noatime /dev/loop2 /pup_a
the ydrv uses loop3

Code: Select all

mount -r -t squashfs -o noatime /dev/loop3 /pup_y
Inside saluki code loop3 isused for zdrv

Code: Select all

mount -r -t squashfs -o noatime /dev/loop3 /pup_z
and so is in my LazY Puppy init script.

Do I have to increase the loops for each (a,b,c)drv like loop4, loop5, loop6 ond so on?

Also in saluki code adrv and zdrv go to tmpfs2

Code: Select all

cp -af ${MNT_ZFILE}${ZFILE} /mnt/tmpfs2/
The ydrv in your patch goes to tmpfs3

Code: Select all

cp -af ${MNT_YFILE}${YFILE} /mnt/tmpfs3/
Do I have to create these folders inside initrd.gz or at boot up from within the init script?

Thanks

RSH

P.S.
All {a-z}drvs mounted this way in the initrd show as one so if you have the same files in 2 SFSs and try to mount them this way you may end up in trouble...
Could you please explain a bit more? Does it mean to have those two icons for fbpanel (one inside main sfs the other one inside the winmgr sfs) could be responsible for an actual issue (can't load sfs files using sfs_load at mount point pup_ro9 and up)?
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#38 Post by mavrothal »

Q5sys wrote: Actually LHP64 can load all SFS into ram. You have the option to run them from disk or load to ram.
Never used LH64 so I do not know for a fact.
I just glanced at the code and although I can see COPYEXTRASFS2RAM I can not see how more that one SFS is loaded as UMNTRO.
I probably miss something, but can you actually see RAM usage increasing as much as the SFS size when more than 1 extra SFSs are loaded with the copy2am option? (I know you have the RAM for that test :D )
Last edited by mavrothal on Sun 10 Mar 2013, 05:43, edited 1 time in total.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#39 Post by mavrothal »

sunburnt wrote: My thought was more to new Linux O.S.s that drop the legacy crap.
Go ahead and we'll help if we can. :wink:
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#40 Post by mavrothal »

R-S-H wrote: Inside the code of your patches, the adrv uses loop2

Code: Select all

mount -r -t squashfs -o noatime /dev/loop2 /pup_a
the ydrv uses loop3

Code: Select all

mount -r -t squashfs -o noatime /dev/loop3 /pup_y
Inside saluki code loop3 isused for zdrv

Code: Select all

mount -r -t squashfs -o noatime /dev/loop3 /pup_z
and so is in my LazY Puppy init script.
If you use zdrv bump it to use loop 4
Do I have to increase the loops for each (a,b,c)drv like loop4, loop5, loop6 ond so on?
Yes
Also in saluki code adrv and zdrv go to tmpfs2

Code: Select all

cp -af ${MNT_ZFILE}${ZFILE} /mnt/tmpfs2/
The ydrv in your patch goes to tmpfs3

Code: Select all

cp -af ${MNT_YFILE}${YFILE} /mnt/tmpfs3/
Do I have to create these folders inside initrd.gz or at boot up from within the init script?
In the initrd

All {a-z}drvs mounted this way in the initrd show as one so if you have the same files in 2 SFSs and try to mount them this way you may end up in trouble...
Could you please explain a bit more? Does it mean to have those two icons for fbpanel (one inside main sfs the other one inside the winmgr sfs) could be responsible for an actual issue (can't load sfs files using sfs_load at mount point pup_ro9 and up)?
I can not verify that but is likely. Try to remove one and check :wink:
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

gcmartin

#41 Post by gcmartin »

Hi @Mavrothal

Just for the sake of understanding and consistent with this discussion, if you have a 64bit PC and a blank CD/DVD, pull LH64 Mariner and boot it pfix=ram

It wont take you longer than 2 minutes to see the operational aspect of his simple SFS processing at boot time. Copy2RAM is an unnecessary convenience. But, you'll see why.

Here to help

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

#42 Post by R-S-H »

Hi mavrothal.

Thanks, this is helpful a lot.

Any hints on this differences?

ZDRV:

Code: Select all

ZLAYER=':/pup_z=ro'
ADRV:

Code: Select all

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

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#43 Post by 01micko »

Hi

hehe.. I just built a POC Slacko, updated 3.8.2 kernel (supporting HFS, btrfs and f2fs) with an A drive only.. works beautifully. I may even upload it, but i want to figure out f2fs.

I also hacked 3builddistro to support the a drive concept, it does nothing more than produce a sane DISTRO_SPECS. An iso with A drive needs to be made manually afterwards. Patch later.

Thanks mavrothal :)
Puppy Linux Blog - contact me for access

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#44 Post by mavrothal »

R-S-H wrote:Hi mavrothal.

Thanks, this is helpful a lot.

Any hints on this differences?

ZDRV:

Code: Select all

ZLAYER=':/pup_z=ro'
ADRV:

Code: Select all

ALAYER='/pup_a=ro:'
RSH
zlayer is the last one, alayer a middle one.
Do the replacement in

Code: Select all

mount -t aufs -o udba=reval,diropq=w,dirs=${UMNTRW}${UMNTRO0}${ALAYER}${YLAYER}${UMNTRO1}${ZLAYER}${UMNTRO} unionfs /pup_new
and will become clear I believe.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#45 Post by mavrothal »

01micko wrote:I also hacked 3builddistro to support the a drive concept, it does nothing more than produce a sane DISTRO_SPECS. An iso with A drive needs to be made manually afterwards.
That's a good start but spitting at build time is even better :wink:
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#46 Post by 01micko »

mavrothal wrote:
01micko wrote:I also hacked 3builddistro to support the a drive concept, it does nothing more than produce a sane DISTRO_SPECS. An iso with A drive needs to be made manually afterwards.
That's a good start but spitting at build time is even better :wink:
For sure.. or even renaming a custom sfs to the adrive, more flexible, less prone to error. (Maybe more chance of acceptance upstream :wink: ). Baby steps. :)
Puppy Linux Blog - contact me for access

User avatar
Q5sys
Posts: 1105
Joined: Thu 11 Dec 2008, 19:49
Contact:

#47 Post by Q5sys »

mavrothal wrote:
Q5sys wrote: Actually LHP64 can load all SFS into ram. You have the option to run them from disk or load to ram.
Never used LH64 so I do not know for a fact.
I just glanced at the code and although I can see COPYEXTRASFS2RAM I can not see how more that one SFS is loaded as UMNTRO.
I probably miss something, but can you actually see RAM usage increasing as much as the SFS size when more than 1 extra SFSs are loaded with the copy2am option? (I know you have the RAM for that test :D )
I'll be rebooting my machine again in a few days to add some drives... I'll do a few startup schemes and get you some hard results. From memory... yes I have seen memory usage, but memory isn't always the most accurate thing. Give me some time and I'll get you the info.

gcmartin

#48 Post by gcmartin »

I knew I had seen this.

This is NOT Jeminah's model. It is one that is in place with LH64. ((I believe it may have been missed/overlooked as it is aimed for his 64bit platforms) See this pictorial for easy understanding.

It is NOT intended to shift current discussion, rather, to present one working concept.

Hope this helps and provides clarity.

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

#49 Post by R-S-H »

gcmartin wrote:It is NOT intended to shift current discussion, rather, to present one working concept.
That's a good point - plus: a little guide or help for the less experienced of us - like me! :)

Ok.

Back to just a adrv, but still something is getting wrong. The sfs goes to the adrv, I can see the files and use the applications or whatever is in the sfs. I have loaded up to 39 sfs files using sfs_load 1.9.6 (shinobar) - also can unload. :)

But: after unloading an sfs I can't mount sfs files or iso files by the usual left-click action. :cry:

The same on my second edition, adrv & ddrv, which I do attach here, hoping someone will have a look and find my "bugs"?

Seems it's not clear to me , how to handle the tmpfs dirs and the loopX...

Thanks
Attachments
init.gz
(90.43 KiB) Downloaded 935 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#50 Post by mavrothal »

R-S-H wrote: Back to just a adrv, but still something is getting wrong. The sfs goes to the adrv, I can see the files and use the applications or whatever is in the sfs. I have loaded up to 39 sfs files using sfs_load 1.9.6 (shinobar) - also can unload. :)

But: after unloading an sfs I can't mount sfs files or iso files by the usual left-click action. :cry:

The same on my second edition, adrv & ddrv, which I do attach here,
I really have a hard time understanding.
After you mount 39 sfs with sfs_load if you unmount (with sfs_load?) *anyone* of those 39 (not the adrv) then you can not mount sfs with sfs_load or you can not mount them with your "left-click"? But before you unload an SFS the left-click works?
What the left-click calls in your case? filemnt? other?
What the command "filemnt /path/name.sfs" reports?

BTW SFS-load also needs to be patched so will not unmount a/b/cdrv.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

Post Reply