Multiple SFS support in initrd

This is where threads concerning the development of the next version of Puppy live.
Message
Author
User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#16 Post by mavrothal »

R-S-H wrote:Here is the init script from my LazY Puppy 3. Saluki code included - commented out, because it failed and I did try it with an code-copy of the zdrv code. I have made a lot of modifications also, so it's a bit more than a usual init script.
"a bit more"?...That's a lot to shift through!

I think that the crucial part you miss is the definition of the layers (lines872-888) and thus the union mounting at 1778.

Look at the ADRV_Woof.patch in the download above. should be clear the part you are missing (and is much smaller than your init too :-P)
== [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] ==

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

#17 Post by R-S-H »

Hi, mavrothal
I think that the crucial part you miss is the definition of the layers (lines872-888) and thus the union mounting at 1778.
I did try two times.

First, after doing all needed changes, I forgot to enable the saluki adrv code again and to remove the modified zdrv code - so, I've booted with all changes made and ended up into kernel panic... :lol:

Second go, I've enabled the saluki adrv code again and removed the other one.

Result:

I'm currently posting from LazY Puppy 3.0.0 (only openbox is installed) using the LP2_WindowManagers.sfs for the adrv mount point plus the LP2_XorgHigh.sfs for the zdrv mount point - I use this for the LazY Puppy Extension.sfs (but can be any sfs I want).

FbPanel is there right after X is started and Stellarium runs out of the box (because of the XorgHigh).

I do this from a boot menu entry in menu.lst

Code: Select all

title LazY Puppy 3.0.0 Standard (RAM, ADRV-Test, Fenstermanager, +XorgHigh)
  find --set-root --ignore-floppies /LazY/initrd.gz
  kernel /LazY/vmlinuz lpextsfs=LP2_XorgHigh.sfs lpadrvsfs=LP2_WindowManagers.sfs psubdir=LazY pmedia=atahd pfix=ram,fsck
  initrd /LazY/initrd.gz
Thank you very much, mavrothal! Really!

But, be aware: my lovely Augenstern will not be impressed, because second result ends up in "waiting for me until sunday" - for her... :wink:

I assume, I would have to do this exactly again and again for each a-, b-, cdrv I want to have. At this point I have changed something like this:

Code: Select all

OLDFILESMNTPT="/pup_ro1";NEWFILESMNTPT="/pup_ro1";UMNTMAIN="/pup_rw=rw:/pup_ro1=ro+wh";;
to this

Code: Select all

OLDFILESMNTPT="/pup_ro1";NEWFILESMNTPT="/pup_ro1";UMNTMAIN="/pup_rw=rw:";UMNTRO0="/pup_ro1=ro+wh";;
almost inserting

Code: Select all

UMNTRO0
and

Code: Select all

UMNTRO1
The other part is changing this

Code: Select all

mount -t aufs -o udba=reval,diropq=w,dirs=${UMNTMAIN}${ZLAYER}${UMNTRO} unionfs /pup_new

mount -t unionfs -o dirs=${UMNTMAIN}${ZLAYER}${UMNTRO} unionfs /pup_new
to this

Code: Select all

 mount -t aufs -o udba=reval,diropq=w,dirs=${UMNTMAIN}${UMNTRO0}${ALAYER}${UMNTRO1}${ZLAYER}${UMNTRO} unionfs /pup_new

 mount -t unionfs -o dirs=${UMNTMAIN}${UMNTRO0}${ALAYER}${UMNTRO1}${ZLAYER}${UMNTRO} unionfs /pup_new
Just inserting this code

Code: Select all

${UMNTRO0}${ALAYER}${UMNTRO1}$
But I can't see the system behind this!

Could you please give me something like a "form" or a "path" how to change and/or to add severals "adrv" mount points. I want to have at least: adrv (admin), ldrv (language), wdrv (WindowManagers), rdrv (RunScrips etc.), xdrv (extensions) - I think there will be even more. :lol:

Thanks again, 8)

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

#18 Post by R-S-H »

Addition to the post above...

I've had a look into the above attached .tar.gz file. Patch file ADRV-YDRV_Woof did let me get a bit more into this. Although I did not change UMNTMAIN to UMNTRW it works. Do I have to change this also or is it because of newer woof or newer puppies (kernels)?

And, oh, by the way: where is this mounted - I mean in which order at the pup_roX list (ro1, ro2, ro3 etc.)?
[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

#19 Post by R-S-H »

Oh, that's interesting!

To me it seems like the adrv is mounted on top of the main sfs file. There's a image for the fbpanel menu in main sfs. But the menu shows the image from LP2_WindowManagers.sfs!

This might make possible to boot using settings from sfs that would "overwrite" existing files from main sfs ? ! ? ! ? !

Or is it only because i did not change UMNTMAIN to UMNTRW?

Hm...

I know, it's late... ...though, anyone here, with knowledge on such issues?

EDIT:

Yes!

Copying the image from /initrd/pup_ro2/usr/share/fbpanel/images/start-button.png to /usr/share/fbpanel/images/start-button.png shows the image in fbpanel menu (start button)...

So, is this 8) or is it :? ???
[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

#20 Post by R-S-H »

Ooohhh, this is working fun - or funny working!

Lazy Puppy 3.0.0 booting to RAM, no save file

- adrv = LP2_WindowManagers.sfs
- ddrv = LP2_AudioStudio.sfs --> for testings

- zdrv = LP2_XorgHigh.sfs

FbPanel is there, Stellarium runs out of the box and QJackCtl from LP2_AudioStudio.sfs runs as well!

Next stop: fdrv --> for fonts

---

The icon from fbpanel is still on top...
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

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

#21 Post by sunburnt »

Guys... Actually mksquashfs can append a Squash file!

I just tested it and it works fine, just write to the original SFS file as usual.


Thoughts: I like very much a config. image file and an apps. image file.
This isn`t hard to do, config. Save unions on /root, and app. on /usr.
But the problem is that the app. is separated from it`s configs.


So I made AppPkg, it`s RoxApp and AppDir compatible ( so no-union ).
So to copy an AppPkg everything associated copies with it, even internal libs.
Only links are made in the O.S.`s normal main file system.

Having a separate Save union layer to catch the needed links keeps it clean.
The link`s Save layer is: /tmp/AppPkg/links. It`s self-cleaning at shutdown.

I`ve tried to make chroot and fake-chroot work, but it`s a real bag of bolts.
But the method has some very nice aspects about it. Anyone good at it?

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

#22 Post by mavrothal »

R-S-H wrote:Patch file ADRV-YDRV_Woof did let me get a bit more into this. Although I did not change UMNTMAIN to UMNTRW it works.
And, oh, by the way: where is this mounted - I mean in which order at the pup_roX list (ro1, ro2, ro3 etc.)?
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...
== [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

#23 Post by mavrothal »

sunburnt wrote: Thoughts: I like very much a config. image file and an apps. image file.
This isn`t hard to do, config. Save unions on /root, and app. on /usr.
But the problem is that the app. is separated from it`s configs.
Help me understand a bit.

It is likely that different pupplets will need different apps and configs. So an Apps and Config SFS are not going to be cross-pupplet. Correct?
If this is the case why you want to split apps and configs?
If on the other hand you want it cross-pupplet, how to you ensure that there are not missing/different *required* files among different pupplets or even versions of the same pupplet?

So if we are talking "one specific pupplet", what you want to accomplish is the equivalent of "selective" saving or remastering, but happening in every boot. Correct?
This could be easier accomplished by telling snapmergepuppy, which folders to save and which not with a config file. The problem is that some apps may put configs in places that you miss but I do not know if this can be solved in ay way if a developer ignores the standards.

Am I far off on what (not how) you want to do?
== [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
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#24 Post by sunburnt »

Hi mavrothal; You`re correct of course.
But really a set of apps will only work with a truly compatible Linux O.S. If a Puppy is truly Ubuntu Precise compatible, then those apps will all work.
Some cross compatibility is evident between Precise and Slack, but sketchy. AppPkg dirs. are named for the Linux O.S., distro. ver., and arch. of the app.

I didn`t say I wanted to split the apps. and configs. I said that was a problem with separate Save files.

I`m saying, why scatter files all over the O.S.? Put them in the app`s. dir. In fact I`m saying put everything to do with each app. in it`s AppPkg dir.
AppPkg is "no-union" "no-install" apps., so they operate independently from anywhere, HD, USB, LAN, etc. Copy or move it and its all still there.

What you suggest sounds more complex than simply unioning multiple Save files/dirs. To make a new main SFS just append select layers to the existing SFS.
Or if there are changes to the existing SFS file, then you`d make a new one. But this is the legacy Puppy way of doing things, it`s a little cumbersome.

One of the many union problems is the cpu and ram load goes up with each layer. So Barry sought to limit the number of layers for the sake of old PCs.
Union file systems will never be accepted into the kernel`s main code. Union mounts may possibly make it into the kernel`s code, they`re simpler.
Here is an excellent article about unions and their problems: http://lwn.net/Articles/324291/. They really are quite the rats nest of problem patching.

Far better to dump the union FS and design an O.S. that doesn`t need it. AppPkg apps are a critical part of this type of O.S. setup, it doesn`t use a union.
.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#25 Post by nooby »

sunburnt wrote:I`m saying, why scatter files all over the O.S.? Put them in the app`s. dir.
In fact I`m saying put everything to do with each app. in it`s AppPkg dir.
AppPkg is "no-union" "no-install" apps., so they operate independently from anywhere, HD, USB, LAN, etc. Copy or move it and its all still there.
...
Far better to dump the union FS and design an O.S. that doesn`t need it.
AppPkg apps are a critical part of this type of O.S. setup,
it doesn`t use a union.
.
Not that I understand any of this but it sounds cool.
Keep at it looks promising.
I use Google Search on Puppy Forum
not an ideal solution though

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

#26 Post by mavrothal »

sunburnt wrote: What you suggest sounds more complex than simply unioning multiple Save files/dirs. To make a new main SFS just append select layers to the existing SFS.
Or if there are changes to the existing SFS file, then you`d make a new one. But this is the legacy Puppy way of doing things, it`s a little cumbersome.
Could be, but I do not see why.
Is basically jemimah's idea having a base and an apps sfs taken one step further for additional flexibility.
Let's say base(no X), desktop managers (plus X), apps, or base (plus X) minimal apps, extended apps.
In this scheme , someone could append additional fils to one or more of the SFSs as needed.
However, I do not really think it should be used with 5-50 sfs files placed together in the union both for reasons you mentioned and because without careful splitting/loading you may end up with a broken system.
sunburnt wrote: Far better to dump the union FS and design an O.S. that doesn`t need it. AppPkg apps are a critical part of this type of O.S. setup, it doesn`t use a union.
.
If you really want to go with the multiple SFSs approach do look at Tinycore (as I mentioned earlier). Besides its traditional TCZs it now has the standalone CMSs. TC has its share of issues but when it comes to having apps in squashed filesystems and loading them as needed, it keeps the best of SDL and is unmatched I believe.

However, is hard to see why puppy's current layered system is "broken" and the need we must cover here, other than easier testing of pupplets as they come out.
Would you give me a "real life use case" that the current puppy system (with 1-3 SFSs) fails?
== [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:

#27 Post by Q5sys »

mavrothal wrote:However, is hard to see why puppy's current layered system is "broken" and the need we must cover here, other than easier testing of pupplets as they come out.
Would you give me a "real life use case" that the current puppy system (with 1-3 SFSs) fails?
I can report my experiences with multiple SFS use...
I routinely use anywhere from 15~19 SFS packages on my lighthouse64 install. And I've been running those numbers for well over a year and not had issue. In the past I've been as low as 10 and as high as 29. I have yet to encounter any issues.

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

#28 Post by mavrothal »

Q5sys wrote:
mavrothal wrote:However, is hard to see why puppy's current layered system is "broken" and the need we must cover here, other than easier testing of pupplets as they come out.
Would you give me a "real life use case" that the current puppy system (with 1-3 SFSs) fails?
I can report my experiences with multiple SFS use...
I routinely use anywhere from 15~19 SFS packages on my lighthouse64 install. And I've been running those numbers for well over a year and not had issue. In the past I've been as low as 10 and as high as 29. I have yet to encounter any issues.
I know this tread is getting long :roll: but do you load 15-20 SFS on the union in the initrd or with SFS_load/boot manager?
If not, should we then conclude that your statement implies that the current puppy setup (with one main sfs) is just fine?
== [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:

#29 Post by Q5sys »

mavrothal wrote:
Q5sys wrote:
mavrothal wrote:However, is hard to see why puppy's current layered system is "broken" and the need we must cover here, other than easier testing of pupplets as they come out.
Would you give me a "real life use case" that the current puppy system (with 1-3 SFSs) fails?
I can report my experiences with multiple SFS use...
I routinely use anywhere from 15~19 SFS packages on my lighthouse64 install. And I've been running those numbers for well over a year and not had issue. In the past I've been as low as 10 and as high as 29. I have yet to encounter any issues.
I know this tread is getting long :roll: but do you load 15-20 SFS on the union in the initrd or with SFS_load/boot manager?
If not, should we then conclude that your statement implies that the current puppy setup (with one main sfs) is just fine?
Ah yea... i wasnt specific there. Those SFS packages are loaded with the current SFS bootmanager system.
As for unioning in the inird
Slackbones has 2 SFS files inside the initrd which I have not had issues with.

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

#30 Post by sunburnt »

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.

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.

Post Reply