From: Vivek Goyal Date: Wed, 5 Sep 2012 21:24:34 +0000 (-0400) Subject: dracut: Override rd.md settings if rd.md.uuid is provided X-Git-Tag: 024~91 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc4037d12012244b51a1efecdeb121184efe6f67;p=thirdparty%2Fdracut.git dracut: Override rd.md settings if rd.md.uuid is provided Currently anaconda provides rd.md=0 on kernel's command line as a boot time optimization if root is not on md device. But this leads to kdump failure. We copy the command line from first kernel and if dump target is on md device, it fails as we never try to assemble md devices as rd.md=0. We have already set rd.md.uuid though in /etc/cmdlind.d/ dir providing dracut the info about what md devices to assemble. So this patch overrides rd.md settings if rd.md.uuid is provided. This is a stop gap measure to get kdump working on software raid devices. Harald seems to have bigger cleanup plans for rd.md. Once that happens, this patch will not be needed and things should automatically be fixed. Signed-off-by: Vivek Goyal --- diff --git a/modules.d/90mdraid/parse-md.sh b/modules.d/90mdraid/parse-md.sh index 6920f40d3..5c50b4c5c 100755 --- a/modules.d/90mdraid/parse-md.sh +++ b/modules.d/90mdraid/parse-md.sh @@ -1,12 +1,13 @@ #!/bin/sh # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -if ! getargbool 1 rd.md -d -n rd_NO_MD; then + +MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=) + +if ! [ -n "$MD_UUID" ] || ! getargbool 1 rd.md -d -n rd_NO_MD; then info "rd.md=0: removing MD RAID activation" udevproperty rd_NO_MD=1 else - MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=) - # rewrite the md rules to only process the specified raid array if [ -n "$MD_UUID" ]; then for f in /etc/udev/rules.d/65-md-incremental*.rules; do