leahneukirchen / ignite Goto Github PK
View Code? Open in Web Editor NEWOBSOLETE: use Void Linux
License: Other
OBSOLETE: use Void Linux
License: Other
= Ignite, a simple and robust init replacement ignite is a set of scripts to boot Arch Linux using runit for service supervision. == Benefits Robust, proven software: ignite is based on runit (which has been in development since 2001), a high quality implementation of ideas dating back to 1997 and earlier. Simple configuration: ignite allows you to configure Arch using /etc/rc.conf, like back in the old days. Low overhead: runit-run is a tiny, statically linked binary that only does the absolutely essential things. Non-intrusive: ignite wont replace your cron, getty or syslog-ng. You are still free to do that yourself, if you want to. Portability: the scripts can be easily adapted to other Linux distribution, or even other unixish operating systems. Full control: ignite will never start anything you didn't tell it about. ignite also supports read-only root file systems. == Setup READ THIS CAREFULLY OR YOUR SYSTEM WILL NOT BOOT SUCCESSFULLY. If you booted with sysvinit, make a copy of /usr/bin/init to /usr/bin/init.sysv, else you cannot reboot cleanly. Install runit-musl and ignite-git from AUR. Ensure that you have at least one agetty-tty1 process in DAEMONS. Note that services mentioned in /etc/inittab will not be picked up anymore. You can reboot with "init.sysv 6" after installation if you booted with sysvinit. == Configuration ignite is configured using /etc/rc.conf and respects these variables: HARDWARECLOCK=UTC|local TIMEZONE= KEYMAP= CONSOLEFONT= CONSOLEMAP= MODULES=() # prefix ! is not supported USEDMRAID=no|yes USEBTRFS=no|yes USELVM=no|yes HOSTNAME= # or use /etc/hostname DAEMONS=(alsa syslog-ng crond) # see below, prefix ! disables DAEMONS refer to service directories in /etc/sv. Other runlevels can be defined in /etc/rc.conf as well by setting $DAEMONS_foo to an array of services. You can boot these by adding runlevel=foo to the kernel command line. There is a predefined runlevel "single" which also can be triggered by appending "single", "1", "S", or "-s" to the kernel command line. It is predefined to only start sulogin on tty1, and takes extra precaution to allow the root filesystem to be (re-)mountable read-only. The "emergency" runlevel (or "-b") can be used to get a root shell in stage 2. You can change runlevels in the running system by executing "runsvchdir $runlevel". This will shut down all services that are not in the new runlevel, and start the missing ones. Services defined in both runlevels will keep running. == Additional Arch configuration points * If you use syslog-ng, ensure that you source from 'unix-dgram("/dev/log");' in /etc/syslog-ng/syslog-ng.conf. * Restore core dumps: remove /usr/lib/sysctl.d/coredump.conf * Revert network interface renaming: ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules * For NFS server support, you need: nfsd rpcbind rpc.idmapd rpc.mountd rpc.statd (and, if desired: rpc.gssd rpc.svcgssd) * For NFS client support, you need: rpcbind rpc.statd (and, if desired: rpc.gssd) * With xorg-server 1.16.0+, you may need a file /etc/X11/Xwrapper.config with following contents (also see Xorg.wrap(1)) needs_root_rights = yes allowed_users = anybody == How it works ignite uses runit, with "1 2 3"-scripts adapted from Arch initscripts 2012.05.1, back when they were plain bash scripts. The "1 2 3"- scripts are very straight forward, you can read them easily. Phase 1 configures the system initially. It can be interrupted at almost any time by pressing C-c, which will drop you into a sulogin, so you can change stuff. Upon exiting this emergency shell, booting resumes at that step. STDOUT and STDERR are logged into dmesg. In phase 2, $DAEMONS scripts are linked to /run/runit/runsvdir/*, and runsvchdir picks them up. You can fiddle around there yourself, but changes won't be persistent. Use plain "runsv /etc/sv/$DAEMON" if you just want to try a daemon and not permanently enable it. Use shutdown/halt/reboot to enter phase 3, which stops all services, unmounts everything and lets runit turn off/reboot the machine. == Limitations - No support for non-UTF8 environments - Only simple crypttab support (no 3rd and 4th column) - Some irrelevant features of shutdown/halt/reboot are not implemented == Copyright runit is BSD licensed. ignite is in the public domain. To the extent possible under law, the creator of this work has waived all copyright and related or neighboring rights to this work. http://creativecommons.org/publicdomain/zero/1.0/
Hi,
Have been messing with runit for a while and was thinking of bringing it too ArchBang as an alternative init system. Wondering what current state of development ignite is in and how much works. Basically need base + X and openbox window manager. Do you use systemds own udev or something else?
Mr Green
#! /bin/sh
exec /usr/bin/dnsmasq -k --user=dnsmasq
Timed shutdown creates /etc/nologin. This file should probably be removed when shutdown is cancelled.
Starting multiple instances of a daemon with different configs by running eg systemctl enable netcfg@wifi-uni
is one of the nice things about systemd.
This is tricky to get working in ignite because of the requirement that it works on read only roots.
Possible implementation:
/etc/runit/2:
...
case ${daemon:0:1} in
!) ;;
*)
[[ $daemon =~ ([^@]+@)([^@]+) ]]
if [ ${BASH_REMATCH[1]} ]; then
cp -r /etc/sv/${BASH_REMATCH[1]} $d/$daemon
ln -s /run/runit/supervise.$daemon $d/$daemon/supervise
echo -n "${BASH_REMATCH[2]}" > $d/$daemon/config
else
ln -s /etc/sv/$daemon $d
fi;;
esac
...
Example daemon:
/etc/sv/tincd@/run:
#! /bin/sh
PROFILE=`cat config`
exec /usr/bin/tincd -D -n $PROFILE
This is inconsistent with the rest of ignite - no supervise in /etc/sv/..., creating actual files in /run instead of symlinks
Plain archlinux + packer + ignite-git installation has no left-over /etc/udev/rules.d/70-persistent-net.rules and >udev-201 starts renaming the links to enp2s8.
/etc/sv/eth0 has to be edited and renamed to make this work.
TODO: revert that behaviour to old style. I look into [1].
Currently ignites halt,reboot,shutdown,poweroff clash with installed versions. This means package will fail to install under you remove them. Wondering if systemd-sysvcompat needs to be removed? (or added as 'conflicts' in PKGBUILD)
non-migrated systems lack rc.conf, and retrieving the README file from packer-tmp/website sucks.
Please install README to /usr/share/doc/... and backup+install /etc/rc.conf
One can use dhcpcd
to request and get a static ip.
A eth0-static
service would be nice to do that.
I have a branch where I tested such a service and works fine.
This would mean that some variables would need to be configured on /etc/rc.conf
.
I guess we'd need INTERFACE
(or unconditionally eth0
) ADDRESS
NETMASK
GATEWAY
BROADCAST
and NAMESERVER
(?) for such a simple configuration.
If not dhcpcd
, ip
could be used to achieve a static ip configuration, like:
ip link set dev "$INTERFACE" up &&
ip addr add "${ADDRESS}/${NETMASK}" broadcast "$BROADCAST" dev "$INTERFACE" &&
ip route add default via "$GATEWAY"
ofcourse ip
would exit once it's done its job, so it's not very suitable here,
but it can be used in /etc/rc.local
(for anyone wanting this if this is rejected).
So, that's the idea. I am not sure it's worth it.
Configuring in /etc/rc.local
should work fine too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.