Puppy on systemd (fully operational)

Under development: PCMCIA, wireless, etc.

Moderator: Forum moderators

Post Reply
mistfire
Posts: 768
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 195 times

Puppy on systemd (fully operational)

Post by mistfire »

Last time I made an experiment about booting Puppy using systemd

https://oldforum.puppylinux.com/viewtopic.php?t=117756

Somehow it works but it has many errors upon shutdown process.

When I revisited this experiment. I made a breakthrough. I able to boot a puppy-fied ubuntu distro with extreme minimal changes (but it requires modifications on init script, puppy boot script, and shutdown script). It boots like puppy, works like ubuntu, and shutdown like puppy and even able to make savefile at first shutdown.

I revisit this experiment, because I was thinking of a script that works the same as @wiak 's first ribit but with traditional puppy setup.

I will release the preview iso soon to show the proof of concept.

Update: Now fully operational.
ManjaroPup64 is a proof of concept for puppy on systemd
https://drive.google.com/file/d/1AX6Zph ... ZXE2ljDN77

Last edited by mistfire on Fri Feb 14, 2025 8:27 am, edited 2 times in total.
mistfire
Posts: 768
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 195 times

Re: Puppy on systemd (follow-up, revisited)

Post by mistfire »

I finally made it. I decide to change strategy how to make savefile creation work on Puppy. It now prompts on boot whether to create a savefile or not then a config file was created and it will read by Puppy shutdown during shutdown without any user interaction.

I use Manjaro as sample for the experiment due to able to trimmed down to smaller size and here is the sample that I made
viewtopic.php?t=12254

mistfire
Posts: 768
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 195 times

Puppy on systemd (follow-up, revisited, improved)

Post by mistfire »

UPDATE: The puppy shutdown process on systemd works however there is one problem, the file system of partition that host save files became dirty especially the linux partitions. Due to systemd parallel nature also undiscriminately unmounting mountpoints. I searched for workaround on how to exclude a mountpoints on systemd but no to avail because it was by design.

I stumbled on Slax distro, I noticed that it has debian version which also using systemd. I searched on slax documentation and blogs. It turns out that systemd has hard-coded special paths which ignored by systemd when unmounting during shutdown. So what I did was I imitate the slax's approach by moving /initrd to /run/initramfs. I modified the initrd init scripts and puppy core files that greps "/initrd" path and replace with "/run/initramfs". For compatibility, /initrd is now a symlink to /run/initramfs. 90% of homemade puppy still works unless the homemade apps use /initrd for grepping on mount command.

Upon testing on manjaropup loaded with save folder during reboot, the mountpoints on /run/initramfs was indeed ignored by systemd during unmount target then the puppy shutdown script was kicked in after shutdown and unmount target event before reaching the final target in systemd. When the manjaropup was reboot again, it no longer detects filesystem errors when the save folder is loaded.

Based on systemd documentations by /run/initramfs path. It /run/initramfs/shutdown script exists. It jumps automatically on initramfs, slax uses live linux script to disassemble the root filesystems make it shutdown process much cleaner. Maybe I try to use that scripts.

References:
https://www.slax.org/en/blog/24229-Clea ... stemd.html
https://www.freedesktop.org/wiki/Softwa ... dInterface

User avatar
wiak
Posts: 4310
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1295 times
Contact:

Re: Puppy on systemd (follow-up, revisited)

Post by wiak »

mistfire wrote: Wed Jul 10, 2024 12:28 am

Last time I made an experiment about booting Puppy using systemd

https://oldforum.puppylinux.com/viewtopic.php?t=117756

Somehow it works but it has many errors upon shutdown process.

When I revisited this experiment. I made a breakthrough. I able to boot a puppy-fied ubuntu distro with extreme minimal changes (but it requires modifications on init script, puppy boot script, and shutdown script). It boots like puppy, works like ubuntu, and shutdown like puppy and even able to make savefile at first shutdown.

I revisit this experiment, because I was thinking of a script that works the same as @wiak 's first ribit but with traditional puppy setup.

I will release the preview iso soon to show the proof of concept.

That's great mistfire. @rockedge had doing this in mind with modified FirstRib build system for some time, but not yet got round to that and taking a while to find time so good to hear something being done like that. Presumably no one will object to your build being called Puppy when not built using woof-CE ;-)
In practice, the result can be just as much a Puppy as any other Puppy so should be great.

EDIT: Oh... I just noticed you started this mid last year. Hopefully you will publish the build scripts since several KL devs at least will no doubt be very interested to try it out.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

mistfire
Posts: 768
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 195 times

Puppy on systemd (fully operation)

Post by mistfire »

Indeed the /run/initramfs/shutdown can pivot_root the puppy layared filesystem. I used the linux live scripts and I made some modifications. It totally disassembled the puppy root filesystem, unmounts the sfs modules, and unmounts the mounted devices ended up to a total initial ramdisk. At this stage just issue poweroff/reboot command (or even "its now safe to turn off the computer" prompt for non-acpi). This makes the shutdown process much cleaner compared to other non-systemd based puppy.

mistfire
Posts: 768
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 195 times

Re: Puppy on systemd (follow-up, revisited)

Post by mistfire »

wiak wrote: Thu Feb 13, 2025 1:28 am

Hopefully you will publish the build scripts since several KL devs at least will no doubt be very interested to try it out.

For now, I used the manual method for building puppy-fied version of a distro. I hope that I can write a build script for that due to complexity.

mistfire
Posts: 768
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 195 times

Puppy on systemd (fully operational)

Post by mistfire »

The experimental ManjaroPup64 25.01 released: https://drive.google.com/file/d/1AX6Zph ... ZXE2ljDN77
MD5 Checksum: 43328b418e345d974c597beb3263f6b9

This is a huge overhaul on puppy core scripts in order to make systemd work on puppy.

Post Reply

Return to “Cutting Edge”