Page 1 of 1

Uncle Mike's 'confused'....like, REALLY confused!! about chrooting

Posted: Sun Feb 21, 2021 2:59 pm
by mikewalsh

Hiya, gang.

D'you ever get the feeling that certain things happen purely to 'tease' you.....even though those occurrences are actually to your benefit in the long run?

Subject - "chrooted" Puppies...ok?

I use two chrooted Puppies; one 32-bit, and one 64-bit. Each is for the purpose of running newer applications in older Puppies of that architecture, particularly when a given app's requirements would need so much work doing to the older Puppy as to make it not worthwhile. For instance, it's a very good way of running modern browsers in elderly 5-series Puppies.....even some 4-series, as I proved with Darry's 431 'Phoenix'. And the principle holds true for any item, especially if you know for a fact that said app will definitely run in the newer Pup.

I have @watchdog to thank for this wonderful capability; 'twas he who introduced the simple script that enables a 'chrooted' app to run in a 'host' Puppy. For which I'm endlessly grateful. (Of course, unlike most folks setting up a "chroot", Pups are so lightweight & small, we just use the whole thing..!)

However; this is where it gets a wee bit confusing..... :lol: :shock: :roll:

----------------------------------------

The 'chroot' Pups in question are the two iterations of Xenialpup; Xenialpup32, and Xenialpup64.

I run 4 64-bitzers; Fossa, Bionic, Xenial & jrb's 'lite' spin on BK's Quirky 'April' 7.0.1 (excellent Puppy, and consistently my 'daily driver').

And two 32-bitzers: Xenial 7.5, and Sailor's Slacko '5.7.1' modernised spin on the classic 570. Now then; this is where it starts getting weird, ok?

I use the Xenial32 chroot to enable a lot of stuff in Slacko 571; understandable, 'cos the glibc, libstdc++.so.6, deps, etc, are still older-generation. It lets me run modern Chromium-clone portable browsers, and various other things. That's as expected. But why should my Xenial install run Chromium 'clones' in the same version 'chroot' quite happily, but struggle to run 'em natively.....when by all rights, it should be able to do so with ease?

(*shakes head in amazement...*) :o :?

---------------------------------------------------

The 64-bit Xenial chroot is primarily for running 'extras' in Quirky64 'April' 7.0.1, because this is essentially Tahr-generation; lots of Tahr stuff runs happily with it, yet other modern stuff is now too much for it.

Openshot is my preferred video-editor of choice, ok? Now; I found this out just last night....

~~~~~~~~~~~~~

Ever since the 2-series Openshots launched, Johnno Thomas, its lead dev, has been publishing them as AppImages. Okay, I admit; AppImages are one of my favourite package formats for Puppy, though they do have their peculiarities.....much depends on whether they've been packaged properly in the first place. BUT; except with ultra-modern Pups (and still needing 'workarounds'), the Openshot AppImages refuse to fire-up in most Puppies. They certainly won't run in Xenialpup64....not 'natively', anyway.

I was absolutely gobsmacked last night when, after setting up the latest Openshot, v2.5.1, for a trial run in the Xenial64 chroot - just for the hell of it, but not expecting owt - it fired straight up without a murmur....

HUH ???!? Image

Honestly, I'm speechless. Why on earth should it behave as it ought to in a chroot, yet refuse to run in that same identical Puppy, natively, running on "bare metal"? (And it runs perfectly, too; previews, drag'n'drop, transitions, effects, cutting/splicing, 'scenes', rendering.....everything behaves itself! :D )

I'm not 'knocking it', mind. I'm very happy with the outcome! But, if anybody could explain why this is happening the way it is, I would be a sight less confused.... :? :lol: :lol: :thumbup:

(*sheeesh*)

Mike. ;)


Re: Uncle Mike's 'confused'....like, REALLY confused!! about chrootinig

Posted: Sun Feb 21, 2021 5:16 pm
by s243a

Might it have something to do with the "xhost +" command that you do in your chroot scripts. For security reasons I would prefer not to use this command but it might help something work in the appimmage.


Re: Uncle Mike's 'confused'....like, REALLY confused!! about chrootinig

Posted: Sun Feb 21, 2021 5:38 pm
by ravensrest

My apologies, Mike, but I can't find watchdog's simple script for running a puppy within another puppy. Could you please provide a link, or the script itself?
Thanks,
BS


Re: Uncle Mike's 'confused'....like, REALLY confused!! about chrootinig

Posted: Sun Feb 21, 2021 5:42 pm
by s243a
ravensrest wrote: Sun Feb 21, 2021 5:38 pm

My apologies, Mike, but I can't find watchdog's simple script for running a puppy within another puppy. Could you please provide a link, or the script itself?
Thanks,
BS

The script can be found in Mike's chrooted iron browser:

viewtopic.php?f=90&t=760


Re: Uncle Mike's 'confused'....like, REALLY confused!! about chrootinig

Posted: Sun Feb 21, 2021 6:46 pm
by mikewalsh

@ravensrest :-

Um.....it's a wee bit more complex than simply running a script.

You have to set-up the Puppy you want to run as a "chroot" as a "full install" within its own, dedicated directory. Basically, mount your Pup's ISO, then mount the main Puppy SFS. Then, copy the contents of the SFS into the dedicated directory. Name the directory "cont" (short for container); the scripts are all set up to use this name.

BUT; it doesn't stop there. Modern, modular Puppies, with their separate zdrv, will need the contents of the zdrv also copying across to their respective locations. Normally, when you boot a Puppy, these SFS files are auto-layered into the union aufs file-system. This doesn't happen with a chroot; it all needs to be set-up manually......and that's before you can start doing anything else with it.

If your Puppy uses an fdrv - for firmware - this, too, will need mounting & the contents copying to the appropriate locations. Adrvs, and ydrvs, can safely be ignored.

There is also a "closechroot" script which unmounts the chroot when you exit your application, or shut Puppy down.

Still interested?

Mike. ;)


Re: Uncle Mike's 'confused'....like, REALLY confused!! about chrooting

Posted: Mon Feb 22, 2021 4:09 pm
by ravensrest

Thank you, Mike and s243a, but if I understand Mike's last note, this is pretty much what I would have to do to set up any chroot jail. Don't know if I have that much need to do so, or the patience to try.
BS