Sanderdog 1.8: load and use other linux distro in puppy

Under development: PCMCIA, wireless, etc.
Message
Author
mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

Sanderdog 1.8: load and use other linux distro in puppy

#1 Post by mistfire »

Since underdog linux is retired. I think of a new approach based from chroot approach.

It works like an underdog but chrooted compared to mount at bottom layer. This script allows to load the other linux distro partition on the fly and use its application (even older linux distro versions) with desktop integration and file association without breaking the system

It has gui looks like the former underdog gui.

The chrooted environment only sees the host /root, /home, /mnt, and /media. Everyone is welcome to improve this program. Icon integration is the only missing piece.

How sanderdog works:
1. It will create a directory named /var/vfs
2. The target linux partition will be mounted at /var/vfs/ro_layer
3. Add some flag file at /var/vfs/rw_layer
4. mount /var/vfs/ro_layer, /var/vfs/rw_layer, at /var/vfs/rootfs
5. The /dev, /root, /proc, /sys, /home, /media, /tmp, and /mnt will be bind mounted at /var/vfs/rootfs
6. Generate chrooted desktop files at /usr/local/share/applications
7. Copy some mime xml files from /var/vfs/ro_layer to /usr/local/share/mime
8. Start some services (supports systemd, upstart, runit, and sysvinit [experimental])
Attachments
sanderdog-1.8.pet
* Some bugfixes
(5.83 KiB) Downloaded 438 times
Last edited by mistfire on Wed 29 Apr 2020, 15:40, edited 17 times in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#2 Post by wiak »

I think suggestion is the same (or very similar, except for your planning to mount proc etc in middle layer) as being done in FirstRib leading to one version of WeeDog:

http://www.murga-linux.com/puppy/viewto ... 15#1029315

http://murga-linux.com/puppy/viewtopic. ... 62#1025462

http://murga-linux.com/puppy/viewtopic. ... 27#1027227

http://www.murga-linux.com/puppy/viewto ... 36#1030336

Having said that, FirstRib is being developed to test out both the above chroot overlay (preferred) or aufs fs methods but also more traditional initramfs switch_root (and perhaps also pivot_root with chroot) type boots.

Your middle layer would have to be a read/write layer of course, for proc etc, so maybe only possible with aufs? As far as I remember, but would have to re-read kernel notes on overlayfs, result is undefined according to specs of overlayfs if middle layer used as read/write?).

Looking forward to your own trials/test-code though, since the more code examples and developments like this the better!

wiak

EDIT: By the way, in English, chunder means to vomit, so maybe not the best name... ;-)

Terry H
Posts: 708
Joined: Sun 29 Mar 2009, 16:48
Location: The Heart of Muskoka, ON Canada

#3 Post by Terry H »

wiak wrote:
EDIT: By the way, in English, chunder means to vomit, so maybe not the best name... ;-)
I had quite a chuckle when I read the title. In the words of Men at Work, immortalized in song:
"I come from a land down under where beer does flow and men chunder".

So now having had a laugh, i congratulate both of you for your many contributions and innovations to puppy. Your contributions are very much appreciated.

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#4 Post by s243a »

I look forward to seeing how chunderdog works. It sounds interesting :). On another note I don't think that underdog should be retired. If you happen do do a woof-CE fork that keeps underdog, please let us know :).
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#5 Post by mistfire »

Update:
It works but here are some observations

1. Binded mountpoints /dev, /sys, /proc, and /tmp does not appear on top layer when mounted on middle layer. It requires to bind mount on top layer

2. Chrooted rootfs can see host /root, /media, and /mnt by mount binding on top layer

3. Auto generation of chrooted desktop files works but need to deal with Icons.

@s243a underdog was removed from woof-ce github. So an alternative solution is needed.

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#6 Post by s243a »

mistfire wrote:Update:
It works but here are some observations

1. Binded mountpoints /dev, /sys, /proc, and /tmp does not appear on top layer when mounted on middle layer. It requires to bind mount on top layer

2. Chrooted rootfs can see host /root, /media, and /mnt by mount binding on top layer

3. Auto generation of chrooted desktop files works but need to deal with Icons.

@s243a underdog was removed from woof-ce github. So an alternative solution is needed.
Unless you want to maintain a separate fork of alternatively unless it is possible to provide underdog as a pet.

That all said perhaps the chunderdog idea is superior and none of these above two alternatives are necessary. I look forward to seeing how this progresses :)
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#7 Post by mistfire »

Here is a simple chunderdog demo that I made

How to use this script:
1. Puppy host
2. You need an installed linux distro on a partition
3. Type this command on terminal

Code: Select all

 ./chunderdog.sh [target linux partition] 
4. It will enter chrooted shell, minimize the terminal
5. You will now see the additional applications came from other linux distro on Applications Menu. Also the underdog apps have file association too (for xdg-compliant file managers)
6. To quit the demo. Restore the minimized terminal and type "exit"

Also I need help to implement the following on chunderdog
1. Make /var/vfs/ro_layer/usr/share/icons and /var/vfs/ro_layer/usr/share/mime visible on host
2. Run services/daemons from chrooted underdog and stop them also upon exiting chrooted underdog
Attachments
chunderdog.sh.zip
Initial demo script

* Just remove .zip extension and set file permission to +x
(3.04 KiB) Downloaded 337 times

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#8 Post by mistfire »

chunderdog is now called sanderdog (sandboxed underdog).

The pet package is attached at the first post of this thread

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#9 Post by mistfire »

Sanderdog-1.1 released

Changes:
* Improved chrooting
* Improved gui

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#10 Post by mistfire »

Take note, the chrooted application has (isolated) suffix on its name.

User avatar
01101001b
Posts: 123
Joined: Thu 09 Mar 2017, 01:20
Location: Buenos Aires, Argentina

Re: sanderdog 1.1: load and use other linux distro partition in puppy

#11 Post by 01101001b »

mistfire wrote:[...]How sanderdog works:[...]
Mistfire, this is inmensely useful to me. I've tried and failed several attempts with underdog in the past and the present. Now I'll try this as soon as possible.
Thank you! :-)

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#12 Post by mistfire »

Sanderdog 1.2 released

Changes:
* More improvements
* Able to start some systemd service and autostart

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#13 Post by mistfire »

Sanderdog 1.3 released

Changes:
* Aside some systemd services, it can now start upstart services
* More bugfixes

Download link was on the first post of this thread

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#14 Post by mistfire »

Sanderdog 1.4 released

Changes:
* Added support for starting some runit services
* Failsafe added. Sanderdog will not run if 32-bit host attempts to load 64-bit linux distro

Download was on the first post of this thread

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#15 Post by rockedge »

I have been having success with firstrib (WeeDog) in various forms from a boot version to a chroot'ed one. The chroot'ed version of firstrib really works well with a Puppy Linux Bionic as host.

So I am going to give this script a try as this looks interesting and a potential approach to a LAMP system I am messing with.

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#16 Post by mistfire »

Sanderdog 1.5 released

Changes:
* Now supports starting sysvinit services (experimental)
* With cpu arch compatibility matching. Sanderdog will not run if the cpu arch and the target installed linux partition is not compatible (works best on x86 and arm architectures)

Download was on the first post of this thread

User avatar
01101001b
Posts: 123
Joined: Thu 09 Mar 2017, 01:20
Location: Buenos Aires, Argentina

#17 Post by 01101001b »

mistfire wrote:Sanderdog 1.5 released
I'm really looking forward to try this tool when, at last, I have some spare time back again :roll:

Thx so much! :D

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#18 Post by mistfire »

Sanderdog 1.6 released

Changes:
* Chrooted desktop files and mime files moved to /usr/local
* Sandbox cache file update on first run
* Bugfixes

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#19 Post by mistfire »

Sanderdog 1.7 released

Changes
* Improved cleanup

User avatar
01101001b
Posts: 123
Joined: Thu 09 Mar 2017, 01:20
Location: Buenos Aires, Argentina

#20 Post by 01101001b »

mistfire wrote:Sanderdog 1.7 released
Wow! :shock: Thank you so much for your efforts! :D

Post Reply