Page 1 of 1

Puppy in full sysvinit

Posted: Tue Jul 11, 2023 12:31 pm
by mistfire

I made an experiment on initializing puppy during boot process on different init systems

The first one was using systemd. It works but it indiscriminately tried to unmount any mountpoints also alsa does not work.

Now the second one was using full sysvinit. I thought that it looks easy because puppy was using BusyBox init which behaves the same as sysvinit however the inittab was not truly compatible. I managed to boot puppy on sysvinit. However it unable to reboot or turn off the computer after shutdown script was executed. It always stuck at "no more processes left in this runlevel"

Any ideas how to fix this problem on sysvinit either script or inittab?

UPDATE: I successfully boot puppy on full sysvinit however unable to interact on dialogs during shutdown process.


Re: Puppy in full sysvinit

Posted: Tue Jul 11, 2023 2:20 pm
by dimkr

You'll need to get rid of rc.sysinit and rc.shutdown to make sysvinit work, and use separate scripts with runlevels instead.


Re: Puppy in full sysvinit

Posted: Tue Jul 11, 2023 2:45 pm
by mistfire
dimkr wrote: Tue Jul 11, 2023 2:20 pm

You'll need to get rid of rc.sysinit and rc.shutdown to make sysvinit work, and use separate scripts with runlevels instead.

rc.sysinit works fine on sysvinit. Only the rc.shutdown script is the problem


Re: Puppy in full sysvinit

Posted: Tue Jul 11, 2023 3:38 pm
by dimkr

That's because it's poweroff and not init that runs rc.shutdown.


Re: Puppy in full sysvinit

Posted: Wed Jul 12, 2023 10:53 am
by mistfire
dimkr wrote: Tue Jul 11, 2023 3:38 pm

That's because it's poweroff and not init that runs rc.shutdown.

I successfully able to reboot or shutdown on full sysvinit. I made some modifications on rc.shutdown with the help of some code from sysvinit's boot script


Re: Puppy in full sysvinit

Posted: Sun Nov 05, 2023 12:24 pm
by gyrog

@mistfire,
Was it a Puppy full install or frugal install?


Re: Puppy in full sysvinit

Posted: Sun Nov 05, 2023 9:16 pm
by mistfire
gyrog wrote: Sun Nov 05, 2023 12:24 pm

@mistfire,
Was it a Puppy full install or frugal install?

Puppy frugal install.


Re: Puppy in full sysvinit

Posted: Mon Nov 06, 2023 12:07 pm
by gyrog
mistfire wrote: Sun Nov 05, 2023 9:16 pm

Puppy frugal install.

Was the union/stack filesystem present in all run-levels?
(Was the 'init' script run right at the begining?)

I had a crazy idea that it might be possible to run a frugal install with the union/stack filesystem as / in only run-level 2,
all other run-levels run in the "initrd" environment.
i.e. the 'switch-root' at the end of the 'init' script is replaced with sysvinit switching to run-level 2.
Then sysvinit switching to run-level 0 would exit from the union/stack filesystem being /.


Re: Puppy in full sysvinit

Posted: Mon Nov 06, 2023 2:04 pm
by mistfire
gyrog wrote: Mon Nov 06, 2023 12:07 pm

Was the union/stack filesystem present in all run-levels?
(Was the 'init' script run right at the begining?)

1. Yes it is, since you create a stack filesystem then switch_root to stack filesystem as root filesystem.
2. Yes it was puppy init script that was called from switch_root then call sysvinit from puppy init script

I didn't try runlevel 2 yet, only runlevel 3 and 5 only. My latest QuickPup64 release was using full sysvinit as init system. You can play around it with your crazy idea on sysvinit


Re: Puppy in full sysvinit

Posted: Mon Nov 06, 2023 2:39 pm
by gyrog

@mistfire, thanks for responding.

The actual runlevel numbers are not important to me at this time.
The crazy idea was to run with the stack filesystem as / in only a single runlevel.
I think I'll leave it for now.

But here's another idea that maybe isn't quite so crazy.
Tie the pupmode to a particular runlevel.
So there would be a runlevel associated with pupmode 12,
and if you wanted to do a backup, you could switch to the runlevel asociated with pupmode 5.
It would certainly make more sense if users coould choose pupmode 13 by booting to a specific runlevel,
rather than booting with "pmedia=ataflash" instead of "pmedia=atahd".