]> git.ipfire.org Git - thirdparty/dracut.git/blame - README
move setting the "systemdutildir" variable before it's used
[thirdparty/dracut.git] / README
CommitLineData
600c8769 1dracut
1cdc7175 2------
e7f52635 3dracut is an event driven initramfs infrastructure.
1cdc7175 4
e7f52635
HH
5dracut (the tool) is used to create an initramfs image by copying tools
6and files from an installed system and combining it with the
7dracut framework, usually found in /usr/lib/dracut/modules.d.
7de1a73d 8
78ad9ceb
JK
9Unlike existing initramfs's, this is an attempt at having as little as
10possible hard-coded into the initramfs as possible. The initramfs has
11(basically) one purpose in life -- getting the rootfs mounted so that
12we can transition to the real rootfs. This is all driven off of
13device availability. Therefore, instead of scripts hard-coded to do
14various things, we depend on udev to create device nodes for us and
15then when we have the rootfs's device node, we mount and carry on.
16This helps to keep the time required in the initramfs as little as
17possible so that things like a 5 second boot aren't made impossible as
18a result of the very existence of an initramfs. It's likely that
19we'll grow some hooks for running arbitrary commands in the flow of
20the script, but it's worth trying to resist the urge as much as we can
21as hooks are guaranteed to be the path to slow-down.
22
c09a9932 23Most of the initramfs generation functionality in dracut is provided by a bunch
c968efbb 24of generator modules that are sourced by the main dracut script to install
c09a9932 25specific functionality into the initramfs. They live in the modules.d
3b403b32 26subdirectory, and use functionality provided by dracut-functions to do their
8d04a128
VL
27work.
28
c968efbb
VL
29Some general rules for writing modules:
30 * Use one of the inst family of functions to actually install files
c09a9932 31 on to the initramfs. They handle mangling the pathnames and (for binaries,
c968efbb
VL
32 scripts, and kernel modules) installing dependencies as appropriate so
33 you do not have to.
c09a9932
HH
34 * Scripts that end up on the initramfs should be POSIX compliant. dracut
35 will try to use /bin/dash as /bin/sh for the initramfs if it is available,
c968efbb
VL
36 so you should install it on your system -- dash aims for strict POSIX
37 compliance to the extent possible.
38 * Hooks MUST be POSIX compliant -- they are sourced by the init script,
39 and having a bashism break your user's ability to boot really sucks.
40 * Generator modules should have a two digit numeric prefix -- they run in
41 ascending sort order. Anything in the 90-99 range is stuff that dracut
42 relies on, so try not to break those hooks.
06896cd8
VL
43 * Hooks must have a .sh extension.
44 * Generator modules are described in more detail in README.modules.
41271304 45 * We have some breakpoints for debugging your hooks. If you pass 'rdbreak'
0ac9584d 46 as a kernel parameter, the initramfs will drop to a shell just before
41271304 47 switching to a new root. You can pass 'rdbreak=hookpoint', and the initramfs
3b403b32 48 will break just before hooks in that hookpoint run.
c968efbb 49
78ad9ceb
JK
50Also, there is an attempt to keep things as distribution-agnostic as
51possible. Every distribution has their own tool here and it's not
52something which is really interesting to have separate across them.
53So contributions to help decrease the distro-dependencies are welcome.
54
e7f52635 55Currently dracut lives on github.com and kernel.org.
f24e31c2 56
02791110
HH
57The tarballs can be found here:
58 http://www.kernel.org/pub/linux/utils/boot/dracut/
59 ftp://ftp.kernel.org/pub/linux/utils/boot/dracut/
60
61Git:
62 git://git.kernel.org/pub/scm/boot/dracut/dracut.git
63 http://git.kernel.org/pub/scm/boot/dracut/dracut.git
64 https://git.kernel.org/pub/scm/boot/dracut/dracut.git
f24e31c2 65
ec44ed1d 66 git@github.com:dracutdevs/dracut.git
803be5aa 67
02791110 68Git Web:
ec44ed1d 69 https://github.com/dracutdevs/dracut.git
803be5aa 70
e7f52635 71 http://git.kernel.org/?p=boot/dracut/dracut.git
02791110 72
e7f52635 73Project Documentation:
02791110 74 http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
f24e31c2 75
02791110
HH
76Project Wiki:
77 http://dracut.wiki.kernel.org
f24e31c2 78
02791110
HH
79See the TODO file for things which still need to be done and HACKING for
80some instructions on how to get started. There is also a mailing list
81that is being used for the discussion -- initramfs@vger.kernel.org.
82It is a typical vger list, send mail to majordomo@vger.kernel.org with body
3b403b32 83of 'subscribe initramfs email@host.com'
7de1a73d
JK
84
85
a5e56335 86Licensed under the GPLv2