Dracut

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Reporting Problems)
(Reporting Problems)
Line 57: Line 57:
 
== Reporting Problems ==
 
== Reporting Problems ==
  
Before filing a bug, please read up on [[Dracut/Debugging| Debugging]], which will tell you how to fill out useful bug reports that will help us quickly solve your problem.  Also take a lookt at [https://admin.fedoraproject.org/pkgdb/packages/bugs/dracut| Dracut] or try searching bugzilla for other reports about your problem, as some bugs are often filed by several people.
+
Before filing a bug, please read up on [[Dracut/Debugging| Debugging]], which will tell you how to fill out useful bug reports that will help us quickly solve your problem.  Also take a lookt at [https://admin.fedoraproject.org/pkgdb/packages/bugs/dracut Dracut] or try searching [http://bugzilla.redhat.com Bugzilla]for other reports about your problem, as some bugs are often filed by several people.
  
 
== Dracut Team ==
 
== Dracut Team ==
  
 
In alphabetical order, the following people are the anaconda team and are responsible for the majority of commits. Of course, we get help from other people both from Red Hat and from the volunteer community as well.
 
In alphabetical order, the following people are the anaconda team and are responsible for the majority of commits. Of course, we get help from other people both from Red Hat and from the volunteer community as well.

Revision as of 17:13, 2 July 2009

Contents

Dracut

Dracut is a new initramfs infrastructure.

Information about the initial goals and aims can be found at Initrdrewrite

Unlike existing initramfs's, this is an attempt at having as little as possible hard-coded into the initramfs as possible. The initramfs has (basically) one purpose in life -- getting the rootfs mounted so that we can transition to the real rootfs. This is all driven off of device availability. Therefore, instead of scripts hard-coded to do various things, we depend on udev to create device nodes for us and then when we have the rootfs's device node, we mount and carry on. This helps to keep the time required in the initramfs as little as possible so that things like a 5 second boot aren't made impossible as a result of the very existence of an initramfs. It's likely that we'll grow some hooks for running arbitrary commands in the flow of the script, but it's worth trying to resist the urge as much as we can as hooks are guaranteed to be the path to slow-down.

Most of the initrd generation functionality in dracut is provided by a bunch of generator modules that are sourced by the main dracut script to install specific functionality into the initrd. They live in the modules subdirectory, and use functionality provided by dracut-functions to do their work. Some general rules for writing modules:

  • Use one of the inst family of functions to actually install files on to the initrd. They handle mangling the pathnames and (for binaries, scripts, and kernel modules) installing dependencies as appropriate so you do not have to.
  • Scripts that end up on the initrd should be POSIX compliant. dracut will try to use /bin/dash as /bin/sh for the initrd if it is available, so you should install it on your system -- dash aims for strict POSIX compliance to the extent possible.
  • Hooks MUST be POSIX compliant -- they are sourced by the init script, and having a bashism break your user's ability to boot really sucks.
  • Generator modules should have a two digit numeric prefix -- they run in ascending sort order. Anything in the 90-99 range is stuff that dracut relies on, so try not to break those hooks.
  • Generator modules and hooks must have a .sh extension.
  • We have some breakpoints for debugging your hooks. If you pass 'break' as a kernel parameter, the initramfs will drop to a shell just before switching to a new root. You can pass 'break=hookpoint', and the initramfs will break just before hooks in that hookpoint run.

Also, there is an attempt to keep things as distribution-agnostic as possible. Every distribution has their own tool here and it's not something which is really interesting to have separate across them. So contributions to help decrease the distro-dependencies are welcome.

Communicate

Please read the mailing list guidelines before communicating on the list. See also How to use IRC if the IRC links don't work, or if you need more information.

Participate

  1. FIXME

Dracut is primarily written in .... If you want to work on Dracut, you should start with ...

Getting the Source

The primary methods of distributing the Dracut source are source RPMs in the Fedora development tree and git. To access the current source code in in non-rpm format, you'll need to install git.

yum install git

Note that several related packages will be installed as well. After the git source code management tool has been installed, then you use anonymous git access to the Dracut repository.

git clone git://dracut.git.sourceforge.net/gitroot/dracut #FIXME

If you have committer access to Dracut, then you will want to use the git+ssh access url. #FIXME

git clone git+ssh://dracut.git.sourceforge.net/gitroot/dracut #FIXME
git clone git://dracut.git.sourceforge.net/gitroot/dracut #FIXME

Once you've committed changes locally, you can push them with

git push

If you would just like to browse the Dracut git repository via the web, then please use one of the following Dracut git URLs .

Summary Shortlog Log Commit CommitDiff

Reporting Problems

Before filing a bug, please read up on Debugging, which will tell you how to fill out useful bug reports that will help us quickly solve your problem. Also take a lookt at Dracut or try searching Bugzillafor other reports about your problem, as some bugs are often filed by several people.

Dracut Team

In alphabetical order, the following people are the anaconda team and are responsible for the majority of commits. Of course, we get help from other people both from Red Hat and from the volunteer community as well.