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