spark - init system

Forum rules
General talk about software - if the program is not in the repos, please links to the developer's page or github.
pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

spark - init system

Unread post by pidsley » Tue Jun 10, 2014 10:30 pm

Once you get sinit working, you can use the same rc script for spark. I like this one; its developer says
A simple init. This is what you get from telling me that I can't use an init written in bash.

The init itself is dumb as bricks.
Outline, as for sinit (please don't try this before you get that one working):

1. Get the spark script from here: https://github.com/fbt/spark/blob/master/bin/spark-init
2. Put it in sbin, and modify the first few lines to use your sinitrc script:

Code: Select all

cfg_init_cmd='/sbin/sinitrc init'
cfg_reboot_cmd='/sbin/sinitrc reboot'
cfg_poweroff_cmd='/sbin/sinitrc poweroff'
3. Make sure the script is executable.
4. Modify the GRUB kernel boot line to include "init=/sbin/spark" or symlink /sbin/spark to /sbin/init.
5. Reboot, sacrifice a goat and pray.

I have this working, but not well. tty1 does not work (but tty2 does) -- I think it has something to do with the respawn script and possibly permissions, but I just haven't figured it out yet. In any event it is an interesting experiment in just how minimal an init can be. If you try this, please post your results.

Image

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: spark - init system

Unread post by pidsley » Thu Jun 12, 2014 1:01 am

pidsley wrote an init. It's called "ember" because it's a dull spark. All it does is run the minirc script and then wait until you reboot or shutdown.

Image

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: spark - init system

Unread post by wuxmedia » Thu Jun 12, 2014 7:21 am

Wow, neat work.
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: spark - init system

Unread post by rhowaldt » Thu Jun 12, 2014 8:26 am

hey, cool, you're really getting into this shit pidsley, i like it :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: spark - init system

Unread post by pidsley » Thu Jun 12, 2014 9:10 am

ember and mdev on the Celeron box; sub 17M

Image

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: spark - init system

Unread post by GekkoP » Thu Jun 12, 2014 9:16 am

^ dear me, superb! :)

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: spark - init system

Unread post by machinebacon » Thu Jun 12, 2014 10:28 am

Dear Jesus.

Pidsley, if you'd be my son I'd be proud of you. But like it is now, I can just say you are a freaking genius :D
..gnutella..

anticapitalista
Honorary Member
Posts: 70
Joined: Fri Feb 28, 2014 5:12 pm

Re: spark - init system

Unread post by anticapitalista » Thu Jun 12, 2014 11:58 am

Pidsley is not my son either, but he is a freaking genius.

I wish I had more time to play with it all on antiX.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: spark - init system

Unread post by dkeg » Thu Jun 12, 2014 12:10 pm

Excellent! That is a great accomplishment Pids. Great work!

Work hard; Complain less

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: spark - init system

Unread post by pidsley » Fri Jun 13, 2014 12:11 am

Thanks guys. I really just study and learn from what other people have already done. There is still so very much I don't know or understand. That's what makes this hobby so much fun (at least for me) -- once I learn one thing, it opens up a bunch of new things I don't know about.

User avatar
Alad
should take a shower
Posts: 447
Joined: Wed May 21, 2014 12:52 am

Re: spark - init system

Unread post by Alad » Fri Jun 13, 2014 1:13 am

Very curious how far you'll be able to slim down on memory use (especially since I have an old m68k with 8 MB RAM that wants to run *nix one day).

r_c mentioned TinyX the other day - have you tried that, or are you using it already?
It's funny how we used to be able to do real stuff with rudimentary computers, but now we can't. -- ratcheer

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: spark - init system

Unread post by pidsley » Fri Jun 13, 2014 1:36 am

I have not (yet) tried TinyX -- have you tried TinyCore Linux? They use busybox, and I assume they are using TinyX. They claim they can run in 46M memory, but no less. http://www.tinycorelinux.net/faq.html#req

8 Mb might be a bit of a stretch (understatement) if you want to do anything useful -- these tests are all just experiments, and show memory used at startup without anything but a single terminal running. Any way you can add more memory to that box? Sorry to say that running Linux on it might be impossible, and doing anything useful on it will almost certainly be a large challenge. But please do post if you get something working.

There are many older boxes with P4 processors and 1 or 2 G memory available, some of them just for the taking from people who think they are useless. Additional DDR memory for these older boxes is also cheap.

There is also this: http://www.linux-m68k.org/ but I have not investigated further. I did learn 6809 assembler at one point in the distant past. ;)

User avatar
Alad
should take a shower
Posts: 447
Joined: Wed May 21, 2014 12:52 am

Re: spark - init system

Unread post by Alad » Fri Jun 13, 2014 2:20 am

http://en.wikipedia.org/wiki/Macintosh_Quadra_660AV

Apparently you can extend it to 68M (if the parts are still available); I'll look at TinyCore and linux/m68k, thanks. NetBSD/m68k might also be interesting.

It's true, cheap 2nd-hand builds are aplenty.. but I'm nostalgic - it's hard to believe current Macs are (literally) glued together when the early models had maintenance comparable to a server. And extra beard points, of course. :)
It's funny how we used to be able to do real stuff with rudimentary computers, but now we can't. -- ratcheer

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: spark - init system

Unread post by GekkoP » Fri Jun 13, 2014 11:03 am

Couldn't resist, I tried this one too.

Image

tty1 isn't working well, but I switched to tty2 and startx went fine. Waiting for ember, now :)

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: spark - init system

Unread post by GekkoP » Sat Jun 14, 2014 7:54 am

Here we go with ember.
(I know my scrots all look the same, but I'm too happy about the init systems to tweak the wallpaper and the colors)
ember.png
Thank you Pidsley for creating this little thing. You say it is dull, I say I love its simplicity. :)

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: spark - init system

Unread post by pidsley » Sat Jun 14, 2014 8:16 am

Thanks for testing, GekkoP! If you can make this work, you can do anything.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: spark - init system

Unread post by GekkoP » Sat Jun 14, 2014 8:41 am

^ It really is great going this deep into the configuration of my system. Learning what services I need, what it takes to activate them. Of course tinkering with the RAM usage is fun, but the real treat here is understanding more and more about what is running on my PC.
So again, thanks for the project ;)

User avatar
fbt
Saltimbocca-Roller
Posts: 10
Joined: Mon Jul 07, 2014 9:36 pm
Location: Moscow
Contact:

Re: spark - init system

Unread post by fbt » Sat Jul 19, 2014 3:24 am

fbt here (spark author).

Dropping by to say that even I don't use spark anymore. It was a fun little project, but sinit is better if just for being C instead of BASH.

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: spark - init system

Unread post by rhowaldt » Sat Jul 19, 2014 5:00 pm

^ hahaha :D
well, you will find there are people here who simply enjoy trying it out, not using it per se. at least i suppose that was pidsley intent.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
Alad
should take a shower
Posts: 447
Joined: Wed May 21, 2014 12:52 am

Re: spark - init system

Unread post by Alad » Mon Jul 21, 2014 1:30 pm

I have this working, but not well. tty1 does not work (but tty2 does) -- I think it has something to do with the respawn script and possibly permissions, but I just haven't figured it out yet.
If you check rc.conf you see this:

Code: Select all

cfg_services+=( agetty-tty{2..6} ) # Comment this if your init starts something on the ttys itself
You could change to agetty-tty{1..6}, but haven't tried that yet. :)
It's funny how we used to be able to do real stuff with rudimentary computers, but now we can't. -- ratcheer

Post Reply