diff -Nru dracut-020/.gitignore dracut-027/.gitignore --- dracut-020/.gitignore 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/.gitignore 2013-03-27 12:41:41.000000000 +0000 @@ -1,3 +1,4 @@ +/Makefile.inc /dracut.8 /dracut-catimages.8 /dracut.conf.5 @@ -11,3 +12,4 @@ /.buildpath /.project /dracut-version.sh +/install/dracut-install diff -Nru dracut-020/50-dracut.install dracut-027/50-dracut.install --- dracut-020/50-dracut.install 1970-01-01 00:00:00.000000000 +0000 +++ dracut-027/50-dracut.install 2013-03-27 12:41:41.000000000 +0000 @@ -0,0 +1,33 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +if [[ -f /etc/kernel/cmdline ]]; then + readarray -t BOOT_OPTIONS < /etc/kernel/cmdline +fi + +if ! [[ "${BOOT_OPTIONS[@]}" ]]; then + readarray -t BOOT_OPTIONS < /proc/cmdline +fi + +unset noimageifnotneeded + +for ((i=0; i < "${#BOOT_OPTIONS[@]}"; i++)); do + if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then + noimageifnotneeded="yes" + break + fi +done + +ret=0 +case "$1" in + add) + dracut ${noimageifnotneeded+--noimageifnotneeded} "$3"/initrd "$2" + ret=$? + ;; + remove) + rm -f "$3"/initrd + ret=$? + ;; +esac +exit $ret diff -Nru dracut-020/51-dracut-rescue-postinst.sh dracut-027/51-dracut-rescue-postinst.sh --- dracut-020/51-dracut-rescue-postinst.sh 1970-01-01 00:00:00.000000000 +0000 +++ dracut-027/51-dracut-rescue-postinst.sh 2013-03-27 12:41:41.000000000 +0000 @@ -0,0 +1,70 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +export LANG=C + +KERNEL_VERSION="$1" +KERNEL_IMAGE="$2" + +[[ -f /etc/os-release ]] && . /etc/os-release + +if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then + systemd-machine-id-setup +fi + +[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id + +[[ $MACHINE_ID ]] || exit 1 +[[ -f $KERNEL_IMAGE ]] || exit 1 + +INITRDFILE="/boot/initramfs-0-rescue-${MACHINE_ID}.img" +NEW_KERNEL_IMAGE="${KERNEL_IMAGE%/*}/vmlinuz-0-rescue-${MACHINE_ID}" + +[[ -f $INITRDFILE ]] && [[ -f $NEW_KERNEL_IMAGE ]] && exit 0 + +dropindirs_sort() +{ + suffix=$1; shift + args=("$@") + files=$( + while (( $# > 0 )); do + for i in ${1}/*${suffix}; do + [[ -f $i ]] && echo ${i##*/} + done + shift + done | sort -Vu + ) + + for f in $files; do + for d in "${args[@]}"; do + if [[ -f "$d/$f" ]]; then + echo "$d/$f" + continue 2 + fi + done + done +} + +# source our config dir +for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do + [[ -e $f ]] && . "$f" +done + +[[ $dracut_rescue_image != "yes" ]] && exit 0 + +if [[ ! -f $INITRDFILE ]]; then + dracut --no-hostonly -a "rescue" "$INITRDFILE" "$KERNEL_VERSION" + ((ret+=$?)) +fi + +if [[ ! -f $NEW_KERNEL_IMAGE ]]; then + cp "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE" + ((ret+=$?)) +fi + +new-kernel-pkg --install "$KERNEL_VERSION" --kernel-image "$NEW_KERNEL_IMAGE" --initrdfile "$INITRDFILE" --banner "$NAME $VERSION_ID Rescue $MACHINE_ID" + +((ret+=$?)) + +exit $ret diff -Nru dracut-020/51-dracut-rescue.install dracut-027/51-dracut-rescue.install --- dracut-020/51-dracut-rescue.install 1970-01-01 00:00:00.000000000 +0000 +++ dracut-027/51-dracut-rescue.install 2013-03-27 12:41:41.000000000 +0000 @@ -0,0 +1,101 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +export LANG=C + +COMMAND="$1" +KERNEL_VERSION="$2" + +dropindirs_sort() +{ + suffix=$1; shift + args=("$@") + files=$( + while (( $# > 0 )); do + for i in ${1}/*${suffix}; do + [[ -f $i ]] && echo ${i##*/} + done + shift + done | sort -Vu + ) + + for f in $files; do + for d in "${args[@]}"; do + if [[ -f "$d/$f" ]]; then + echo "$d/$f" + continue 2 + fi + done + done +} + +[[ -f /etc/os-release ]] && . /etc/os-release + +if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then + systemd-machine-id-setup +fi + +[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id + +if [[ -f /etc/kernel/cmdline ]]; then + readarray -t BOOT_OPTIONS < /etc/kernel/cmdline +fi +if ! [[ "${BOOT_OPTIONS[@]}" ]]; then + readarray -t BOOT_OPTIONS < /proc/cmdline +fi +if ! [[ $BOOT_OPTIONS ]]; then + exit 1 +fi + +LOADER_ENTRY="/boot/loader/entries/${MACHINE_ID}-0-rescue.conf" +BOOT_DIR="/${MACHINE_ID}/0-rescue" +BOOT_DIR_ABS="/boot${BOOT_DIR}" + +ret=0 + +case "$COMMAND" in + add) + for i in "/boot/loader/entries/${MACHINE_ID}-0-rescue.conf"; do + [[ -f $i ]] && exit 0 + done + + # source our config dir + for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do + [[ -e $f ]] && . "$f" + done + + [[ $dracut_rescue_image != "yes" ]] && exit 0 + + [[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS" + + if ! cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then + echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'!" >&2 + fi + + dracut --no-hostonly -a "rescue" "$BOOT_DIR_ABS"/initrd "$2" + ((ret+=$?)) + + { + echo "title $PRETTY_NAME - Rescue Image" + echo "version $KERNEL_VERSION" + echo "machine-id $MACHINE_ID" + echo "options ${BOOT_OPTIONS[@]} rd.auto=1" + echo "linux $BOOT_DIR/linux" + echo "initrd $BOOT_DIR/initrd" + } > $LOADER_ENTRY + ((ret+=$?)) + ;; + + remove) + exit 0 + ;; + + *) + usage + ret=1;; +esac + +((ret+=$?)) + +exit $ret diff -Nru dracut-020/AUTHORS dracut-027/AUTHORS --- dracut-020/AUTHORS 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/AUTHORS 2013-03-27 12:41:41.000000000 +0000 @@ -1,67 +1,87 @@ Harald Hoyer Victor Lowther +Amadeusz Żołnowski Philippe Seewer Warren Togami -Amadeusz Żołnowski +Will Woods Jeremy Katz David Dillow -Will Woods Michal Soltys -Dave Young Amerigo Wang -Andrey Borzenkov +Dave Young Colin Guthrie +Andrey Borzenkov Andreas Thienemann Hans de Goede Peter Jones John Reiser Luca Berra Daniel Drake +Leho Kraav +Brian C. Lane Marc Grimme +Chao Wang Dan Horák +Jesse Keating +Milan Broz Roberto Sassu +dyoung@redhat.com Anton Blanchard Bill Nottingham -Brian C. Lane David Cantrell +Frederic Crozat +Jon Ander Hernandez +Juan RP Lance Albertson Marian Ganisin Michael Ploujnikov +Peter Rajnoha Alan Jenkins Alan Pevec +Colin Walters +Dennis Gilmore Ian Dall James Buren Joey Boggs -Jon Ander Hernandez Mike Snitzer -Peter Rajnoha Przemysław Rudy +Thomas Lange +Vivek Goyal Vladislav Bogdanov +Wim Muskee Alexander Todorov Andy Lutomirski Anssi Hannula +Canek Peláez Valdés +Chris Leech Christian Heinz Dave Jones Duane Griffin Frederic Crozat +Frederick Grose Glen Gray Hermann Gausterer James Laska Jan Stodola Konrad Rzeszutek Wilk -Leho Kraav +Lennert Buytenhek Lubomir Rintel Matt Matt Smith Michal Schmidt +Mike Gorse Munehiro Matsuda +Nikoli +Olivier Blin Paolo Bonzini Peter Robinson Pádraig Brady Quentin Armitage +Radek Vykydal Sergey Fionov +Srinivasa T N +Stefan Reimer Thilo Bangert -Thomas Lange Tomasz Torcz Vadim Kuznetsov Ville Skyttä diff -Nru dracut-020/COPYING dracut-027/COPYING --- dracut-020/COPYING 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/COPYING 2013-03-27 12:41:41.000000000 +0000 @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,8 +55,8 @@ The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -110,7 +110,7 @@ License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -255,7 +255,7 @@ of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -277,9 +277,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programs + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -291,7 +291,7 @@ the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -303,16 +303,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -335,5 +335,5 @@ This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff -Nru dracut-020/Makefile dracut-027/Makefile --- dracut-020/Makefile 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/Makefile 2013-03-28 19:35:00.000000000 +0000 @@ -1,6 +1,8 @@ -VERSION=020 +VERSION=027 GITVERSION=$(shell [ -d .git ] && git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8) +-include Makefile.inc + prefix ?= /usr libdir ?= ${prefix}/lib datadir ?= ${prefix}/share @@ -8,18 +10,63 @@ sysconfdir ?= ${prefix}/etc bindir ?= ${prefix}/bin mandir ?= ${prefix}/share/man +CFLAGS ?= -O2 -g -Wall +CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 +bashcompletiondir ?= ${datadir}/bash-completion/completions + +man1pages = lsinitrd.1 + +man5pages = dracut.conf.5 + +man7pages = dracut.cmdline.7 \ + dracut.bootup.7 + +man8pages = dracut.8 \ + dracut-catimages.8 \ + mkinitrd.8 \ + modules.d/98systemd/dracut-cmdline.service.8 \ + modules.d/98systemd/dracut-initqueue.service.8 \ + modules.d/98systemd/dracut-mount.service.8 \ + modules.d/98systemd/dracut-pre-mount.service.8 \ + modules.d/98systemd/dracut-pre-pivot.service.8 \ + modules.d/98systemd/dracut-pre-trigger.service.8 \ + modules.d/98systemd/dracut-pre-udev.service.8 + +manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages) -manpages = dracut.8 dracut.cmdline.7 dracut.conf.5 dracut-catimages.8 .PHONY: install clean archive rpm testimage test all check AUTHORS doc -all: syncheck dracut-version.sh install/dracut-install +all: syncheck dracut-version.sh dracut-install + +DRACUT_INSTALL_OBJECTS = \ + install/dracut-install.o \ + install/hashmap.o\ + install/log.o \ + install/util.o + +# deps generated with gcc -MM +install/dracut-install.o: install/dracut-install.c install/log.h install/macro.h \ + install/hashmap.h install/util.h +install/hashmap.o: install/hashmap.c install/util.h install/macro.h install/log.h \ + install/hashmap.h +install/log.o: install/log.c install/log.h install/macro.h install/util.h +install/util.o: install/util.c install/util.h install/macro.h install/log.h -install/dracut-install: - $(MAKE) -C install dracut-install +install/dracut-install: $(DRACUT_INSTALL_OBJECTS) + +dracut-install: install/dracut-install + ln -fs $< $@ + +indent: + indent -i8 -nut -br -linux -l120 install/dracut-install.c doc: $(manpages) dracut.html +ifneq ($(enable_documentation),no) +all: doc +endif + %: %.xml xsltproc -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< @@ -29,52 +76,66 @@ dracut.html: dracut.asc $(manpages) asciidoc -a numbered -d book -b docbook -o dracut.xml dracut.asc xsltproc -o dracut.html --xinclude -nonet \ - --stringparam draft.mode yes \ --stringparam html.stylesheet \ - http://docs.redhat.com/docs/en-US/Common_Content/css/default.css \ + http://docs.fedoraproject.org/en-US/Common_Content/css/default.css \ http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl dracut.xml rm dracut.xml -install: doc dracut-version.sh +install: dracut-version.sh mkdir -p $(DESTDIR)$(pkglibdir) mkdir -p $(DESTDIR)$(bindir) mkdir -p $(DESTDIR)$(sysconfdir) mkdir -p $(DESTDIR)$(pkglibdir)/modules.d - mkdir -p $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7 $(DESTDIR)$(mandir)/man8 + mkdir -p $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7 $(DESTDIR)$(mandir)/man8 install -m 0755 dracut.sh $(DESTDIR)$(bindir)/dracut install -m 0755 dracut-catimages.sh $(DESTDIR)$(bindir)/dracut-catimages install -m 0755 mkinitrd-dracut.sh $(DESTDIR)$(bindir)/mkinitrd install -m 0755 lsinitrd.sh $(DESTDIR)$(bindir)/lsinitrd install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d + mkdir -p $(DESTDIR)$(pkglibdir)/dracut.conf.d install -m 0755 dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions.sh install -m 0755 dracut-version.sh $(DESTDIR)$(pkglibdir)/dracut-version.sh - ln -s dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions + ln -fs dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions install -m 0755 dracut-logger.sh $(DESTDIR)$(pkglibdir)/dracut-logger.sh install -m 0755 dracut-initramfs-restore.sh $(DESTDIR)$(pkglibdir)/dracut-initramfs-restore cp -arx modules.d $(DESTDIR)$(pkglibdir) - install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8/dracut.8 - install -m 0644 dracut-catimages.8 $(DESTDIR)$(mandir)/man8/dracut-catimages.8 - install -m 0644 dracut.conf.5 $(DESTDIR)$(mandir)/man5/dracut.conf.5 - install -m 0644 dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.cmdline.7 - ln -s dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7 +ifneq ($(enable_documentation),no) + for i in $(man1pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man1/$${i##*/}; done + for i in $(man5pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man5/$${i##*/}; done + for i in $(man7pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man7/$${i##*/}; done + for i in $(man8pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man8/$${i##*/}; done + ln -fs dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7 +endif if [ -n "$(systemdsystemunitdir)" ]; then \ mkdir -p $(DESTDIR)$(systemdsystemunitdir); \ - for i in \ - modules.d/98systemd/dracut-initqueue.service \ - modules.d/98systemd/dracut-pre-pivot.service \ - modules.d/98systemd/dracut-pre-trigger.service \ - modules.d/98systemd/dracut-pre-udev.service \ - modules.d/98systemd/initrd-switch-root.service \ - modules.d/98systemd/initrd-switch-root.target \ - dracut-shutdown.service; do \ - install -m 0644 $$i $(DESTDIR)$(systemdsystemunitdir); \ - done; \ + install -m 0644 dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir); \ mkdir -p $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants; \ ln -s ../dracut-shutdown.service \ $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \ + mkdir -p $(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants; \ + for i in \ + dracut-cmdline.service \ + dracut-initqueue.service \ + dracut-mount.service \ + dracut-pre-mount.service \ + dracut-pre-pivot.service \ + dracut-pre-trigger.service \ + dracut-pre-udev.service \ + ; do \ + install -m 0644 modules.d/98systemd/$$i $(DESTDIR)$(systemdsystemunitdir); \ + ln -s ../$$i \ + $(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants/$i; \ + done \ + fi + if [ -f install/dracut-install ]; then \ + install -m 0755 install/dracut-install $(DESTDIR)$(pkglibdir)/dracut-install; \ fi - $(MAKE) -C install install + mkdir -p $(DESTDIR)${prefix}/lib/kernel/install.d + install -m 0755 50-dracut.install $(DESTDIR)${prefix}/lib/kernel/install.d/50-dracut.install + install -m 0755 51-dracut-rescue.install $(DESTDIR)${prefix}/lib/kernel/install.d/51-dracut-rescue.install + mkdir -p $(DESTDIR)${bashcompletiondir} + install -m 0644 dracut-bash-completion.sh $(DESTDIR)${bashcompletiondir}/dracut dracut-version.sh: @echo "DRACUT_VERSION=$(VERSION)-$(GITVERSION)" > dracut-version.sh @@ -83,11 +144,12 @@ $(RM) *~ $(RM) */*~ $(RM) */*/*~ + $(RM) $(manpages:%=%.xml) dracut.xml $(RM) test-*.img $(RM) dracut-*.rpm dracut-*.tar.bz2 + $(RM) dracut-install install/dracut-install $(DRACUT_INSTALL_OBJECTS) $(RM) $(manpages) dracut.html $(MAKE) -C test clean - $(MAKE) -C install clean archive: dracut-$(VERSION)-$(GITVERSION).tar.bz2 @@ -105,7 +167,7 @@ rpm: dracut-$(VERSION).tar.bz2 rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \ cp dracut-$(VERSION).tar.bz2 "$$rpmbuild"; \ - LANG=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \ + LC_MESSAGES=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \ (cd "$$rpmbuild"; rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \ --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \ --define "_rpmdir $$PWD" -ba dracut.spec; ) && \ @@ -124,7 +186,8 @@ done;exit $$ret check: all syncheck - $(MAKE) -C test check + @[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; } + @$(MAKE) -C test check testimage: all ./dracut.sh -l -a debug -f test-$(shell uname -r).img $(shell uname -r) @@ -142,3 +205,10 @@ AUTHORS: git shortlog --numbered --summary -e |while read a rest; do echo $$rest;done > AUTHORS + +dracut.html.sign: dracut-$(VERSION).tar.bz2 + gpg-sign-all dracut-$(VERSION).tar.bz2 dracut.html + +upload: dracut.html.sign + kup put dracut-$(VERSION).tar.bz2 dracut-$(VERSION).tar.sign /pub/linux/utils/boot/dracut/ + kup put dracut.html dracut.html.sign /pub/linux/utils/boot/dracut/ diff -Nru dracut-020/NEWS dracut-027/NEWS --- dracut-020/NEWS 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/NEWS 2013-03-27 12:41:43.000000000 +0000 @@ -1,3 +1,131 @@ +dracut-027 +========== +- dracut now has bash-completion +- require bash version 4 +- systemd module now requires systemd >= 199 +- dracut makes use of native systemd initrd units +- added hooks for new-kernel-pkg and kernel-install +- hostonly is now default for fedora +- comply with the BootLoaderSpec paths + http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec +- added rescue module +- host_fs_types is now a hashmap +- new dracut argument "--regenerate-all" +- new dracut argument "--noimageifnotneeded" +- new man page dracut.bootup +- install all host filesystem drivers +- use -D_FILE_OFFSET_BITS=64 to build dracut-install + +dracut-026 +========== +- introduce /usr/lib/dracut/dracut.conf.d/ drop-in directory + + /usr/lib/dracut/dracut.conf.d/*.conf can be overwritten by the same + filenames in /etc/dracut.conf.d. + + Packages should use /usr/lib/dracut/dracut.conf.d rather than + /etc/dracut.conf.d for drop-in configuration files. + + /etc/dracut.conf and /etc/dracut.conf.d belong to the system administrator. + +- uses systemd-198 native initrd units +- totally rely on the fstab-generator in systemd mode for block devices +- dracut systemd now uses dracut.target rather than basic.target +- dracut systemd services optimize themselves away +- fixed hostonly parameter generation +- turn off curl globbing (fixes IPv6) +- modify the udev rules on install and not runtime time +- enable initramfs building without kernel modules (fixed regression) +- in the initqueue/timeout, + reset the main loop counter, as we see new udev events or initqueue/work +- fixed udev rule installation + +dracut-025 +========== +- do not strip signed kernel modules +- add sosreport script and generate /run/initramfs/sosreport.txt +- make short uuid specification for allow-discards work +- turn off RateLimit for the systemd journal +- fixed MAC address assignment +- add systemd checkisomd5 service +- splitout drm kernel modules from plymouth module +- add 'swapoff' to initramfs to fix shutdown/reboot +- add team device support +- add pre-shutdown hook +- kill all processes in shutdown and report remaining ones +- "--device" changed to "--add-device" and "add_device=" added for conf files +- add memory usage trace to different hook points +- cope with optional field #7 in /proc/self/mountinfo +- lots of small bugfixes + +dracut-024 +========== +- new dracut option "--device" +- new dracut kernel command line options "rd.auto" +- new dracut kernel command line options "rd.noverifyssl" +- new dracut option "--kernel-cmdline" and "kernel_cmdline" option for default parameters +- fixes for systemd and crypto +- fix for kexec in shutdown, if not included in initramfs +- create the initramfs non-world readable +- prelink/preunlink in the initramfs +- strip binaries in the initramfs by default now +- various FIPS fixes +- various dracut-install fixes + +dracut-023 +========== +- resume from hibernate fixes +- -N option for --no-hostonly +- support for systemd crypto handling +- new dracut module "crypt-loop" +- deprecate the old kernel command line options +- more documentation +- honor CFLAGS for dracut-install build +- multipath fixes +- / is mounted according to rootflags parameter but forced ro at first. + Later it is remounted according to /etc/fstab + rootflags parameter + and "ro"/"rw". +- support for xfs / reiserfs separate journal device +- new "ro_mnt" option to force ro mount of / and /usr +- root on cifs support +- dracut-install: fixed issue for /var/tmp containing a symlink +- only lazy resolve with ldd, if the /var/tmp partition is not mounted with "noexec" +- i18n: fixed inclusion of "include" keymaps + +dracut-022 +========== +- fixed host-only kernel module bug + +dracut-021 +========== +- fixed systemd in the initramfs (requires systemd >= 187) +- dracut-install: massive speedup with /var on the same filesystem with COW copy +- dracut-install: moved to /usr/lib/dracut until it becomes a general purpose tool +- new options: "rd.usrmount.ro" and "rd.skipfsck" +- less mount/umount +- apply "ro" on the kernel command line also to /usr +- mount according to fstab, if neither "ro" or "rw" is specified +- skip fsck for xfs and btrfs. remount is enough +- give emergency_shell if /usr mount failed +- dracut now uses getopt: + * options can be position independent now!! + * we can now use --option= +- added option "--kver=", and the image location can be omitted + # dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64 +- dracut.sh: for --include copy also the symbolic links +- man pages: lsinitrd and mkinitrd added +- network: We do not support renaming in the kernel namespace anymore (as udev does + that not anymore). So, if a user wants to use ifname, he has to rename + to a custom namespace. "eth[0-9]+" is not allowed anymore. !!!!! +- resume: moved the resume process to the initqueue. + This should prevent accidently mounting the root file system. +- testsuite: add support for: make V=1 TESTS="01 20 40" check + $ sudo make V=1 clean check + now runs the testsuite in verbose mode + + $ sudo make TESTS="01 20 40" clean check + now only runs the 01, 20 and 40 tests. + dracut-020 ========== - changed rd.dasd kernel parameter diff -Nru dracut-020/README dracut-027/README --- dracut-020/README 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/README 2013-03-27 12:41:41.000000000 +0000 @@ -1,6 +1,6 @@ -Dracut +dracut ------ -Dracut is a new initramfs infrastructure. +dracut is a new initramfs infrastructure. Information about the initial goals and aims can be found at https://fedoraproject.org/wiki/Initrdrewrite diff -Nru dracut-020/README.modules dracut-027/README.modules --- dracut-020/README.modules 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/README.modules 2013-03-27 12:41:41.000000000 +0000 @@ -1,5 +1,5 @@ Most of the functionality that dracut implements are actually implemented -by dracut modules. Dracut modules live in modules.d, and have the following +by dracut modules. dracut modules live in modules.d, and have the following structure: dracut_install_dir/modules.d/ @@ -38,7 +38,7 @@ check(): - Dracut calls this function to check and see if a module can be installed + dracut calls this function to check and see if a module can be installed on the initrd. When called without options, check should check to make sure that diff -Nru dracut-020/README.testsuite dracut-027/README.testsuite --- dracut-020/README.testsuite 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/README.testsuite 2013-03-27 12:41:41.000000000 +0000 @@ -7,5 +7,24 @@ nfs-utils netbsd-iscsi nbd -dhcp +dhcp (dhcp-server on openSUSE) iscsi-initiator-utils +TEST-04-FULL-SYSTEMD: systemd >= 187 + +How to run the testsuite: + +$ sudo make clean check + +in verbose mode: +$ sudo make V=1 clean check + +only specific test: +$ sudo make TESTS="01 20 40" clean check +only runs the 01, 20 and 40 tests. + +debug a specific test case: +$ cd TEST-01-BASIC +$ sudo make clean setup run +... change some kernel parameters ... +$ sudo make run +to run the test without doing the setup diff -Nru dracut-020/TODO dracut-027/TODO --- dracut-020/TODO 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/TODO 2013-03-27 12:41:41.000000000 +0000 @@ -6,22 +6,26 @@ INITRAMFS TODO -- fix btrfs subvolume mounting for /usr (fsck) +- use info and warn prefix - generate systemd unit dracut-initramfs-restore in /run/systemd dynamically - put "root=" parsing hooks in separate hook dir - call "root=" parsing hooks after getting new rootpath from dhcp -- put mount hook in main initqueue loop +- put mount hook in main initqueue loop / careful about resume! - the hard-coded list of udev rules that we care about is kind of lame. -- automatic kexec fallback - panic fallback +- bridging/bonding without "netroot=" https://bugzilla.redhat.com/show_bug.cgi?id=822750 +- progress indication for fsck https://bugzilla.redhat.com/show_bug.cgi?id=827118 +- domain, searchdomain https://bugzilla.redhat.com/show_bug.cgi?id=840778 +- disable write-ifcfg https://bugzilla.redhat.com/show_bug.cgi?id=840784 +- check for /var to be mounted in convertfs https://bugzilla.redhat.com/show_bug.cgi?id=848172 +- probably fix "--include" https://bugzilla.redhat.com/show_bug.cgi?id=849338 GENERATOR TODO +- add presets (predefined set of modules) - add interpreter/plugin-scripts to be sourced at the beginning or end (can use dracut-functions) -- provide "installkernel" and "new-kernel-pkg" - add mechanism for module specific command line options - pkg-config integration, to make it easy for other packages to use us. -- add recovery image creator (mkrecovery) - default module specification could use some work - udev rule copying, as mentioned above, is a bit too hard-coded @@ -33,5 +37,5 @@ Future Enhancement Requests - run ssh server to enter crypto password or perform debugging (supported by debian) -- https://bugzilla.redhat.com/show_bug.cgi?id=524727 - Dracut + encrypted root + networking +- https://bugzilla.redhat.com/show_bug.cgi?id=524727 - dracut + encrypted root + networking diff -Nru dracut-020/configure dracut-027/configure --- dracut-020/configure 1970-01-01 00:00:00.000000000 +0000 +++ dracut-027/configure 2013-03-27 12:41:41.000000000 +0000 @@ -0,0 +1,78 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +# We don't support srcdir != builddir +echo \#buildapi-variable-no-builddir >/dev/null + +prefix=/usr + +enable_documentation=yes + +# Little helper function for reading args from the commandline. +# it automatically handles -a b and -a=b variants, and returns 1 if +# we need to shift $3. +read_arg() { + # $1 = arg name + # $2 = arg value + # $3 = arg parameter + local rematch='^[^=]*=(.*)$' + if [[ $2 =~ $rematch ]]; then + read "$1" <<< "${BASH_REMATCH[1]}" + else + read "$1" <<< "$3" + # There is no way to shift our callers args, so + # return 1 to indicate they should do it instead. + return 1 + fi + return 0 +} + +while (($# > 0)); do + case "${1%%=*}" in + --prefix) read_arg prefix "$@" || shift;; + --libdir) read_arg libdir "$@" || shift;; + --datadir) read_arg datadir "$@" || shift;; + --sysconfdir) read_arg sysconfdir "$@" || shift;; + --sbindir) read_arg sbindir "$@" || shift;; + --mandir) read_arg mandir "$@" || shift;; + --disable-documentation) enable_documentation=no;; + --program-prefix) read_arg programprefix "$@" || shift;; + --exec-prefix) read_arg execprefix "$@" || shift;; + --bindir) read_arg bindir "$@" || shift;; + --includedir) read_arg includedir "$@" || shift;; + --libexecdir) read_arg libexecdir "$@" || shift;; + --localstatedir) read_arg localstatedir "$@" || shift;; + --sharedstatedir) read_arg sharedstatedir "$@" || shift;; + --infodir) read_arg infodir "$@" || shift;; + --systemdsystemunitdir) read_arg systemdsystemunitdir "$@" || shift;; + --bashcompletiondir) read_arg bashcompletiondir "$@" || shift;; + *) echo "Ignoring unknown option '$1'";; + esac + shift +done + +cat > Makefile.inc.$$ <> Makefile.inc.$$ + +mv Makefile.inc.$$ Makefile.inc diff -Nru dracut-020/debian/changelog dracut-027/debian/changelog --- dracut-020/debian/changelog 2012-11-08 13:52:36.000000000 +0000 +++ dracut-027/debian/changelog 2013-03-28 19:52:51.000000000 +0000 @@ -1,3 +1,20 @@ +dracut (027-1) unstable; urgency=low + + * new upstream + * update copyright information + + -- Thomas Lange Thu, 28 Mar 2013 20:52:50 +0100 + +dracut (026+71+g78d1d4f-1) unstable; urgency=low + + * new upstream 026+71+g78d1d4f + * add man pages + * add bash completions + * add cifs module to dracut-network + * cleanup patches + + -- Thomas Lange Mon, 25 Mar 2013 14:03:36 +0100 + dracut (020-2) unstable; urgency=low * use $kernel when calling modprobe: Closes: #685004 diff -Nru dracut-020/debian/copyright dracut-027/debian/copyright --- dracut-020/debian/copyright 2012-11-08 13:52:36.000000000 +0000 +++ dracut-027/debian/copyright 2013-03-28 19:42:07.000000000 +0000 @@ -1,6 +1,6 @@ -Format-Specification: http://dep.debian.net/deps/dep5/ -Name: dracut -Maintainer: Harald Hoyer +Format: Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: dracut +Upstream-contact: Harald Hoyer Source: http://www.kernel.org/pub/linux/utils/boot/dracut/ Copyright: 2009, Harald Hoyer @@ -11,9 +11,13 @@ License: GPL-2+ Files: debian/* -Copyright: 2011 Thomas Lange +Copyright: 2011-2013 Thomas Lange License: GPL-2+ +Files: install/hashmap.* install/log.* install/macro.h install/util.* +Copyright: 2010 Lennart Poettering +License: LGPL 2.1+ + License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public diff -Nru dracut-020/debian/dracut-network.install dracut-027/debian/dracut-network.install --- dracut-020/debian/dracut-network.install 2012-08-21 15:10:05.000000000 +0000 +++ dracut-027/debian/dracut-network.install 2013-03-28 19:42:07.000000000 +0000 @@ -1,9 +1,11 @@ modules.d/40network usr/lib/dracut/modules.d modules.d/45url-lib usr/lib/dracut/modules.d +modules.d/45ifcfg usr/lib/dracut/modules.d modules.d/80cms usr/lib/dracut/modules.d modules.d/90livenet usr/lib/dracut/modules.d modules.d/90aufs usr/lib/dracut/modules.d modules.d/90qemu-net usr/lib/dracut/modules.d +modules.d/95cifs usr/lib/dracut/modules.d modules.d/95znet usr/lib/dracut/modules.d modules.d/95zfcp usr/lib/dracut/modules.d modules.d/95fcoe usr/lib/dracut/modules.d diff -Nru dracut-020/debian/dracut.dirs dracut-027/debian/dracut.dirs --- dracut-020/debian/dracut.dirs 2012-08-21 15:10:05.000000000 +0000 +++ dracut-027/debian/dracut.dirs 2013-03-28 19:42:07.000000000 +0000 @@ -21,6 +21,7 @@ usr/lib/dracut/modules.d/99base /var/lib/dracut /etc/dracut.conf.d +/etc/bash_completion.d /etc/kernel/postinst.d /etc/kernel/postrm.d /etc/logrotate.d diff -Nru dracut-020/debian/dracut.install dracut-027/debian/dracut.install --- dracut-020/debian/dracut.install 2012-08-21 15:10:05.000000000 +0000 +++ dracut-027/debian/dracut.install 2013-03-28 19:42:07.000000000 +0000 @@ -5,7 +5,8 @@ usr/lib/dracut/dracut-logger.sh usr/lib/dracut/dracut-initramfs-restore usr/bin/lsinitrd -usr/etc/dracut.conf etc +usr/share/bash-completion/completions/dracut etc/bash_completion.d +etc/dracut.conf etc debian/kernel etc modules.d/00dash usr/lib/dracut/modules.d modules.d/01fips usr/lib/dracut/modules.d @@ -15,21 +16,22 @@ modules.d/10i18n usr/lib/dracut/modules.d modules.d/90btrfs usr/lib/dracut/modules.d modules.d/90crypt usr/lib/dracut/modules.d +modules.d/90dm usr/lib/dracut/modules.d modules.d/90dmraid usr/lib/dracut/modules.d modules.d/90dmsquash-live usr/lib/dracut/modules.d -modules.d/90dm usr/lib/dracut/modules.d modules.d/90kernel-modules usr/lib/dracut/modules.d modules.d/90lvm usr/lib/dracut/modules.d modules.d/90mdraid usr/lib/dracut/modules.d modules.d/90multipath usr/lib/dracut/modules.d modules.d/90qemu usr/lib/dracut/modules.d modules.d/91crypt-gpg usr/lib/dracut/modules.d -modules.d/95dasd_mod usr/lib/dracut/modules.d -modules.d/95dasd usr/lib/dracut/modules.d +modules.d/91crypt-loop usr/lib/dracut/modules.d modules.d/95debug usr/lib/dracut/modules.d -modules.d/95fstab-sys usr/lib/dracut/modules.d modules.d/95resume usr/lib/dracut/modules.d modules.d/95rootfs-block usr/lib/dracut/modules.d +modules.d/95dasd_mod usr/lib/dracut/modules.d +modules.d/95dasd usr/lib/dracut/modules.d +modules.d/95fstab-sys usr/lib/dracut/modules.d modules.d/95terminfo usr/lib/dracut/modules.d modules.d/95udev-rules usr/lib/dracut/modules.d modules.d/97biosdevname usr/lib/dracut/modules.d diff -Nru dracut-020/debian/dracut.manpages dracut-027/debian/dracut.manpages --- dracut-020/debian/dracut.manpages 2012-08-21 15:10:05.000000000 +0000 +++ dracut-027/debian/dracut.manpages 2013-03-28 19:42:07.000000000 +0000 @@ -2,3 +2,6 @@ dracut.conf.5 dracut.cmdline.7 dracut-catimages.8 +lsinitrd.1 +mkinitrd.8 + diff -Nru dracut-020/debian/patches/dev-shm-mount dracut-027/debian/patches/dev-shm-mount --- dracut-020/debian/patches/dev-shm-mount 2012-08-21 15:10:05.000000000 +0000 +++ dracut-027/debian/patches/dev-shm-mount 2013-03-28 19:42:07.000000000 +0000 @@ -1,8 +1,8 @@ Index: dracut/modules.d/99base/init.sh =================================================================== ---- dracut.orig/modules.d/99base/init.sh 2012-06-03 23:05:34.963039132 +0200 -+++ dracut/modules.d/99base/init.sh 2012-06-03 23:05:40.852039264 +0200 -@@ -55,11 +55,6 @@ +--- dracut.orig/modules.d/99base/init.sh 2013-03-27 13:41:43.000000000 +0100 ++++ dracut/modules.d/99base/init.sh 2013-03-28 19:36:07.063834041 +0100 +@@ -66,11 +66,6 @@ mount -t devpts -o gid=5,mode=620,noexec,nosuid devpts /dev/pts >/dev/null fi diff -Nru dracut-020/debian/patches/kernelversion dracut-027/debian/patches/kernelversion --- dracut-020/debian/patches/kernelversion 2012-11-07 16:54:41.000000000 +0000 +++ dracut-027/debian/patches/kernelversion 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -Index: dracut/dracut-functions.sh -=================================================================== ---- dracut.orig/dracut-functions.sh 2012-11-07 17:53:45.007521362 +0100 -+++ dracut/dracut-functions.sh 2012-11-07 17:54:32.271521410 +0100 -@@ -1182,7 +1182,7 @@ - local _moddirname=${srcmods%%/lib/modules/*} - - if [[ -f "$initdir/.kernelmodseen/lazylist" ]]; then -- xargs modprobe -a ${_moddirname+-d ${_moddirname}/} --ignore-install --show-depends \ -+ xargs modprobe -a ${_moddirname+-d ${_moddirname}/} --set-version $kernel --ignore-install --show-depends \ - < "$initdir/.kernelmodseen/lazylist" 2>/dev/null \ - | sort -u \ - | while read _cmd _modpath _options; do diff -Nru dracut-020/debian/patches/makefile dracut-027/debian/patches/makefile --- dracut-020/debian/patches/makefile 2012-08-21 15:10:05.000000000 +0000 +++ dracut-027/debian/patches/makefile 2013-03-28 19:42:07.000000000 +0000 @@ -1,32 +1,13 @@ Index: dracut/Makefile =================================================================== ---- dracut.orig/Makefile 2012-06-29 23:46:38.416153526 +0200 -+++ dracut/Makefile 2012-06-29 23:47:18.000564847 +0200 -@@ -13,10 +13,7 @@ +--- dracut.orig/Makefile 2013-02-01 15:23:16.072974664 +0100 ++++ dracut/Makefile 2013-02-06 16:41:34.089974388 +0100 +@@ -35,7 +35,7 @@ .PHONY: install clean archive rpm testimage test all check AUTHORS doc --all: syncheck dracut-version.sh install/dracut-install -- --install/dracut-install: -- $(MAKE) -C install dracut-install +-all: syncheck dracut-version.sh dracut-install +all: syncheck dracut-version.sh - doc: $(manpages) dracut.html - -@@ -74,7 +71,6 @@ - ln -s ../dracut-shutdown.service \ - $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \ - fi -- $(MAKE) -C install install - - dracut-version.sh: - @echo "DRACUT_VERSION=$(VERSION)-$(GITVERSION)" > dracut-version.sh -@@ -87,7 +83,6 @@ - $(RM) dracut-*.rpm dracut-*.tar.bz2 - $(RM) $(manpages) dracut.html - $(MAKE) -C test clean -- $(MAKE) -C install clean - - archive: dracut-$(VERSION)-$(GITVERSION).tar.bz2 - + DRACUT_INSTALL_OBJECTS = \ + install/dracut-install.o \ diff -Nru dracut-020/debian/patches/missing-rpc-user dracut-027/debian/patches/missing-rpc-user --- dracut-020/debian/patches/missing-rpc-user 2012-08-21 15:10:05.000000000 +0000 +++ dracut-027/debian/patches/missing-rpc-user 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -Index: dracut/modules.d/95nfs/module-setup.sh -=================================================================== ---- dracut.orig/modules.d/95nfs/module-setup.sh 2012-02-29 17:47:05.315375978 +0100 -+++ dracut/modules.d/95nfs/module-setup.sh 2012-02-29 17:47:10.679724167 +0100 -@@ -77,6 +77,5 @@ - # rpc user needs to be able to write to this directory to save the warmstart - # file - chmod 770 "$initdir/var/lib/rpcbind" -- chown rpc.rpc "$initdir/var/lib/rpcbind" - } - diff -Nru dracut-020/debian/patches/no-unimaps-directory dracut-027/debian/patches/no-unimaps-directory --- dracut-020/debian/patches/no-unimaps-directory 2012-08-21 15:10:05.000000000 +0000 +++ dracut-027/debian/patches/no-unimaps-directory 2013-03-28 19:42:07.000000000 +0000 @@ -1,11 +1,11 @@ Index: dracut/modules.d/10i18n/module-setup.sh =================================================================== ---- dracut.orig/modules.d/10i18n/module-setup.sh 2012-02-29 17:48:28.252374697 +0100 -+++ dracut/modules.d/10i18n/module-setup.sh 2012-02-29 17:48:35.183752498 +0100 +--- dracut.orig/modules.d/10i18n/module-setup.sh 2013-03-27 13:41:43.000000000 +0100 ++++ dracut/modules.d/10i18n/module-setup.sh 2013-03-28 19:36:46.123833771 +0100 @@ -13,7 +13,7 @@ install() { - [ -x /lib/systemd/systemd-vconsole-setup ] && dracut_install /lib/systemd/systemd-vconsole-setup + dracut_install -o $systemdutildir/systemd-vconsole-setup - KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps + KBDSUBDIRS=consolefonts,consoletrans,keymaps DEFAULT_FONT=LatArCyrHeb-16 diff -Nru dracut-020/debian/patches/roimage dracut-027/debian/patches/roimage --- dracut-020/debian/patches/roimage 2012-11-07 16:41:27.000000000 +0000 +++ dracut-027/debian/patches/roimage 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -Index: dracut-020/dracut.sh -=================================================================== ---- dracut-020.orig/dracut.sh 2012-06-29 12:54:38.000000000 +0200 -+++ dracut-020/dracut.sh 2012-11-04 18:47:30.000000000 +0100 -@@ -887,8 +887,9 @@ - dinfo "*** hardlinking files done ***" - } - -+rm -f "$outfile" - dinfo "*** Creating image file ***" --if ! ( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet| \ -+if ! ( umask 077; cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet| \ - $compress > "$outfile"; ); then - dfatal "dracut: creation of $outfile failed" - exit 1 diff -Nru dracut-020/debian/patches/series dracut-027/debian/patches/series --- dracut-020/debian/patches/series 2012-11-07 16:53:32.000000000 +0000 +++ dracut-027/debian/patches/series 2013-03-28 19:42:07.000000000 +0000 @@ -1,8 +1,5 @@ -kernelversion makefile nogroup dev-shm-mount no-unimaps-directory -missing-rpc-user aufs -roimage diff -Nru dracut-020/dracut-bash-completion.sh dracut-027/dracut-bash-completion.sh --- dracut-020/dracut-bash-completion.sh 1970-01-01 00:00:00.000000000 +0000 +++ dracut-027/dracut-bash-completion.sh 2013-03-27 12:41:41.000000000 +0000 @@ -0,0 +1,71 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh +# +# Copyright 2013 Red Hat, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +__contains_word () { + local word=$1; shift + for w in $*; do [[ $w = $word ]] && return 0; done + return 1 +} + +_dracut() { + local field_vals= cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} + local -A OPTS=( + [STANDALONE]='-f -v -q -l -H -h -M -N + --ro-mnt --force --kernel-only --no-kernel --strip --nostrip + --hardlink --nohardlink --noprefix --mdadmconf --nomdadmconf + --lvmconf --nolvmconf --debug --profile --verbose --quiet + --local --hostonly --no-hostonly --fstab --help --bzip2 --lzma + --xz --no-compress --gzip --list-modules --show-modules --keep + --printsize --regenerate-all --noimageifnotneeded' + + [ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers + --omit-drivers --modules --omit --drivers --filesystems --install + --fwdir --libdirs --fscks --add-fstab --mount --device --nofscks + --kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix + --kernel-cmdline --sshkey' + ) + + if __contains_word "$prev" ${OPTS[ARG]}; then + case $prev in + --kmoddir|-k|--fwdir|-c|--conf|--confdir|--tmpdir|--sshkey|--add-fstab|--add-device|-I|--install) + comps=$(compgen -d -- "$cur") + compopt -o filenames + ;; + -a|-m|-o|--add|--modules|--omit) + comps=$(dracut --list-modules 2>/dev/null) + ;; + --kver) + comps=$(cd /lib/modules; echo *) + ;; + *) + return 0 + ;; + esac + COMPREPLY=( $(compgen -W '$comps' -- "$cur") ) + return 0 + fi + + if [[ $cur = -* ]]; then + COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") ) + return 0 + fi +} + +complete -F _dracut dracut diff -Nru dracut-020/dracut-catimages.8 dracut-027/dracut-catimages.8 --- dracut-020/dracut-catimages.8 2012-06-29 10:54:57.000000000 +0000 +++ dracut-027/dracut-catimages.8 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -'\" t -.\" Title: dracut-catimages -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.77.1 -.\" Date: 06/29/2012 -.\" Manual: dracut -.\" Source: dracut -.\" Language: English -.\" -.TH "DRACUT\-CATIMAGES" "8" "06/29/2012" "dracut" "dracut" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -dracut-catimages \- creates initial ramdisk image by concatenating images -.SH "SYNOPSIS" -.sp -\fBdracut\-catimages\fR [\fIOPTION\fR\&...] \fI\fR [\fI\fR\&...] -.SH "DESCRIPTION" -.sp -dracut\-catimages creates an initial ramdisk image by concatenating several images from the command line and /boot/dracut/*\&.img -.SH "OPTIONS" -.PP -\fB\-f, \-\-force\fR -.RS 4 -overwrite existing initramfs file\&. -.RE -.PP -\fB\-i, \-\-imagedir\fR -.RS 4 -Directory with additional images to add (default: /boot/dracut/) -.RE -.PP -\fB\-o, \-\-overlaydir\fR -.RS 4 -Overlay directory, which contains additional files that will be used to create an additional image -.RE -.PP -\fB\-\-nooverlay\fR -.RS 4 -Do not use the overlay directory -.RE -.PP -\fB\-\-noimagedir\fR -.RS 4 -Do not use the additional image directory -.RE -.PP -\fB\-h, \-\-help\fR -.RS 4 -display help text and exit\&. -.RE -.PP -\fB\-\-debug\fR -.RS 4 -output debug information of the build process -.RE -.PP -\fB\-v, \-\-verbose\fR -.RS 4 -verbose output during the build process -.RE -.SH "FILES" -.PP -\fI/boot/dracut/*\&.img\fR -.RS 4 -images to work with -.RE -.SH "AUTHORS" -.sp -Harald Hoyer -.SH "AVAILABILITY" -.sp -The dracut\-catimages command is part of the dracut package and is available from \m[blue]\fBhttps://dracut\&.wiki\&.kernel\&.org\fR\m[] -.SH "SEE ALSO" -.sp -\fBdracut\fR(8) diff -Nru dracut-020/dracut-functions.sh dracut-027/dracut-functions.sh --- dracut-020/dracut-functions.sh 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/dracut-functions.sh 2013-03-27 12:41:41.000000000 +0000 @@ -19,12 +19,35 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # +export LC_MESSAGES=C -[[ -d "$initdir/.kernelmodseen" ]] || mkdir -p "$initdir/.kernelmodseen" +if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then + if ! [[ -d "$initdir/.kernelmodseen" ]]; then + mkdir -p "$initdir/.kernelmodseen" + fi + DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen" +fi + +if [[ $initdir ]] && ! [[ -d $initdir ]]; then + mkdir -p "$initdir" +fi # Generic substring function. If $2 is in $1, return 0. strstr() { [[ $1 = *$2* ]]; } +# find a binary. If we were not passed the full path directly, +# search in the usual places to find the binary. +find_binary() { + if [[ -z ${1##/*} ]]; then + if [[ -x $1 ]] || { strstr "$1" ".so" && ldd $1 &>/dev/null; }; then + echo $1 + return 0 + fi + fi + + type -P ${1##*/} +} + if ! [[ $dracutbasedir ]]; then dracutbasedir=${BASH_SOURCE[0]%/*} [[ $dracutbasedir = "dracut-functions" ]] && dracutbasedir="." @@ -32,6 +55,14 @@ dracutbasedir="$(readlink -f $dracutbasedir)" fi +if ! [[ $DRACUT_INSTALL ]]; then + DRACUT_INSTALL=$(find_binary dracut-install) +fi + +if ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/dracut-install ]]; then + DRACUT_INSTALL=$dracutbasedir/dracut-install +fi + # Detect lib paths if ! [[ $libdirs ]] ; then if strstr "$(ldd /bin/sh)" "/lib64/" &>/dev/null \ @@ -65,15 +96,28 @@ dlog_init fi +if ! [[ $initdir ]]; then + dfatal "initdir not set" + exit 1 +fi + # export standard hookdirs [[ $hookdirs ]] || { hookdirs="cmdline pre-udev pre-trigger netroot " hookdirs+="initqueue initqueue/settled initqueue/online initqueue/finished initqueue/timeout " hookdirs+="pre-mount pre-pivot cleanup mount " - hookdirs+="emergency shutdown-emergency shutdown " + hookdirs+="emergency shutdown-emergency pre-shutdown shutdown " export hookdirs } +dracut_need_initqueue() { + >"$initdir/lib/dracut/need-initqueue" +} + +dracut_module_included() { + strstr "$mods_to_load $modules_loaded" "$@" +} + # Create all subdirectories for given path without creating the last element. # $1 = path mksubdirs() { [[ -e ${1%/*} ]] || mkdir -m 0755 -p ${1%/*}; } @@ -203,6 +247,21 @@ } fi +get_persistent_dev() { + local i _tmp _dev + + _dev=$(udevadm info --query=name --name="$1" 2>/dev/null) + [ -z "$_dev" ] && return + + for i in /dev/mapper/* /dev/disk/by-uuid/* /dev/disk/by-id/*; do + _tmp=$(udevadm info --query=name --name="$i" 2>/dev/null) + if [ "$_tmp" = "$_dev" ]; then + echo $i + return + fi + done +} + # get_fs_env # Get and set the ID_FS_TYPE and ID_FS_UUID variable from udev for a device. # Example: @@ -260,10 +319,17 @@ # $ find_block_device /usr # 8:4 find_block_device() { - local _x _mpt _majmin _dev _fs _maj _min + local _x _mpt _majmin _dev _fs _maj _min _find_mpt + _find_mpt="$1" if [[ $use_fstab != yes ]]; then - while read _x _x _majmin _x _mpt _x _x _fs _dev _x; do - [[ $_mpt = $1 ]] || continue + while read _x; do + set -- $_x + _majmin="$3" + _mpt="$5" + [[ $8 = "-" ]] && shift + _fs="$8" + _dev="$9" + [[ $_mpt = $_find_mpt ]] || continue [[ $_fs = nfs ]] && { echo $_dev; return 0;} [[ $_fs = nfs3 ]] && { echo $_dev; return 0;} [[ $_fs = nfs4 ]] && { echo $_dev; return 0;} @@ -281,7 +347,7 @@ while read _dev _mpt _fs _x; do [ "${_dev%%#*}" != "$_dev" ] && continue - if [[ $_mpt = $1 ]]; then + if [[ $_mpt = $_find_mpt ]]; then [[ $_fs = nfs ]] && { echo $_dev; return 0;} [[ $_fs = nfs3 ]] && { echo $_dev; return 0;} [[ $_fs = nfs4 ]] && { echo $_dev; return 0;} @@ -304,16 +370,75 @@ # $ find_dev_fstype /dev/sda2;echo # ext4 find_dev_fstype() { - local _x _mpt _majmin _dev _fs _maj _min - while read _x _x _majmin _x _mpt _x _x _fs _dev _x; do - [[ $_dev = $1 ]] || continue + local _x _mpt _majmin _dev _fs _maj _min _find_dev + _find_dev="$1" + strstr "$_find_dev" "/dev" || _find_dev="/dev/block/$_find_dev" + while read _x; do + set -- $_x + _majmin="$3" + _mpt="$5" + [[ $8 = "-" ]] && shift + _fs="$8" + _dev="$9" + strstr "$_dev" "/dev" || continue + [[ $_dev -ef $_find_dev ]] || continue + [[ $_fs = "autofs" ]] && continue + echo -n $_fs; + return 0; + done < /proc/self/mountinfo + + # fall back to /etc/fstab + while read _dev _mpt _fs _x; do + [ "${_dev%%#*}" != "$_dev" ] && continue + case "$_dev" in + LABEL=*) + _dev="$(echo $_dev | sed 's,/,\\x2f,g')" + _dev="/dev/disk/by-label/${_dev#LABEL=}" + ;; + UUID=*) + _dev="/dev/disk/by-uuid/${_dev#UUID=}" + ;; + PARTUUID=*) + _dev="/dev/disk/by-partuuid/${_dev#PARTUUID=}" + ;; + esac + + [[ $_dev -ef $_find_dev ]] || continue + echo -n $_fs; + return 0; + done < /etc/fstab + + return 1 +} + +# find_mp_fstype +# Echo the filesystem type for a given mountpoint. +# /proc/self/mountinfo is taken as the primary source of information +# and /etc/fstab is used as a fallback. +# No newline is appended! +# Example: +# $ find_mp_fstype /;echo +# ext4 +find_mp_fstype() { + local _x _mpt _majmin _dev _fs _maj _min _find_mpt + _find_mpt="$1" + while read _x; do + set -- $_x + _majmin="$3" + _mpt="$5" + [[ $8 = "-" ]] && shift + _fs="$8" + _dev="$9" + [[ $_mpt = $_find_mpt ]] || continue + [[ $_fs = "autofs" ]] && continue echo -n $_fs; return 0; done < /proc/self/mountinfo # fall back to /etc/fstab while read _dev _mpt _fs _x; do - [[ $_dev = $1 ]] || continue + [ "${_dev%%#*}" != "$_dev" ] && continue + [[ $_mpt = $_find_mpt ]] || continue echo -n $_fs; return 0; done < /etc/fstab @@ -325,27 +450,27 @@ find_root_block_device() { find_block_device /; } # for_each_host_dev_fs -# Execute " " for every "|" pair found +# Execute " " for every " " pair found # in ${host_fs_types[@]} for_each_host_dev_fs() { local _func="$1" local _dev - local _fs local _ret=1 - for f in ${host_fs_types[@]}; do - OLDIFS="$IFS" - IFS="|" - set -- $f - IFS="$OLDIFS" - _dev="$1" - [[ -b "$_dev" ]] || continue - _fs="$2" - $_func $_dev $_fs && _ret=0 + + [[ "${!host_fs_types[@]}" ]] || return 0 + + for _dev in "${!host_fs_types[@]}"; do + $_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0 done return $_ret } +host_fs_all() +{ + echo "${host_fs_types[@]}" +} + # Walk all the slave relationships for a given block device. # Stop when our helper function returns success # $1 = function to call on every found block device @@ -366,6 +491,57 @@ return 1 } +check_block_and_slaves_all() { + local _x _ret=1 + [[ -b /dev/block/$2 ]] || return 1 # Not a block device? So sorry. + if "$1" $2; then + _ret=0 + fi + check_vol_slaves "$@" && return 0 + if [[ -f /sys/dev/block/$2/../dev ]]; then + check_block_and_slaves_all $1 $(cat "/sys/dev/block/$2/../dev") && _ret=0 + fi + [[ -d /sys/dev/block/$2/slaves ]] || return 1 + for _x in /sys/dev/block/$2/slaves/*/dev; do + [[ -f $_x ]] || continue + check_block_and_slaves_all $1 $(cat "$_x") && _ret=0 + done + return $_ret +} +# for_each_host_dev_and_slaves +# Execute " " for every "" found +# in ${host_devs[@]} and their slaves +for_each_host_dev_and_slaves_all() +{ + local _func="$1" + local _dev + local _ret=1 + + [[ "${host_devs[@]}" ]] || return 0 + + for _dev in ${host_devs[@]}; do + [[ -b "$_dev" ]] || continue + if check_block_and_slaves_all $_func $(get_maj_min $_dev); then + _ret=0 + fi + done + return $_ret +} + +for_each_host_dev_and_slaves() +{ + local _func="$1" + local _dev + + [[ "${host_devs[@]}" ]] || return 0 + + for _dev in ${host_devs[@]}; do + [[ -b "$_dev" ]] || continue + check_block_and_slaves $_func $(get_maj_min $_dev) && return 0 + done + return 1 +} + # ugly workaround for the lvm design # There is no volume group device, # so, there are no slave devices for volume groups. @@ -391,56 +567,79 @@ return 1 } -if [[ -x /usr/bin/dracut-install ]]; then +# fs_get_option +# search for a specific option in a bunch of filesystem options +# and return the value +fs_get_option() { + local _fsopts=$1 + local _option=$2 + local OLDIFS="$IFS" + IFS=, + set -- $_fsopts + IFS="$OLDIFS" + while [ $# -gt 0 ]; do + case $1 in + $_option=*) + echo ${1#${_option}=} + break + esac + shift + done +} + +if [[ $DRACUT_INSTALL ]]; then [[ $DRACUT_RESOLVE_LAZY ]] || export DRACUT_RESOLVE_DEPS=1 inst_dir() { [[ -e ${initdir}/"$1" ]] && return 0 # already there - dracut-install ${initdir+-D "$initdir"} -d "$@" - (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} -d "$@" || : + $DRACUT_INSTALL ${initdir+-D "$initdir"} -d "$@" + (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} -d "$@" || : } inst() { [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there - #dinfo "dracut-install -l $@" - dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" - (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : + #dinfo "$DRACUT_INSTALL -l $@" + $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" + (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : } inst_simple() { [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there [[ -e $1 ]] || return 1 # no source - dracut-install ${initdir+-D "$initdir"} "$@" - (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} "$@" || : + $DRACUT_INSTALL ${initdir+-D "$initdir"} "$@" + (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} "$@" || : } inst_symlink() { [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there [[ -L $1 ]] || return 1 - dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" - (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : + $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" + (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : } dracut_install() { - #dinfo "initdir=$initdir dracut-install -l $@" - dracut-install ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" - (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : + local ret + #dinfo "initdir=$initdir $DRACUT_INSTALL -l $@" + $DRACUT_INSTALL ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" + ret=$? + (($ret != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : + return $ret } inst_library() { [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there [[ -e $1 ]] || return 1 # no source - dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" - (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : + $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" + (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : } inst_binary() { - dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" - (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : + $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" + (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : } inst_script() { - dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" - (($? != 0)) && derror dracut-install ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : + $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" + (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} ${DRACUT_RESOLVE_DEPS+-l} ${DRACUT_FIPS_MODE+-H} "$@" || : } else @@ -493,6 +692,12 @@ if [[ -e "${_src%/*}/.${_src##*/}.hmac" ]]; then inst "${_src%/*}/.${_src##*/}.hmac" "${_target%/*}/.${_target##*/}.hmac" fi + if [[ -e "/lib/fipscheck/${_src##*/}.hmac" ]]; then + inst "/lib/fipscheck/${_src##*/}.hmac" "/lib/fipscheck/${_target##*/}.hmac" + fi + if [[ -e "/lib64/fipscheck/${_src##*/}.hmac" ]]; then + inst "/lib64/fipscheck/${_src##*/}.hmac" "/lib64/fipscheck/${_target##*/}.hmac" + fi fi ddebug "Installing $_src" cp --reflink=auto --sparse=auto -pfL "$_src" "${initdir}/$_target" @@ -530,6 +735,12 @@ if [[ -e "${_src%/*}/.${_src##*/}.hmac" ]]; then inst "${_src%/*}/.${_src##*/}.hmac" "${_dest%/*}/.${_dest##*/}.hmac" fi + if [[ -e "/lib/fipscheck/${_src##*/}.hmac" ]]; then + inst "/lib/fipscheck/${_src##*/}.hmac" "/lib/fipscheck/${_dest##*/}.hmac" + fi + if [[ -e "/lib64/fipscheck/${_src##*/}.hmac" ]]; then + inst "/lib64/fipscheck/${_src##*/}.hmac" "/lib64/fipscheck/${_dest##*/}.hmac" + fi fi _reallib=$(readlink -f "$_src") inst_simple "$_reallib" "$_reallib" @@ -664,70 +875,83 @@ echo "${links}" } -# find a binary. If we were not passed the full path directly, -# search in the usual places to find the binary. -find_binary() { - if [[ -z ${1##/*} ]]; then - if [[ -x $1 ]] || { strstr "$1" ".so" && ldd $1 &>/dev/null; }; then - echo $1 - return 0 - fi - fi - - type -P $1 -} - # attempt to install any programs specified in a udev rule inst_rule_programs() { local _prog _bin if grep -qE 'PROGRAM==?"[^ "]+' "$1"; then for _prog in $(grep -E 'PROGRAM==?"[^ "]+' "$1" | sed -r 's/.*PROGRAM==?"([^ "]+).*/\1/'); do + _bin="" if [ -x ${udevdir}/$_prog ]; then _bin=${udevdir}/$_prog - else + elif [[ "${_prog/\$env\{/}" == "$_prog" ]]; then _bin=$(find_binary "$_prog") || { - dinfo "Skipping program $_prog using in udev rule $(basename $1) as it cannot be found" + dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" continue; } fi - #dinfo "Installing $_bin due to it's use in the udev rule $(basename $1)" - dracut_install "$_bin" + [[ $_bin ]] && dracut_install "$_bin" done fi - if grep -qE 'RUN==?"[^ "]+' "$1"; then - for _prog in $(grep -E 'RUN==?"[^ "]+' "$1" | sed -r 's/.*RUN==?"([^ "]+).*/\1/'); do + if grep -qE 'RUN[+=]=?"[^ "]+' "$1"; then + for _prog in $(grep -E 'RUN[+=]=?"[^ "]+' "$1" | sed -r 's/.*RUN[+=]=?"([^ "]+).*/\1/'); do + _bin="" if [ -x ${udevdir}/$_prog ]; then _bin=${udevdir}/$_prog - else + elif [[ "${_prog/\$env\{/}" == "$_prog" ]] && [[ "${_prog}" != "/sbin/initqueue" ]]; then _bin=$(find_binary "$_prog") || { - dinfo "Skipping program $_prog using in udev rule $(basename $1) as it cannot be found" + dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" continue; } fi - #dinfo "Installing $_bin due to it's use in the udev rule $(basename $1)" - dracut_install "$_bin" + [[ $_bin ]] && dracut_install "$_bin" done fi - if grep -qE 'PROGRAM==?"[^ "]+' "$1"; then - for _prog in $(grep -E 'IMPORT==?"[^ "]+' "$1" | sed -r 's/.*IMPORT==?"([^ "]+).*/\1/'); do + if grep -qE 'IMPORT\{program\}==?"[^ "]+' "$1"; then + for _prog in $(grep -E 'IMPORT\{program\}==?"[^ "]+' "$1" | sed -r 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/'); do + _bin="" if [ -x ${udevdir}/$_prog ]; then _bin=${udevdir}/$_prog - else + elif [[ "${_prog/\$env\{/}" == "$_prog" ]]; then _bin=$(find_binary "$_prog") || { - dinfo "Skipping program $_prog using in udev rule $(basename $1) as it cannot be found" + dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" continue; } fi - #dinfo "Installing $_bin due to it's use in the udev rule $(basename $1)" - dracut_install "$_bin" + [[ $_bin ]] && dracut_install "$_bin" done fi } +# attempt to install any programs specified in a udev rule +inst_rule_group_owner() { + local i + + if grep -qE 'OWNER=?"[^ "]+' "$1"; then + for i in $(grep -E 'OWNER=?"[^ "]+' "$1" | sed -r 's/.*OWNER=?"([^ "]+).*/\1/'); do + if ! egrep -q "^$i:" "$initdir/etc/passwd" 2>/dev/null; then + egrep "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" + fi + done + fi + if grep -qE 'GROUP=?"[^ "]+' "$1"; then + for i in $(grep -E 'GROUP=?"[^ "]+' "$1" | sed -r 's/.*GROUP=?"([^ "]+).*/\1/'); do + if ! egrep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then + egrep "^$i:" /etc/group 2>/dev/null >> "$initdir/etc/group" + fi + done + fi +} + +inst_rule_initqueue() { + if grep -q -F initqueue "$1"; then + dracut_need_initqueue + fi +} + # udev rules always get installed in the same place, so # create a function to install them to make life simpler. inst_rules() { @@ -736,11 +960,13 @@ inst_dir "${udevdir}/rules.d" inst_dir "$_target" for _rule in "$@"; do - if [ "${rule#/}" = "$rule" ]; then + if [ "${_rule#/}" = "$_rule" ]; then for r in ${udevdir}/rules.d /etc/udev/rules.d; do if [[ -f $r/$_rule ]]; then _found="$r/$_rule" inst_rule_programs "$_found" + inst_rule_group_owner "$_found" + inst_rule_initqueue "$_found" inst_simple "$_found" fi done @@ -749,6 +975,8 @@ if [[ -f ${r}$_rule ]]; then _found="${r}$_rule" inst_rule_programs "$_found" + inst_rule_group_owner "$_found" + inst_rule_initqueue "$_found" inst_simple "$_found" "$_target/${_found##*/}" fi done @@ -756,6 +984,33 @@ done } +prepare_udev_rules() { + [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version) + + for f in "$@"; do + f="${initdir}/etc/udev/rules.d/$f" + [ -e "$f" ] || continue + while read line; do + if [ "${line%%IMPORT PATH_ID}" != "$line" ]; then + if [ $UDEVVERSION -ge 174 ]; then + printf '%sIMPORT{builtin}="path_id"\n' "${line%%IMPORT PATH_ID}" + else + printf '%sIMPORT{program}="path_id %%p"\n' "${line%%IMPORT PATH_ID}" + fi + elif [ "${line%%IMPORT BLKID}" != "$line" ]; then + if [ $UDEVVERSION -ge 176 ]; then + printf '%sIMPORT{builtin}="blkid"\n' "${line%%IMPORT BLKID}" + else + printf '%sIMPORT{program}="/sbin/blkid -o udev -p $tempnode"\n' "${line%%IMPORT BLKID}" + fi + else + echo "$line" + fi + done < "${f}" > "${f}.new" + mv "${f}.new" "$f" + done +} + # install function specialized for hooks # $1 = type of hook, $2 = hook priority (lower runs first), $3 = hook # All hooks should be POSIX/SuS compliant, they will be sourced by init. @@ -768,7 +1023,7 @@ dfatal "No such hook type $1. Aborting initrd creation." exit 1 fi - inst_simple "$3" "/lib/dracut/hooks/${1}/${2}${3##*/}" + inst_simple "$3" "/lib/dracut/hooks/${1}/${2}-${3##*/}" } # install any of listed files @@ -840,7 +1095,7 @@ for _src in $@ do case ${_src} in - *.gz) _cmd='gzip -d' ;; + *.gz) _cmd='gzip -f -d' ;; *.bz2) _cmd='bzip2 -d' ;; *) return 1 ;; esac @@ -992,6 +1247,9 @@ local _moddir=$(echo ${dracutbasedir}/modules.d/??${1}) local _ret local _moddep + + [ "${#host_fs_types[*]}" -le 0 ] && return 1 + # If we are already scheduled to be loaded, no need to check again. strstr " $mods_to_load " " $_mod " && return 0 strstr " $mods_checked_as_dep " " $_mod " && return 1 @@ -1001,15 +1259,28 @@ [[ $2 ]] || mods_checked_as_dep+=" $_mod " - strstr " $omit_dracutmodules " " $_mod " && return 1 + if strstr " $omit_dracutmodules " " $_mod "; then + dinfo "dracut module '$_mod' will not be installed, because it's in the list to be omitted!" + return 1 + fi + + if strstr " $dracutmodules $add_dracutmodules $force_add_dracutmodules" " $_mod "; then + module_check_mount $_mod; ret=$? - if [ "${#host_fs_types[*]}" -gt 0 ]; then - module_check_mount $_mod || return 1 + # explicit module, so also accept ret=255 + [[ $ret = 0 || $ret = 255 ]] || return 1 else - # skip this module - return 1 + # module not in our list + if [[ $dracutmodules = all ]]; then + # check, if we can and should install this module + module_check_mount $_mod || return 1 + else + # skip this module + return 1 + fi fi + for _moddep in $(module_depends $_mod); do # handle deps as if they were manually added strstr " $add_dracutmodules " " $_moddep " || \ @@ -1017,7 +1288,10 @@ strstr " $force_add_dracutmodules " " $_moddep " || \ force_add_dracutmodules+=" $_moddep " # if a module we depend on fail, fail also - check_module $_moddep || return 1 + if ! check_module $_moddep; then + derror "dracut module '$_mod' depends on '$_moddep', which can't be installed" + return 1 + fi done strstr " $mods_to_load " " $_mod " || \ @@ -1044,7 +1318,10 @@ [[ $2 ]] || mods_checked_as_dep+=" $_mod " - strstr " $omit_dracutmodules " " $_mod " && return 1 + if strstr " $omit_dracutmodules " " $_mod "; then + dinfo "dracut module '$_mod' will not be installed, because it's in the list to be omitted!" + return 1 + fi if strstr " $dracutmodules $add_dracutmodules $force_add_dracutmodules" " $_mod "; then if strstr " $force_add_dracutmodules" " $_mod"; then @@ -1072,7 +1349,10 @@ strstr " $force_add_dracutmodules " " $_moddep " || \ force_add_dracutmodules+=" $_moddep " # if a module we depend on fail, fail also - check_module $_moddep || return 1 + if ! check_module $_moddep; then + derror "dracut module '$_mod' depends on '$_moddep', which can't be installed" + return 1 + fi done strstr " $mods_to_load " " $_mod " || \ @@ -1100,7 +1380,7 @@ for _mod in $_modcheck; do strstr "$mods_to_load" "$_mod" && continue strstr "$omit_dracutmodules" "$_mod" && continue - derror "Dracut module \"$_mod\" cannot be found or installed." + derror "dracut module '$_mod' cannot be found or installed." done } @@ -1112,8 +1392,8 @@ [[ -e "${initdir}/lib/modules/$kernel/${1##*/lib/modules/$kernel/}" ]] \ && return 0 - if [[ -e "$initdir/.kernelmodseen/${1##*/}" ]]; then - read ret < "$initdir/.kernelmodseen/${1##*/}" + if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && [[ -e "$DRACUT_KERNEL_LAZY_HASHDIR/${1##*/}" ]]; then + read ret < "$DRACUT_KERNEL_LAZY_HASHDIR/${1##*/}" return $ret fi @@ -1133,8 +1413,9 @@ inst_simple "$1" "/lib/modules/$kernel/${1##*/lib/modules/$kernel/}" ret=$? - [ -d "$initdir/.kernelmodseen" ] && \ - echo $ret > "$initdir/.kernelmodseen/${1##*/}" + [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ + [[ -d "$DRACUT_KERNEL_LAZY_HASHDIR" ]] && \ + echo $ret > "$DRACUT_KERNEL_LAZY_HASHDIR/${1##*/}" (($ret != 0)) && return $ret local _modname=${1##*/} _fwdir _found _fw @@ -1181,38 +1462,38 @@ dracut_kernel_post() { local _moddirname=${srcmods%%/lib/modules/*} - if [[ -f "$initdir/.kernelmodseen/lazylist" ]]; then - xargs modprobe -a ${_moddirname+-d ${_moddirname}/} --ignore-install --show-depends \ - < "$initdir/.kernelmodseen/lazylist" 2>/dev/null \ + if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" ]]; then + xargs -r modprobe -a ${_moddirname+-d ${_moddirname}/} \ + --ignore-install --show-depends --set-version $kernel \ + < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" 2>/dev/null \ | sort -u \ | while read _cmd _modpath _options; do [[ $_cmd = insmod ]] || continue echo "$_modpath" - done > "$initdir/.kernelmodseen/lazylist.dep" + done > "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" ( - if [[ -x /usr/bin/dracut-install ]] && [[ -z $_moddirname ]]; then - xargs dracut-install ${initdir+-D "$initdir"} -a < "$initdir/.kernelmodseen/lazylist.dep" + if [[ $DRACUT_INSTALL ]] && [[ -z $_moddirname ]]; then + xargs -r $DRACUT_INSTALL ${initdir+-D "$initdir"} -a < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" else while read _modpath; do local _destpath=$_modpath [[ $_moddirname ]] && _destpath=${_destpath##$_moddirname/} _destpath=${_destpath##*/lib/modules/$kernel/} inst_simple "$_modpath" "/lib/modules/$kernel/${_destpath}" || exit $? - done < "$initdir/.kernelmodseen/lazylist.dep" + done < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" fi ) & - - if [[ -x /usr/bin/dracut-install ]]; then - xargs modinfo -k $kernel -F firmware < "$initdir/.kernelmodseen/lazylist.dep" \ + if [[ $DRACUT_INSTALL ]]; then + xargs -r modinfo -k $kernel -F firmware < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" \ | while read line; do for _fwdir in $fw_dir; do echo $_fwdir/$line; done; - done |xargs dracut-install ${initdir+-D "$initdir"} -a -o + done | xargs -r $DRACUT_INSTALL ${initdir+-D "$initdir"} -a -o else - for _fw in $(xargs modinfo -k $kernel -F firmware < "$initdir/.kernelmodseen/lazylist.dep"); do + for _fw in $(xargs -r modinfo -k $kernel -F firmware < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep"); do for _fwdir in $fw_dir; do if [[ -d $_fwdir && -f $_fwdir/$_fw ]]; then inst_simple "$_fwdir/$_fw" "/lib/firmware/$_fw" @@ -1243,23 +1524,40 @@ exit 1 fi - rm -fr "$initdir/.kernelmodseen" + [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && rm -fr "$DRACUT_KERNEL_LAZY_HASHDIR" } +module_is_host_only() ( + local _mod=$1 + _mod=${_mod##*/} + _mod=${_mod%.ko} + + [[ "$add_drivers" =~ " ${_mod} " ]] && return 0 + + # check if module is loaded + [[ -d $(echo /sys/module/${_mod//-/_}|{ read a b; echo $a; }) ]] && return 0 + + # check if module is loadable on the current kernel + # this covers the case, where a new module is introduced + # or a module was renamed + # or a module changed from builtin to a module + modinfo -F filename "$_mod" &>/dev/null || return 0 + + return 1 +) + find_kernel_modules_by_path () ( local _OLDIFS - if ! [[ $hostonly ]]; then - _OLDIFS=$IFS - IFS=: - while read a rest; do - [[ $a = kernel*/$1/* ]] || continue - echo $srcmods/$a - done < $srcmods/modules.dep - IFS=$_OLDIFS - else - ( cd /sys/module; echo *; ) \ - | xargs modinfo -F filename -k $kernel 2>/dev/null - fi + + [[ -f $srcmods/modules.dep ]] || return 0 + + _OLDIFS=$IFS + IFS=: + while read a rest; do + [[ $a = */$1/* ]] || continue + echo $srcmods/$a + done < $srcmods/modules.dep + IFS=$_OLDIFS return 0 ) @@ -1267,8 +1565,8 @@ find_kernel_modules_by_path drivers } -# instmods [-c] [ ... ] -# instmods [-c] +# instmods [-c [-s]] [ ... ] +# instmods [-c [-s]] # install kernel modules along with all their dependencies. # can be e.g. "=block" or "=drivers/usb/storage" instmods() { @@ -1276,11 +1574,17 @@ # called [sub]functions inherit _fderr local _fderr=9 local _check=no + local _silent=no if [[ $1 = '-c' ]]; then _check=yes shift fi + if [[ $1 = '-s' ]]; then + _silent=yes + shift + fi + function inst1mod() { local _ret=0 _mod="$1" case $_mod in @@ -1291,13 +1595,13 @@ ((_ret+=$?)) ;; --*) _mpargs+=" $_mod" ;; - i2o_scsi) return 0;; # Do not load this diagnostic-only module *) _mod=${_mod##*/} # if we are already installed, skip this module and go on # to the next one. - if [[ -f "$initdir/.kernelmodseen/${_mod%.ko}.ko" ]]; then - read _ret <"$initdir/.kernelmodseen/${_mod%.ko}.ko" + if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ + [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko}.ko" ]]; then + read _ret <"$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko}.ko" return $_ret fi @@ -1305,16 +1609,16 @@ dinfo "Omitting driver ${_mod##$srcmods}" return 0 fi + # If we are building a host-specific initramfs and this # module is not already loaded, move on to the next one. [[ $hostonly ]] \ - && ! [[ -d $(echo /sys/module/${_mod//-/_}|{ read a b; echo $a; }) ]] \ - && ! [[ "$add_drivers" =~ " ${_mod} " ]] \ + && ! module_is_host_only "$_mod" \ && return 0 - if [[ "$_check" = "yes" ]] || ! [[ $DRACUT_KERNEL_LAZY ]]; then + if [[ "$_check" = "yes" ]] || ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then # We use '-d' option in modprobe only if modules prefix path - # differs from default '/'. This allows us to use Dracut with + # differs from default '/'. This allows us to use dracut with # old version of modprobe which doesn't have '-d' option. local _moddirname=${srcmods%%/lib/modules/*} [[ -n ${_moddirname} ]] && _moddirname="-d ${_moddirname}/" @@ -1325,7 +1629,8 @@ --set-version $kernel ${_moddirname} $_mpargs ((_ret+=$?)) else - echo $_mod >> "$initdir/.kernelmodseen/lazylist" + [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ + echo $_mod >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" fi ;; esac @@ -1337,8 +1642,8 @@ if (($# == 0)); then # filenames from stdin while read _mod; do inst1mod "${_mod%.ko*}" || { - if [ "$_check" = "yes" ]; then - dfatal "Failed to install $_mod" + if [[ "$_check" == "yes" ]]; then + [[ "$_silent" == "no" ]] && dfatal "Failed to install $_mod" return 1 fi } @@ -1346,8 +1651,8 @@ fi while (($# > 0)); do # filenames as arguments inst1mod ${1%.ko*} || { - if [ "$_check" = "yes" ]; then - dfatal "Failed to install $1" + if [[ "$_check" == "yes" ]]; then + [[ "$_silent" == "no" ]] && dfatal "Failed to install $1" return 1 fi } diff -Nru dracut-020/dracut-initramfs-restore.sh dracut-027/dracut-initramfs-restore.sh --- dracut-020/dracut-initramfs-restore.sh 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/dracut-initramfs-restore.sh 2013-03-27 12:41:41.000000000 +0000 @@ -1,17 +1,28 @@ -#!/bin/sh +#!/bin/bash # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh set -e + +KERNEL_VERSION="$(uname -r)" + +[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id + +if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then + IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd" +fi +[[ -f $IMG ]] || IMG="/boot/initramfs-${KERNEL_VERSION}.img" + cd /run/initramfs -IMG="/boot/initramfs-$(uname -r).img" + [ -f .need_shutdown -a -f "$IMG" ] || exit 1 -if zcat "$IMG" | cpio -id >/dev/null 2>&1; then +if zcat "$IMG" | cpio -id --quiet >/dev/null; then rm .need_shutdown -elif xzcat "$IMG" | cpio -id >/dev/null 2>&1; then +elif xzcat "$IMG" | cpio -id --quiet >/dev/null; then rm .need_shutdown else # something failed, so we clean up + echo "Unpacking of $IMG to /run/initramfs failed" >&2 rm -f /run/initramfs/shutdown exit 1 fi diff -Nru dracut-020/dracut-logger.sh dracut-027/dracut-logger.sh --- dracut-020/dracut-logger.sh 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/dracut-logger.sh 2013-03-27 12:41:41.000000000 +0000 @@ -23,7 +23,7 @@ __DRACUT_LOGGER__=1 -## @brief Logging facility module for Dracut both at build- and boot-time. +## @brief Logging facility module for dracut both at build- and boot-time. # # @section intro Introduction # @@ -89,7 +89,7 @@ # @see dlog_init() -## @brief Initializes Dracut Logger. +## @brief Initializes dracut Logger. # # @retval 1 if something has gone wrong # @retval 0 on success. @@ -116,7 +116,7 @@ if [ -z "$fileloglvl" ]; then [ -w "$logfile" ] && fileloglvl=4 || fileloglvl=0 - elif (( $fileloglvl >= 0 )); then + elif (( $fileloglvl > 0 )); then __oldumask=$(umask) umask 0377 ! [ -e "$logfile" ] && >"$logfile" @@ -138,7 +138,7 @@ fi fi - if (( $sysloglvl >= 0 )); then + if (( $sysloglvl > 0 )); then if ! [ -S /dev/log -a -w /dev/log ] || ! command -v logger >/dev/null then # We cannot log to syslog, so turn this facility off. @@ -148,7 +148,7 @@ fi fi - if (($sysloglvl >= 0)) || (($kmsgloglvl >= 0 )); then + if (($sysloglvl > 0)) || (($kmsgloglvl > 0 )); then if [ -n "$dracutbasedir" ]; then readonly syslogfacility=user else diff -Nru dracut-020/dracut-shutdown.service dracut-027/dracut-shutdown.service --- dracut-020/dracut-shutdown.service 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/dracut-shutdown.service 2013-03-27 12:41:41.000000000 +0000 @@ -8,7 +8,7 @@ [Unit] Description=Restore /run/initramfs After=getty@tty1.service prefdm.service -Before=reboot.service shutdown.target +Before=systemd-reboot.service shutdown.target DefaultDependencies=no ConditionPathExists=/run/initramfs/.need_shutdown ConditionPathExists=!/run/initramfs/bin/sh diff -Nru dracut-020/dracut.8 dracut-027/dracut.8 --- dracut-020/dracut.8 2012-06-29 10:54:57.000000000 +0000 +++ dracut-027/dracut.8 1970-01-01 00:00:00.000000000 +0000 @@ -1,709 +0,0 @@ -'\" t -.\" Title: dracut -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets v1.77.1 -.\" Date: 06/29/2012 -.\" Manual: dracut -.\" Source: dracut -.\" Language: English -.\" -.TH "DRACUT" "8" "06/29/2012" "dracut" "dracut" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -dracut \- low\-level tool for generating an initramfs image -.SH "SYNOPSIS" -.sp -\fBdracut\fR [\fIOPTION\&...\fR] [ [\fI\fR]] -.SH "DESCRIPTION" -.sp -dracut creates an initial image used by the kernel for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem, mounting the root filesystem and booting into the real system\&. -.sp -At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it as initial root file system\&. All finding of the root device happens in this early userspace\&. -.sp -For a complete list of kernel command line options see \fBdracut\&.cmdline\fR(7) -.SH "OPTIONS" -.PP -\fB\-f, \-\-force\fR -.RS 4 -overwrite existing initramfs file\&. -.RE -.PP -\fB\-m, \-\-modules\fR \fI\fR -.RS 4 -specify a space\-separated list of dracut modules to call when building the initramfs\&. Modules are located in -\fI/usr/lib/dracut/modules\&.d\fR\&. This parameter can be specified multiple times\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -If [LIST] has multiple arguments, then you have to put these in quotes\&. For example: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# dracut \-\-modules "module1 module2" \&.\&.\&. -.fi -.if n \{\ -.RE -.\} -.sp .5v -.RE -.RE -.PP -\fB\-o, \-\-omit\fR\ \&\fI\fR -.RS 4 -omit a space\-separated list of dracut modules\&. This parameter can be specified multiple times\&. -.RE -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -If [LIST] has multiple arguments, then you have to put these in quotes\&. For example: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# dracut \-\-omit "module1 module2" \&.\&.\&. -.fi -.if n \{\ -.RE -.\} -.sp .5v -.RE -.PP -\fB\-a, \-\-add\fR\ \&\fI\fR -.RS 4 -add a space\-separated list of dracut modules to the default set of modules\&. This parameter can be specified multiple times\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -If [LIST] has multiple arguments, then you have to put these in quotes\&. For example: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# dracut \-\-add "module1 module2" \&.\&.\&. -.fi -.if n \{\ -.RE -.\} -.sp .5v -.RE -.RE -.PP -\fB\-\-force\-add\fR\ \&\fI\fR -.RS 4 -force to add a space\-separated list of dracut modules to the default set of modules, when \-H is specified\&. This parameter can be specified multiple times\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -If [LIST] has multiple arguments, then you have to put these in quotes\&. For example: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# dracut \-\-force\-add "module1 module2" \&.\&.\&. -.fi -.if n \{\ -.RE -.\} -.sp .5v -.RE -.RE -.PP -\fB\-d, \-\-drivers\fR\ \&\fI\fR -.RS 4 -specify a space\-separated list of kernel modules to exclusively include in the initramfs\&. The kernel modules have to be specified without the "\&.ko" suffix\&. This parameter can be specified multiple times\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -If [LIST] has multiple arguments, then you have to put these in quotes\&. For example: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# dracut \-\-drivers "kmodule1 kmodule2" \&.\&.\&. -.fi -.if n \{\ -.RE -.\} -.sp .5v -.RE -.RE -.PP -\fB\-\-add\-drivers\fR\ \&\fI\fR -.RS 4 -specify a space\-separated list of kernel modules to add to the initramfs\&. The kernel modules have to be specified without the "\&.ko" suffix\&. This parameter can be specified multiple times\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -If [LIST] has multiple arguments, then you have to put these in quotes\&. For example: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# dracut \-\-add\-drivers "kmodule1 kmodule2" \&.\&.\&. -.fi -.if n \{\ -.RE -.\} -.sp .5v -.RE -.RE -.PP -\fB\-\-omit\-drivers\fR\ \&\fI\fR -.RS 4 -specify a space\-separated list of kernel modules not to add to the initramfs\&. The kernel modules have to be specified without the "\&.ko" suffix\&. This parameter can be specified multiple times\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -If [LIST] has multiple arguments, then you have to put these in quotes\&. For example: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# dracut \-\-omit\-drivers "kmodule1 kmodule2" \&.\&.\&. -.fi -.if n \{\ -.RE -.\} -.sp .5v -.RE -.RE -.PP -\fB\-\-filesystems\fR\ \&\fI\fR -.RS 4 -specify a space\-separated list of kernel filesystem modules to exclusively include in the generic initramfs\&. This parameter can be specified multiple times\&. -.RE -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -If [LIST] has multiple arguments, then you have to put these in quotes\&. For example: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# dracut \-\-filesystems "filesystem1 filesystem2" \&.\&.\&. -.fi -.if n \{\ -.RE -.\} -.sp .5v -.RE -.PP -\fB\-k, \-\-kmoddir\fR\ \&\fI\fR -.RS 4 -specify the directory, where to look for kernel modules -.RE -.PP -\fB\-\-fwdir\fR\ \&\fI[:\&...]++\fR -.RS 4 -specify additional directories, where to look for firmwares\&. This parameter can be specified multiple times\&. -.RE -.PP -\fB\-\-kernel\-only\fR -.RS 4 -only install kernel drivers and firmware files -.RE -.PP -\fB\-\-no\-kernel\fR -.RS 4 -do not install kernel drivers and firmware files -.RE -.PP -\fB\-\-mdadmconf\fR -.RS 4 -include local -\fI/etc/mdadm\&.conf\fR -.RE -.PP -\fB\-\-nomdadmconf\fR -.RS 4 -do not include local -\fI/etc/mdadm\&.conf\fR -.RE -.PP -\fB\-\-lvmconf\fR -.RS 4 -include local -\fI/etc/lvm/lvm\&.conf\fR -.RE -.PP -\fB\-\-nolvmconf\fR -.RS 4 -do not include local -\fI/etc/lvm/lvm\&.conf\fR -.RE -.PP -\fB\-\-fscks\fR [LIST] -.RS 4 -add a space\-separated list of fsck tools, in addition to -\fIdracut\&.conf\fR\*(Aqs specification; the installation is opportunistic (non\-existing tools are ignored) -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -If [LIST] has multiple arguments, then you have to put these in quotes\&. For example: -.sp -.if n \{\ -.RS 4 -.\} -.nf -# dracut \-\-fscks "fsck\&.foo barfsck" \&.\&.\&. -.fi -.if n \{\ -.RE -.\} -.sp .5v -.RE -.RE -.PP -\fB\-\-nofscks\fR -.RS 4 -inhibit installation of any fsck tools -.RE -.PP -\fB\-\-strip\fR -.RS 4 -strip binaries in the initramfs (default) -.RE -.PP -\fB\-\-nostrip\fR -.RS 4 -do not strip binaries in the initramfs -.RE -.PP -\fB\-\-prefix\fR\ \&\fI\fR -.RS 4 -prefix initramfs files with the specified directory -.RE -.PP -\fB\-\-noprefix\fR -.RS 4 -do not prefix initramfs files (default) -.RE -.PP -\fB\-h, \-\-help\fR -.RS 4 -display help text and exit\&. -.RE -.PP -\fB\-\-debug\fR -.RS 4 -output debug information of the build process -.RE -.PP -\fB\-v, \-\-verbose\fR -.RS 4 -increase verbosity level (default is info(4)) -.RE -.PP -\fB\-q, \-\-quiet\fR -.RS 4 -decrease verbosity level (default is info(4)) -.RE -.PP -\fB\-c, \-\-conf\fR\ \&\fI\fR -.RS 4 -specify configuration file to use\&. -.sp -Default: -\fI/etc/dracut\&.conf\fR -.RE -.PP -\fB\-\-confdir\fR\ \&\fI\fR -.RS 4 -specify configuration directory to use\&. -.sp -Default: -\fI/etc/dracut\&.conf\&.d\fR -.RE -.PP -\fB\-\-tmpdir\fR\ \&\fI\fR -.RS 4 -specify temporary directory to use\&. -.sp -Default: -\fI/var/tmp\fR -.RE -.PP -\fB\-\-sshkey\fR\ \&\fI\fR -.RS 4 -ssh key file used with ssh\-client module\&. -.RE -.PP -\fB\-l, \-\-local\fR -.RS 4 -activates the local mode\&. dracut will use modules from the current working directory instead of the system\-wide installed modules in -\fI/usr/lib/dracut/modules\&.d\fR\&. This is useful when running dracut from a git checkout\&. -.RE -.PP -\fB\-H, \-\-hostonly\fR -.RS 4 -Host\-Only mode: Install only what is needed for booting the local host instead of a generic host and generate host\-specific configuration\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBWarning\fR -.ps -1 -.br -If chrooted to another root other than the real root device, use "\-\-fstab" and provide a valid -\fI/etc/fstab\fR\&. -.sp .5v -.RE -.RE -.PP -\fB\-\-no\-hostonly\fR -.RS 4 -Disable Host\-Only mode -.RE -.PP -\fB\-\-fstab\fR -.RS 4 -Use -\fI/etc/fstab\fR -instead of -\fI/proc/self/mountinfo\fR\&. -.RE -.PP -\fB\-\-add\-fstab\fR\ \&__\ \& -.RS 4 -Add entries of -\fI\fR -to the initramfs /etc/fstab\&. -.RE -.PP -\fB\-\-mount\fR\ \&"\fI\fR \fI\fR \fI\fR \fI\fR" -.RS 4 -Mount -\fI\fR -on -\fI\fR -with -\fI\fR -and -\fI\fR -in the initramfs -.RE -.PP -\fB\-i, \-\-include\fR\ \&\fI_\ \&_\fR -.RS 4 -include the files in the SOURCE directory into the TARGET directory in the final initramfs\&. If SOURCE is a file, it will be installed to TARGET in the final initramfs\&. This parameter can be specified multiple times\&. -.RE -.PP -\fB\-I, \-\-install\fR\ \&\fI\fR -.RS 4 -install the space separated list of files into the initramfs\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -If [LIST] has multiple arguments, then you have to put these in quotes\&. For example: -.sp -+ -.sp -.if n \{\ -.RS 4 -.\} -.nf -# dracut \-\-install "/bin/foo /sbin/bar" \&.\&.\&. -.fi -.if n \{\ -.RE -.\} -.sp .5v -.RE -.RE -.PP -\fB\-\-gzip\fR -.RS 4 -Compress the generated initramfs using gzip\&. This will be done by default, unless another compression option or \-\-no\-compress is passed\&. Equivalent to "\-\-compress=gzip \-9" -.RE -.PP -\fB\-\-bzip2\fR -.RS 4 -Compress the generated initramfs using bzip2\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBWarning\fR -.ps -1 -.br -Make sure your kernel has bzip2 decompression support compiled in, otherwise you will not be able to boot\&. Equivalent to "\-\-compress=bzip2" -.sp .5v -.RE -.RE -.PP -\fB\-\-lzma\fR -.RS 4 -Compress the generated initramfs using lzma\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBWarning\fR -.ps -1 -.br -Make sure your kernel has lzma decompression support compiled in, otherwise you will not be able to boot\&. Equivalent to "\-\-compress=lzma \-9" -.sp .5v -.RE -.RE -.PP -\fB\-\-xz\fR -.RS 4 -Compress the generated initramfs using xz\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBWarning\fR -.ps -1 -.br -Make sure your kernel has xz decompression support compiled in, otherwise you will not be able to boot\&. Equivalent to "\-\-compress=xz \-\-check=crc32 \-\-lzma2=dict=1MiB" -.sp .5v -.RE -.RE -.PP -\fB\-\-compress\fR\ \&\fI\fR -.RS 4 -Compress the generated initramfs using the passed compression program\&. If you pass it just the name of a compression program, it will call that program with known\-working arguments\&. If you pass a quoted string with arguments, it will be called with exactly those arguments\&. Depending on what you pass, this may result in an initramfs that the kernel cannot decompress\&. -.RE -.PP -\fB\-\-no\-compress\fR -.RS 4 -Do not compress the generated initramfs\&. This will override any other compression options\&. -.RE -.PP -\fB\-\-list\-modules\fR -.RS 4 -List all available dracut modules\&. -.RE -.PP -\fB\-M, \-\-show\-modules\fR -.RS 4 -Print included module\(cqs name to standard output during build\&. -.RE -.PP -\fB\-\-keep\fR -.RS 4 -Keep the initramfs temporary directory for debugging purposes\&. -.RE -.SH "FILES" -.PP -\fI/var/log/dracut\&.log\fR -.RS 4 -logfile of initramfs image creation -.RE -.PP -\fI/tmp/dracut\&.log\fR -.RS 4 -logfile of initramfs image creation, if -\fI/var/log/dracut\&.log\fR -is not writable -.RE -.PP -\fI/etc/dracut\&.conf\fR -.RS 4 -see dracut\&.conf5 -.RE -.PP -\fI/etc/dracut\&.conf\&.d/*\&.conf\fR -.RS 4 -see dracut\&.conf5 -.RE -.SS "Configuration in the initramfs" -.PP -\fI/etc/conf\&.d/\fR -.RS 4 -Any files found in -\fI/etc/conf\&.d/\fR -will be sourced in the initramfs to set initial values\&. Command line options will override these values set in the configuration files\&. -.RE -.PP -\fI/etc/cmdline\fR -.RS 4 -Can contain additional command line options\&. -.RE -.SH "AVAILABILITY" -.sp -The dracut command is part of the dracut package and is available from \m[blue]\fBhttps://dracut\&.wiki\&.kernel\&.org\fR\m[] -.SH "AUTHORS" -.PP -\fBHarald Hoyer\fR -.RS 4 -Project Leader and Developer -.RE -.PP -\fBVictor Lowther\fR -.RS 4 -Developer -.RE -.PP -\fBPhilippe Seewer\fR -.RS 4 -Developer -.RE -.PP -\fBWarren Togami\fR -.RS 4 -Developer -.RE -.PP -\fBAmadeusz Żołnowski\fR -.RS 4 -Developer -.RE -.PP -\fBJeremy Katz\fR -.RS 4 -Developer -.RE -.PP -\fBDavid Dillow\fR -.RS 4 -Developer -.RE -.PP -\fBWill Woods\fR -.RS 4 -Developer -.RE -.SH "SEE ALSO" -.sp -\fBdracut\&.cmdline\fR(7) \fBdracut\&.conf\fR(5) diff -Nru dracut-020/dracut.8.asc dracut-027/dracut.8.asc --- dracut-020/dracut.8.asc 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/dracut.8.asc 2013-03-27 12:41:41.000000000 +0000 @@ -14,6 +14,12 @@ DESCRIPTION ----------- + +Create an initramfs for the kernel with the version . +If is omitted, then the version of the actual running +kernel is used. If is omitted or empty, then the default location +/boot/initramfs-.img is used. + dracut creates an initial image used by the kernel for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem, mounting the root filesystem and booting into the real system. @@ -22,10 +28,72 @@ as initial root file system. All finding of the root device happens in this early userspace. -For a complete list of kernel command line options see *dracut.cmdline*(7) +For a complete list of kernel command line options see *dracut.cmdline*(7). + +If you are dropped to an emergency shell, while booting your initramfs, +the file _/run/initramfs/sosreport.txt_ is created, which can be safed to a +(to be mounted by hand) partition (usually /boot) or a USB stick. +Additional debugging info can be produced by adding **rd.debug** to the kernel command line. +_/run/initramfs/sosreport.txt_ contains all logs and the output of some tools. +It should be attached to any report about dracut problems. + +EXAMPLE +------- + +To create a initramfs image, the most simple command is: +---- +# dracut +---- + +This will generate a general purpose initramfs image, with all possible +functionality resulting of the combination of the installed dracut modules and +system tools. The image is /boot/initramfs-_++++_.img and +contains the kernel modules of the currently active kernel with version +_++++_. + +If the initramfs image already exists, dracut will display an error message, and +to overwrite the existing image, you have to use the --force option. +---- +# dracut --force +---- + +If you want to specify another filename for the resulting image you would issue +a command like: +---- +# dracut foobar.img +---- + +To generate an image for a specific kernel version, the command would be: +---- +# dracut foobar.img 2.6.40-1.rc5.f20 +---- + +A shortcut to generate the image at the default location for a specific kernel +version is: +---- +# dracut --kver 2.6.40-1.rc5.f20 +---- + +If you want to create lighter, smaller initramfs images, you may want to specify +the --host-only or -H option. Using this option, the resulting image will +contain only those dracut modules, kernel modules and filesystems, which are +needed to boot this specific machine. This has the drawback, that you can't put +the disk on another controller or machine, and that you can't switch to another +root filesystem, without recreating the initramfs image. The usage of the +--host-only option is only for experts and you will have to keep the broken +pieces. At least keep a copy of a general purpose image (and corresponding +kernel) as a fallback to rescue your system. + OPTIONS ------- +**--kver** __:: + set the kernel version. This enables to specify the kernel version, without + specifying the location of the initramfs image. For example: +---- +# dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64 +---- + **-f, --force**:: overwrite existing initramfs file. @@ -46,7 +114,7 @@ **-o, --omit** __:: omit a space-separated list of dracut modules. This parameter can be specified multiple times. - ++ [NOTE] =============================== If [LIST] has multiple arguments, then you have to put these in quotes. For @@ -130,7 +198,7 @@ specify a space-separated list of kernel filesystem modules to exclusively include in the generic initramfs. This parameter can be specified multiple times. - ++ [NOTE] =============================== If [LIST] has multiple arguments, then you have to put these in quotes. For @@ -147,6 +215,10 @@ specify additional directories, where to look for firmwares. This parameter can be specified multiple times. +**--kernel-cmdline **:: + specify default kernel command line parameters + + **--kernel-only**:: only install kernel drivers and firmware files @@ -188,6 +260,12 @@ **--nostrip**:: do not strip binaries in the initramfs +**--hardlink**:: + hardlink files in the initramfs (default) + +**--nohardlink**:: + do not hardlink files in the initramfs + **--prefix** __:: prefix initramfs files with the specified directory @@ -241,7 +319,7 @@ provide a valid _/etc/fstab_. ==== -**--no-hostonly**:: +**-N, --no-hostonly**:: Disable Host-Only mode **--fstab**:: @@ -254,6 +332,12 @@ Mount __ on __ with __ and __ in the initramfs +**--add-device** __ :: + Bring up __ in initramfs, __ should be the device name. + This can be useful in hostonly mode for resume support when your swap is on + LVM or an encrypted partition. + [NB --device can be used for compatibility with earlier releases] + **-i, --include** __ __:: include the files in the SOURCE directory into the TARGET directory in the final initramfs. If SOURCE is a file, it will be @@ -267,7 +351,6 @@ =============================== If [LIST] has multiple arguments, then you have to put these in quotes. For example: -+ ---- # dracut --install "/bin/foo /sbin/bar" ... ---- @@ -326,6 +409,10 @@ **--keep**:: Keep the initramfs temporary directory for debugging purposes. +**--regenerate-all**:: + Regenerate all initramfs images at the default location with the kernel versions found on the system. + Additional parameters are passed through. + FILES ----- _/var/log/dracut.log_:: @@ -341,6 +428,9 @@ _/etc/dracut.conf.d/*.conf_:: see dracut.conf5 +_/usr/lib/dracut/dracut.conf.d/*.conf_:: + see dracut.conf5 + Configuration in the initramfs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _/etc/conf.d/_:: @@ -349,6 +439,9 @@ set in the configuration files. _/etc/cmdline_:: + Can contain additional command line options. Deprecated, better use /etc/cmdline.d/*.conf. + +_/etc/cmdline.d/*.conf:: Can contain additional command line options. AVAILABILITY @@ -358,29 +451,21 @@ AUTHORS ------- -*Harald Hoyer*:: - Project Leader and Developer +Harald Hoyer -*Victor Lowther*:: - Developer +Victor Lowther -*Philippe Seewer*:: - Developer +Philippe Seewer -*Warren Togami*:: - Developer +Warren Togami -*Amadeusz Żołnowski*:: - Developer +Amadeusz Żołnowski -*Jeremy Katz*:: - Developer +Jeremy Katz -*David Dillow*:: - Developer +David Dillow -*Will Woods*:: - Developer +Will Woods SEE ALSO -------- diff -Nru dracut-020/dracut.asc dracut-027/dracut.asc --- dracut-020/dracut.asc 2012-06-29 10:54:38.000000000 +0000 +++ dracut-027/dracut.asc 2013-03-27 12:41:41.000000000 +0000 @@ -79,7 +79,7 @@ initialized and a user-space helper started to paint animations onto the display in lockstep with the boot process. -* If the root file system is on NFS, dracut does then: +* If the root file system is on NFS, dracut does then: ** Bring up the primary network interface. ** Invoke a DHCP client, with which it can obtain a DHCP lease. ** Extract the name of the NFS share and the address of the NFS server from the @@ -120,6 +120,29 @@ rotated away. Instead, it is simply emptied and the final root file system mounted over the top. +If the systemd module is used in the initramfs, the ordering of the services +started looks like <>. + +== Dracut on shutdown + +On a systemd driven system, the dracut initramfs is also used for the shutdown procedure. + +The following steps are executed during a shutdown: + +* systemd switches to the shutdown.target +* systemd starts /lib/systemd/system/shutdown.target.wants/dracut-shutdown.service +* dracut-shutdown.service executes /usr/lib/dracut/dracut-initramfs-restore + which unpacks the initramfs to /run/initramfs +* systemd finishes shutdown.target +* systemd kills all processes +* systemd tries to unmount everything and mounts the remaining read-only +* systemd checks, if there is a /run/initramfs/shutdown executable +* if yes, it does a pivot_root to /run/initramfs and executes ./shutdown. + The old root is then mounted on /oldroot. /usr/lib/dracut/modules.d/99shutdown/shutdown.sh is the shutdown executable. +* shutdown will try to umount every /oldroot mount and calls the various shutdown hooks from the dracut modules + +This ensures, that all devices are disassembled and unmounted cleanly. + = User Manual == Creating an initramfs Image @@ -154,7 +177,7 @@ A shortcut to generate the image at the default location for a specific kernel version is: ---- -# dracut '' 2.6.40-1.rc5.f20 +# dracut --kver 2.6.40-1.rc5.f20 ---- If you want to create lighter, smaller initramfs images, you may want to specify @@ -328,25 +351,28 @@ The --include option let you specify a source path and a target path. For example ---- -# dracut --include cmdline-preset /etc/cmdline initramfs-cmdline-pre.img +# dracut --include cmdline-preset /etc/cmdline.d/mycmdline.conf initramfs-cmdline-pre.img ---- will create an initramfs image, where the file cmdline-preset will be copied -inside the initramfs to _/etc/cmdline_. --include can only be specified once. +inside the initramfs to _/etc/cmdline.d/mycmdline.conf_. --include can only be specified once. ---- # mkdir rd.live.overlay # mkdir rd.live.overlay/etc # mkdir rd.live.overlay/etc/conf.d -# echo "ip=auto" >> rd.live.overlay/etc/cmdline -# echo export TESTVAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf -# echo export TESTVAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf +# mkdir rd.live.overlay/etc/cmdline.d +# echo "ip=auto" >> rd.live.overlay/etc/cmdline.d/mycmdline.conf +# echo export FOO=testtest >> rd.live.overlay/etc/conf.d/testvar.conf +# echo export BAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf # tree rd.live.overlay/ rd.live.overlay/ └── etc - ├── cmdline - └── conf.d - └── testvar.conf + ├── cmdline.d + │   └── mycmdline.conf + └── conf.d + └── testvar.conf + # dracut --include rd.live.overlay / initramfs-rd.live.overlay.img ---- @@ -388,12 +414,12 @@ http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red Hat Enterprise Linux Storage Administration Guide]. -If you specify rd.ip=auto on the kernel command line, then dracut asks a dhcp +If you specify ip=auto on the kernel command line, then dracut asks a dhcp server about the ip adress for the machine. The dhcp server can also serve an additional root-path, which will set the root device for dracut. With this mechanism, you have static configuration on your client machine and a centralized boot configuration on your TFTP/DHCP server. If you can't pass a -kernel command line, then you can inject _/etc/cmdline_, with a method described +kernel command line, then you can inject _/etc/cmdline.d/mycmdline.conf_, with a method described in <>. @@ -459,6 +485,14 @@ # less /run/initramfs/init.log # dmesg | less ---- +. With dracut >= 022 and systemd, you can inspect the rd.debug output with: +---- +# journalctl -ab +---- +. With dracut >= 025 the file /run/initramfs/sosreport.txt is generated, which contains all the logs and the output of all significant tools, which are mentioned later. + +If you want to save that output, simply mount /boot by hand or insert an USB stick and mount that. +Then you can store the output for later inspection. [[information-to-include-in-your-report]] === Information to include in your report @@ -472,7 +506,7 @@ * A copy of your disk partition information from _/etc/fstab_, which might be obtained booting an old working initramfs or a rescue medium. * A device listing from device-mapper. This can be obtained by running the -command +command + ---- # dmsetup ls --tree @@ -500,19 +534,19 @@ As well as the information from <> include the following information: -* Include physical volume information by running the command: +* Include physical volume information by running the command: + ---- # lvm pvdisplay ---- + -* Include volume group information by running the command: +* Include volume group information by running the command: + ---- # lvm vgdisplay ---- + -* Include logical volume information by running the command: +* Include logical volume information by running the command: + ---- # lvm lvdisplay @@ -523,7 +557,7 @@ As well as the information from <>, include the following information: -* If using software RAID disk partitions, please include the output of +* If using software RAID disk partitions, please include the output of + ---- # cat /proc/mdstat @@ -602,7 +636,7 @@ [[using-the-dracut-shell]] ==== Using the dracut shell -Dracut offers a shell for interactive debugging in the event dracut fails to +dracut offers a shell for interactive debugging in the event dracut fails to locate your root filesystem. To enable the shell: . Add the boot parameter ''rd.shell'' to your bootloader configuration file @@ -628,7 +662,7 @@ No root device found Dropping to debug shell. -# +# ---- + . Use this shell prompt to gather the information requested above (see <>). @@ -648,7 +682,7 @@ a successful boot, the objective is to locate your root volume and create a symlink _/dev/root_ which points to the file system. For example, the following example demonstrates accessing and booting a root volume that is an encrypted -LVM Logical volume. +LVM Logical volume. . Inspect your partitions using parted + @@ -664,7 +698,7 @@ ---- + . You recall that your root volume was a LVM logical volume. Scan and activate -any logical volumes. +any logical volumes. + ---- # lvm vgscan @@ -690,7 +724,7 @@ # UUID=$(cryptsetup luksUUID /dev/mapper/linux-root) # cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID Enter passphrase for /dev/mapper/linux-root: -Key slot 0 unlocked. +Key slot 0 unlocked. ---- + . Next, make a symbolic link to the unlocked root volume @@ -749,7 +783,7 @@ modules can insert custom script at various points, to control the boot process. These hooks are plain directories containing shell scripts ending with ".sh", which are sourced by init. -Common used functions are in _dracut-lib.sh_, which can be sourced by any script. +Common used functions are in _dracut-lib.sh_, which can be sourced by any script. @@ -798,7 +832,7 @@ === Trigger Udev udev is triggered by calling udevadm trigger, which sends add events for all -devices and subsystems. +devices and subsystems. @@ -878,7 +912,6 @@ == Network Infrastructure - FIXME @@ -997,13 +1030,11 @@ === Creation Functions - FIXME === Initramfs Functions - FIXME @@ -1011,6 +1042,9 @@ FIXME +:leveloffset: 1 +[[dracutbootup7]] +include::dracut.bootup.7.asc[] :leveloffset: 1 [[dracut8]] @@ -1022,6 +1056,12 @@ [[dracutcmdline7]] include::dracut.cmdline.7.asc[] +[[lsinitrd1]] +include::lsinitrd.1.asc[] + +[[mkinitrd8]] +include::mkinitrd.8.asc[] + :leveloffset: 0 [appendix] License diff -Nru dracut-020/dracut.bootup.7.asc dracut-027/dracut.bootup.7.asc --- dracut-020/dracut.bootup.7.asc 1970-01-01 00:00:00.000000000 +0000 +++ dracut-027/dracut.bootup.7.asc 2013-03-27 12:41:41.000000000 +0000 @@ -0,0 +1,122 @@ +DRACUT.BOOTUP(7) +================ +:doctype: manpage +:man source: dracut +:man manual: dracut + +NAME +---- +dracut.bootup - boot ordering in the initramfs + +DESCRIPTION +----------- + +This flow chart illustrates the ordering of the services, if systemd is used in the dracut initramfs. +---- + + systemd-journal.socket + | + v + dracut-cmdline.service + | + v + dracut-pre-udev.service + | + v + systemd-udevd.service + | + v +local-fs-pre.target dracut-pre-trigger.service + | | + v v + (various mounts) (various swap systemd-udev-trigger.service + | devices...) | (various low-level (various low-level + | | | services: seed, API VFS mounts: + v v v tmpfiles, random mqueue, configfs, + local-fs.target swap.target dracut-initqueue.service sysctl, ...) debugfs, ...) + | | | | | + \_______________|____________________ | ___________________|____________________/ + \|/ + v + sysinit.target + | + _________________/|\___________________ + / | \ + | | | + v | v + (various | rescue.service + sockets...) | | + | | v + v | rescue.target + sockets.target | + | | + \_________________ | emergency.service + \| | + v v + basic.target emergency.target + | + ______________________/| + / | + | v + | dracut-pre-mount.service + | | + | v + | sysroot.mount + | | + | v + | initrd-root-fs.target + (custom initrd services) | + | v + | dracut-mount.service + | | + | v + | initrd-parse-etc.service + | | + | v + | (sysroot-usr.mount and + | various mounts marked + | with fstab option + | x-initrd.mount) + | | + | v + | initrd-fs.target + \______________________ | + \| + v + initrd.target + | + v + dracut-pre-pivot.service + | + v + initrd-cleanup.service + isolates to + initrd-switch-root.target + | + v + ______________________/| + / | + | initrd-udevadm-cleanup-db.service + | | + (custom initrd services) | + | | + \______________________ | + \| + v + initrd-switch-root.target + | + v + initrd-switch-root.service + | + v + switch-root +---- + + +AUTHOR +------ +Harald Hoyer + +SEE ALSO +-------- +*dracut*(8) *bootup*(7) diff -Nru dracut-020/dracut.cmdline.7 dracut-027/dracut.cmdline.7 --- dracut-020/dracut.cmdline.7 2012-06-29 10:54:57.000000000 +0000 +++ dracut-027/dracut.cmdline.7 1970-01-01 00:00:00.000000000 +0000 @@ -1,1129 +0,0 @@ -'\" t -.\" Title: dracut.cmdline -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.77.1 -.\" Date: 06/29/2012 -.\" Manual: dracut -.\" Source: dracut -.\" Language: English -.\" -.TH "DRACUT\&.CMDLINE" "7" "06/29/2012" "dracut" "dracut" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -dracut.cmdline \- dracut kernel command line options -.SH "DESCRIPTION" -.sp -The root device used by the kernel is specified in the boot configuration file on the kernel command line, as always\&. -.sp -The traditional \fIroot=/dev/sda1\fR style device specification is allowed, but not encouraged\&. The root device should better be identified by LABEL or UUID\&. If a label is used, as in \fIroot=LABEL=\fR the initramfs will search all available devices for a filesystem with the appropriate label, and mount that device as the root filesystem\&. \fIroot=UUID=\fR will mount the partition with that UUID as the root filesystem\&. -.sp -In the following all kernel command line parameters, which are processed by dracut, are described\&. -.sp -"rd\&.*" parameters mentioned without "=" are boolean parameters\&. They can be turned on/off by setting them to {0|1}\&. If the assignment with "=" is missing "=1" is implied\&. For example \fIrd\&.info\fR can be turned off with \fIrd\&.info=0\fR or turned on with \fIrd\&.info=1\fR or \fIrd\&.info\fR\&. The last value in the kernel command line is the value, which is honored\&. -.SS "Standard" -.PP -\fBinit=\fR\fI\fR -.RS 4 -specify the path to the init programm to be started after the initramfs has finished -.RE -.PP -\fBroot=\fR\fI\fR -.RS 4 -specify the block device to use as the root filesystem\&. -.sp -E\&.g\&.: -.sp -.if n \{\ -.RS 4 -.\} -.nf -root=/dev/sda1 -root=/dev/disk/by\-path/pci\-0000:00:1f\&.1\-scsi\-0:0:1:0\-part1 -root=/dev/disk/by\-label/Root -root=LABEL=Root -root=/dev/disk/by\-uuid/3f5ad593\-4546\-4a94\-a374\-bcfb68aa11f7 -root=UUID=3f5ad593\-4546\-4a94\-a374\-bcfb68aa11f7 -root=PARTUUID=3f5ad593\-4546\-4a94\-a374\-bcfb68aa11f7 -.fi -.if n \{\ -.RE -.\} -.RE -.PP -\fBrootfstype=\fR\fI\fR -.RS 4 -"auto" if not specified, e\&.g\&.: -.sp -.if n \{\ -.RS 4 -.\} -.nf -rootfstype=ext3 -.fi -.if n \{\ -.RE -.\} -.RE -.PP -\fBrootflags=\fR\fI\fR -.RS 4 -specify additional mount options for the root filesystem\&. If not set, -\fI/etc/fstab\fR -of the real root will be parsed for special mount options and mounted accordingly\&. -.RE -.PP -\fBrd\&.fstab=0\fR -.RS 4 -do not honor special mount options for the root filesystem found in -\fI/etc/fstab\fR -of the real root\&. -.RE -.sp -\fBresume=\fR\fI\fR -.sp -+ E\&.g\&.: -.sp -+ -.sp -.if n \{\ -.RS 4 -.\} -.nf -resume=/dev/disk/by\-path/pci\-0000:00:1f\&.1\-scsi\-0:0:1:0\-part1 -resume=/dev/disk/by\-uuid/3f5ad593\-4546\-4a94\-a374\-bcfb68aa11f7 -resume=UUID=3f5ad593\-4546\-4a94\-a374\-bcfb68aa11f7 -.fi -.if n \{\ -.RE -.\} -.SS "Misc" -.PP -\fBrd\&.driver\&.blacklist=\fR\fI[,,\&...]\fR -.RS 4 -do not load kernel module \&. This parameter can be specified multiple times\&. -.RE -.PP -\fBrd\&.driver\&.pre=\fR\fI[,,\&...]\fR -.RS 4 -force loading kernel module \&. This parameter can be specified multiple times\&. -.RE -.PP -\fBrd\&.driver\&.post=\fR\fI[,,\&...]\fR -.RS 4 -force loading kernel module after all automatic loading modules have been loaded\&. This parameter can be specified multiple times\&. -.RE -.SS "Debug" -.PP -\fBrd\&.info\fR -.RS 4 -print informational output though "quiet" is set -.RE -.PP -\fBrd\&.shell\fR -.RS 4 -allow dropping to a shell, if root mounting fails -.RE -.PP -\fBrd\&.debug\fR -.RS 4 -set \-x for the dracut shell and logs to dmesg, console and -\fI/run/initramfs/init\&.log\fR -.RE -.PP -\fBrd\&.break\fR -.RS 4 -drop to a shell at the end -.RE -.PP -\fBrd\&.break=\fR\fI{cmdline|pre\-udev|pre\-trigger|initqueue|pre\-mount|mount|pre\-pivot|cleanup}\fR -.RS 4 -drop to a shell on defined breakpoint -.RE -.PP -\fBrd\&.udev\&.info\fR -.RS 4 -set udev to loglevel info -.RE -.PP -\fBrd\&.udev\&.debug\fR -.RS 4 -set udev to loglevel debug -.RE -.SS "I18N" -.PP -\fBvconsole\&.keymap=\fR\fI\fR -.RS 4 -keyboard translation table loaded by loadkeys; taken from keymaps directory; will be written as KEYMAP to -\fI/etc/vconsole\&.conf\fR -in the initramfs, e\&.g\&.: -.sp -.if n \{\ -.RS 4 -.\} -.nf -vconsole\&.keymap=de\-latin1\-nodeadkeys -.fi -.if n \{\ -.RE -.\} -.RE -.PP -\fBvconsole\&.keymap\&.ext=\fR\fI\fR -.RS 4 -list of extra keymaps to bo loaded (sep\&. by space); will be written as EXT_KEYMAP to -\fI/etc/vconsole\&.conf\fR -in the initramfs -.RE -.PP -\fBvconsole\&.unicode\fR[=\fI{0|1}\fR] -.RS 4 -boolean, indicating UTF\-8 mode; will be written as UNICODE to -\fI/etc/vconsole\&.conf\fR -in the initramfs -.RE -.PP -\fBvconsole\&.font=\fR\fI\fR -.RS 4 -console font; taken from consolefonts directory; will be written as FONT to -\fI/etc/vconsole\&.conf\fR -in the initramfs; e\&.g\&.: -.sp -.if n \{\ -.RS 4 -.\} -.nf -vconsole\&.font=LatArCyrHeb\-16 -.fi -.if n \{\ -.RE -.\} -.RE -.PP -\fBvconsole\&.font\&.map=\fR\fI\fR -.RS 4 -see description of -\fI\-m\fR -parameter in setfont manual; taken from consoletrans directory; will be written as FONT_MAP to -\fI/etc/vconsole\&.conf\fR -in the initramfs -.RE -.PP -\fBvconsole\&.font\&.unimap=\fR\fI\fR -.RS 4 -see description of -\fI\-u\fR -parameter in setfont manual; taken from unimaps directory; will be written as FONT_UNIMAP to -\fI/etc/vconsole\&.conf\fR -in the initramfs -.RE -.PP -\fBlocale\&.LANG=\fR\fI\fR -.RS 4 -taken from the environment; if no UNICODE is defined we set its value in basis of LANG value (whether it ends with "\&.utf8" (or similar) or not); will be written as LANG to -\fI/etc/locale\&.conf\fR -in the initramfs; e\&.g\&.: -.sp -.if n \{\ -.RS 4 -.\} -.nf -locale\&.LANG=pl_PL\&.utf8 -.fi -.if n \{\ -.RE -.\} -.RE -.PP -\fBlocale\&.LC_ALL=\fR\fI\fR -.RS 4 -taken from the environment; will be written as LC_ALL to -\fI/etc/locale\&.conf\fR -in the initramfs -.RE -.SS "LVM" -.PP -\fBrd\&.lvm=0\fR -.RS 4 -disable LVM detection -.RE -.PP -\fBrd\&.lvm\&.vg=\fR\fI\fR -.RS 4 -only activate the volume groups with the given name\&. rd\&.lvm\&.vg can be specified multiple times on the kernel command line\&. -.RE -.PP -\fBrd\&.lvm\&.lv=\fR\fI\fR -.RS 4 -only activate the logical volumes with the given name\&. rd\&.lvm\&.lv can be specified multiple times on the kernel command line\&. -.RE -.PP -\fBrd\&.lvm\&.conf=0\fR -.RS 4 -remove any -\fI/etc/lvm/lvm\&.conf\fR, which may exist in the initramfs -.RE -.SS "crypto LUKS" -.PP -\fBrd\&.luks=0\fR -.RS 4 -disable crypto LUKS detection -.RE -.PP -\fBrd\&.luks\&.uuid=\fR\fI\fR -.RS 4 -only activate the LUKS partitions with the given UUID\&. Any "luks\-" of the LUKS UUID is removed before comparing to -\fI\fR\&. The comparisons also matches, if -\fI\fR -is only the beginning of the LUKS UUID, so you don\(cqt have to specify the full UUID\&. This parameter can be specified multiple times\&. -.RE -.PP -\fBrd\&.luks\&.allow\-discards=\fR\fI\fR -.RS 4 -Allow using of discards (TRIM) requests for LUKS partitions with the given UUID\&. Any "luks\-" of the LUKS UUID is removed before comparing to -\fI\fR\&. The comparisons also matches, if -\fI\fR -is only the beginning of the LUKS UUID, so you don\(cqt have to specify the full UUID\&. This parameter can be specified multiple times\&. -.RE -.PP -**rd\&.luks\&.allow\-discards -.RS 4 -Allow using of discards (TRIM) requests on all LUKS partitions\&. -.RE -.PP -\fBrd\&.luks\&.crypttab=0\fR -.RS 4 -do not check, if LUKS partition is in -\fI/etc/crypttab\fR -.RE -.SS "crypto LUKS \- key on removable device support" -.PP -\fBrd\&.luks\&.key=\fR\fI::\fR -.RS 4 - -\fIkeypath\fR -is a path to key file to look for\&. It\(cqs REQUIRED\&. When -\fIkeypath\fR -ends with -\fI\&.gpg\fR -it\(cqs considered to be key encrypted symmetrically with GPG\&. You will be prompted for password on boot\&. GPG support comes with -\fIcrypt\-gpg\fR -module which needs to be added explicitly\&. -.sp -\fIkeydev\fR -is a device on which key file resides\&. It might be kernel name of devices (should start with "/dev/"), UUID (prefixed with "UUID=") or label (prefix with "LABEL=")\&. You don\(cqt have to specify full UUID\&. Just its beginning will suffice, even if its ambiguous\&. All matching devices will be probed\&. This parameter is recommended, but not required\&. If not present, all block devices will be probed, which may significantly increase boot time\&. -.sp -If -\fIluksdev\fR -is given, the specified key will only be applied for that LUKS device\&. Possible values are the same as for -\fIkeydev\fR\&. Unless you have several LUKS devices, you don\(cqt have to specify this parameter\&. The simplest usage is: -.sp -.if n \{\ -.RS 4 -.\} -.nf -rd\&.luks\&.key=/foo/bar\&.key -.fi -.if n \{\ -.RE -.\} -.sp -As you see, you can skip colons in such a case\&. -.RE -.SS "MD RAID" -.PP -\fBrd\&.md=0\fR -.RS 4 -disable MD RAID detection -.RE -.PP -\fBrd\&.md\&.imsm=0\fR -.RS 4 -disable MD RAID for imsm/isw raids, use DM RAID instead -.RE -.PP -\fBrd\&.md\&.ddf=0\fR -.RS 4 -disable MD RAID for SNIA ddf raids, use DM RAID instead -.RE -.PP -\fBrd\&.md\&.conf=0\fR -.RS 4 -ignore mdadm\&.conf included in initramfs -.RE -.PP -\fBrd\&.md\&.waitclean=1\fR -.RS 4 -wait for any resync, recovery, or reshape activity to finish before continuing -.RE -.PP -\fBrd\&.md\&.uuid=\fR\fI\fR -.RS 4 -only activate the raid sets with the given UUID\&. This parameter can be specified multiple times\&. -.RE -.SS "DM RAID" -.PP -\fBrd\&.dm=0\fR -.RS 4 -disable DM RAID detection -.RE -.PP -\fBrd\&.dm\&.uuid=\fR\fI\fR -.RS 4 -only activate the raid sets with the given UUID\&. This parameter can be specified multiple times\&. -.RE -.SS "FIPS" -.PP -\fBrd\&.fips\fR -.RS 4 -enable FIPS -.RE -.PP -\fBboot=\fR\fI\fR -.RS 4 -specify the device, where /boot is located\&. e\&.g\&. -.sp -.if n \{\ -.RS 4 -.\} -.nf -boot=/dev/sda1 -boot=/dev/disk/by\-path/pci\-0000:00:1f\&.1\-scsi\-0:0:1:0\-part1 -boot=UUID= -boot=LABEL=