Skip to content

f0ff886f/ignite

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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.

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.

Reboot with "init.sysv 6" after installation if you booted with sysvinit.

I recommend putting this line in /etc/pacman.conf to prevent sysvinit
from overwriting runit-init:

  NoUpgrade = sbin/init

== 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 are checked against service directories in /etc/sv.  If they
exist, they are started, else "/etc/rc.d/$DAEMON start" is run (for
one-shot things).

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.

* Keep sysvinit and sysvinit-tools installed, halt/reboot/shutdown
  will keep working, the warning about /dev/initctl can be ignored.

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

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,
runs the "/etc/rc.d/$DAEMON stop" actions when needed, unmounts
everything and lets runit turn off/reboot the machine.

== Limitations

- No support for non-UTF8 environments
- No crypttab support (add luksOpen/luksClose manually for now)

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

About

a simple and robust init replacement

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 97.5%
  • C 1.3%
  • Racket 1.2%