Skip to content

leahneukirchen/ignite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

= 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/