diff --git a/.kexec-tools.metadata b/.kexec-tools.metadata
new file mode 100644
index 0000000..e519eef
--- /dev/null
+++ b/.kexec-tools.metadata
@@ -0,0 +1,4 @@
+dcdb6d2488c8a31ae95563e2113860ae16256c8f SOURCES/eppic_030413.tar.gz
+d903c5631b96913a4b31d4cc5df8aab4837e0e45 SOURCES/kexec-tools-po.tar.gz
+f119507a92446bcda58b108fd7f61e6d9f187358 SOURCES/kexec-tools-2.0.4.tar.bz2
+077dfb8fbf2f12b5efca385eb1fda55dee2096d5 SOURCES/makedumpfile-1.5.4.tar.gz
diff --git a/README.md b/README.md
deleted file mode 100644
index 0e7897f..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-The master branch has no content
- 
-Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6
- 
-If you find this file in a distro specific branch, it means that no content has been checked in yet
diff --git a/SOURCES/98-kexec.rules b/SOURCES/98-kexec.rules
new file mode 100644
index 0000000..8c742dd
--- /dev/null
+++ b/SOURCES/98-kexec.rules
@@ -0,0 +1,4 @@
+SUBSYSTEM=="cpu", ACTION=="online", PROGRAM="/bin/systemctl try-restart kdump.service"
+SUBSYSTEM=="cpu", ACTION=="offline", PROGRAM="/bin/systemctl try-restart kdump.service"
+SUBSYSTEM=="memory", ACTION=="add", PROGRAM="/bin/systemctl try-restart kdump.service"
+SUBSYSTEM=="memory", ACTION=="remove", PROGRAM="/bin/systemctl try-restart kdump.service"
diff --git a/SOURCES/dracut-kdump.sh b/SOURCES/dracut-kdump.sh
new file mode 100755
index 0000000..f38891d
--- /dev/null
+++ b/SOURCES/dracut-kdump.sh
@@ -0,0 +1,328 @@
+#!/bin/sh
+
+exec &> /dev/console
+. /lib/dracut-lib.sh
+. /lib/kdump-lib.sh
+
+if [ -f "$initdir/lib/dracut/no-emergency-shell" ]; then
+    rm -f -- $initdir/lib/dracut/no-emergency-shell
+fi
+
+set -o pipefail
+KDUMP_PATH="/var/crash"
+CORE_COLLECTOR=""
+DEFAULT_CORE_COLLECTOR="makedumpfile -c --message-level 1 -d 31"
+DMESG_COLLECTOR="/sbin/vmcore-dmesg"
+DEFAULT_ACTION="reboot -f"
+DATEDIR=`date +%Y.%m.%d-%T`
+HOST_IP='127.0.0.1'
+DUMP_INSTRUCTION=""
+SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa"
+KDUMP_SCRIPT_DIR="/kdumpscripts"
+DD_BLKSIZE=512
+FINAL_ACTION="reboot -f"
+DUMP_RETVAL=0
+conf_file="/etc/kdump.conf"
+KDUMP_PRE=""
+KDUMP_POST=""
+MOUNTS=""
+
+export PATH=$PATH:$KDUMP_SCRIPT_DIR
+
+do_dump()
+{
+    local _ret
+
+    eval $DUMP_INSTRUCTION
+    _ret=$?
+
+    if [ $_ret -ne 0 ]; then
+        echo "kdump: saving vmcore failed"
+    fi
+
+    return $_ret
+}
+
+do_umount()
+{
+    if [ -n "$MOUNTS" ]; then
+        for mount in $MOUNTS; do
+            ismounted $mount && umount -R $mount
+        done
+    fi
+}
+
+do_final_action()
+{
+    do_umount
+    eval $FINAL_ACTION
+}
+
+do_default_action()
+{
+    wait_for_loginit
+    eval $DEFAULT_ACTION
+}
+
+do_kdump_pre()
+{
+    if [ -n "$KDUMP_PRE" ]; then
+        "$KDUMP_PRE"
+    fi
+}
+
+do_kdump_post()
+{
+    if [ -n "$KDUMP_POST" ]; then
+        "$KDUMP_POST" "$1"
+    fi
+}
+
+add_dump_code()
+{
+    DUMP_INSTRUCTION=$1
+}
+
+# dump_fs <mount point| device>
+dump_fs()
+{
+    local _dev=$(findmnt -k -f -n -r -o SOURCE $1)
+    local _mp=$(findmnt -k -f -n -r -o TARGET $1)
+
+    echo "kdump: dump target is $_dev"
+
+    if [ -z "$_mp" ]; then
+        echo "kdump: error: Dump target $_dev is not mounted."
+        return 1
+    fi
+    MOUNTS="$MOUNTS $_mp"
+
+    # Remove -F in makedumpfile case. We don't want a flat format dump here.
+    [[ $CORE_COLLECTOR = *makedumpfile* ]] && CORE_COLLECTOR=`echo $CORE_COLLECTOR | sed -e "s/-F//g"`
+
+    echo "kdump: saving to $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/"
+
+    mount -o remount,rw $_mp || return 1
+    mkdir -p $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR || return 1
+
+    save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/"
+
+    echo "kdump: saving vmcore"
+    $CORE_COLLECTOR /proc/vmcore $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete || return 1
+    mv $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore
+    sync
+
+    echo "kdump: saving vmcore complete"
+    return 0
+}
+
+dump_raw()
+{
+    local _raw=$1
+
+    [ -b "$_raw" ] || return 1
+
+    echo "kdump: saving to raw disk $_raw"
+
+    if ! $(echo -n $CORE_COLLECTOR|grep -q makedumpfile); then
+        _src_size=`ls -l /proc/vmcore | cut -d' ' -f5`
+        _src_size_mb=$(($_src_size / 1048576))
+        monitor_dd_progress $_src_size_mb &
+    fi
+
+    echo "kdump: saving vmcore"
+    $CORE_COLLECTOR /proc/vmcore | dd of=$_raw bs=$DD_BLKSIZE >> /tmp/dd_progress_file 2>&1 || return 1
+    sync
+
+    echo "kdump: saving vmcore complete"
+    return 0
+}
+
+dump_ssh()
+{
+    local _opt="-i $1 -o BatchMode=yes -o StrictHostKeyChecking=yes"
+    local _dir="$KDUMP_PATH/$HOST_IP-$DATEDIR"
+    local _host=$2
+
+    echo "kdump: saving to $_host:$_dir"
+
+    cat /var/lib/random-seed > /dev/urandom
+    ssh -q $_opt $_host mkdir -p $_dir || return 1
+
+    save_vmcore_dmesg_ssh ${DMESG_COLLECTOR} ${_dir} "${_opt}" $_host
+
+    echo "kdump: saving vmcore"
+
+    if [ "${CORE_COLLECTOR%%[[:blank:]]*}" = "scp" ]; then
+        scp -q $_opt /proc/vmcore "$_host:$_dir/vmcore-incomplete" || return 1
+        ssh $_opt $_host "mv $_dir/vmcore-incomplete $_dir/vmcore" || return 1
+    else
+        $CORE_COLLECTOR /proc/vmcore | ssh $_opt $_host "dd bs=512 of=$_dir/vmcore-incomplete" || return 1
+        ssh $_opt $_host "mv $_dir/vmcore-incomplete $_dir/vmcore.flat" || return 1
+    fi
+
+    echo "kdump: saving vmcore complete"
+    return 0
+}
+
+save_vmcore_dmesg_fs() {
+    local _dmesg_collector=$1
+    local _path=$2
+
+    echo "kdump: saving vmcore-dmesg.txt"
+    $_dmesg_collector /proc/vmcore > ${_path}/vmcore-dmesg-incomplete.txt
+    _exitcode=$?
+    if [ $_exitcode -eq 0 ]; then
+        mv ${_path}/vmcore-dmesg-incomplete.txt ${_path}/vmcore-dmesg.txt
+        echo "kdump: saving vmcore-dmesg.txt complete"
+    else
+        echo "kdump: saving vmcore-dmesg.txt failed"
+    fi
+}
+
+save_vmcore_dmesg_ssh() {
+    local _dmesg_collector=$1
+    local _path=$2
+    local _opts="$3"
+    local _location=$4
+
+    echo "kdump: saving vmcore-dmesg.txt"
+    $_dmesg_collector /proc/vmcore | ssh $_opts $_location "dd of=$_path/vmcore-dmesg-incomplete.txt"
+    _exitcode=$?
+
+    if [ $_exitcode -eq 0 ]; then
+        ssh -q $_opts $_location mv $_path/vmcore-dmesg-incomplete.txt $_path/vmcore-dmesg.txt
+        echo "kdump: saving vmcore-dmesg.txt complete"
+    else
+        echo "kdump: saving vmcore-dmesg.txt failed"
+    fi
+}
+
+
+get_host_ip()
+{
+    local _host
+    if is_nfs_dump_target || is_ssh_dump_target
+    then
+        kdumpnic=$(getarg kdumpnic=)
+        [ -z "$kdumpnic" ] && echo "kdump: failed to get kdumpnic!" && return 1
+        _host=`ip addr show dev $kdumpnic|grep 'inet '`
+        [ $? -ne 0 ] && echo "kdump: wrong kdumpnic: $kdumpnic" && return 1
+        _host="${_host##*inet }"
+        _host="${_host%%/*}"
+        [ -z "$_host" ] && echo "kdump: wrong kdumpnic: $kdumpnic" && return 1
+        HOST_IP=$_host
+    fi
+    return 0
+}
+
+read_kdump_conf()
+{
+    if [ ! -f "$conf_file" ]; then
+        echo "kdump: $conf_file not found"
+        return
+    fi
+
+    # first get the necessary variables
+    while read config_opt config_val;
+    do
+        # remove inline comments after the end of a directive.
+        config_val=$(strip_comments $config_val)
+        case "$config_opt" in
+        path)
+        KDUMP_PATH="$config_val"
+            ;;
+        core_collector)
+            [ -n "$config_val" ] && CORE_COLLECTOR="$config_val"
+            ;;
+        sshkey)
+            if [ -f "$config_val" ]; then
+                SSH_KEY_LOCATION=$config_val
+            fi
+            ;;
+        kdump_pre)
+            KDUMP_PRE="$config_val"
+            ;;
+        kdump_post)
+            KDUMP_POST="$config_val"
+            ;;
+        default)
+            case $config_val in
+                shell)
+                    DEFAULT_ACTION="_emergency_shell kdump"
+                    ;;
+                reboot)
+                    DEFAULT_ACTION="do_umount; reboot -f"
+                    ;;
+                halt)
+                    DEFAULT_ACTION="do_umount; halt -f"
+                    ;;
+                poweroff)
+                    DEFAULT_ACTION="do_umount; poweroff -f"
+                    ;;
+                dump_to_rootfs)
+                    DEFAULT_ACTION="dump_fs $NEWROOT"
+                    ;;
+            esac
+            ;;
+        esac
+    done < $conf_file
+
+    # rescan for add code for dump target
+    while read config_opt config_val;
+    do
+        # remove inline comments after the end of a directive.
+        config_val=$(strip_comments $config_val)
+        case "$config_opt" in
+        ext[234]|xfs|btrfs|minix|nfs)
+            add_dump_code "dump_fs $config_val"
+            ;;
+        raw)
+            add_dump_code "dump_raw $config_val"
+            ;;
+        ssh)
+            add_dump_code "dump_ssh $SSH_KEY_LOCATION $config_val"
+            ;;
+        esac
+    done < $conf_file
+}
+
+read_kdump_conf
+
+if [ -z "$CORE_COLLECTOR" ];then
+    CORE_COLLECTOR=$DEFAULT_CORE_COLLECTOR
+    if is_ssh_dump_target || is_raw_dump_target; then
+        CORE_COLLECTOR="$CORE_COLLECTOR -F"
+    fi
+fi
+
+get_host_ip
+if [ $? -ne 0 ]; then
+    echo "kdump: get_host_ip exited with non-zero status!"
+    do_default_action
+    do_final_action
+fi
+
+if [ -z "$DUMP_INSTRUCTION" ]; then
+    add_dump_code "dump_fs $NEWROOT"
+fi
+
+do_kdump_pre
+if [ $? -ne 0 ]; then
+    echo "kdump: kdump_pre script exited with non-zero status!"
+    do_final_action
+fi
+
+do_dump
+DUMP_RETVAL=$?
+
+do_kdump_post $DUMP_RETVAL
+if [ $? -ne 0 ]; then
+    echo "kdump: kdump_post script exited with non-zero status!"
+fi
+
+if [ $DUMP_RETVAL -ne 0 ]; then
+    do_default_action
+fi
+
+do_final_action
diff --git a/SOURCES/dracut-module-setup.sh b/SOURCES/dracut-module-setup.sh
new file mode 100755
index 0000000..c013430
--- /dev/null
+++ b/SOURCES/dracut-module-setup.sh
@@ -0,0 +1,420 @@
+#!/bin/bash
+
+. $dracutfunctions
+. /lib/kdump/kdump-lib.sh
+
+check() {
+    [[ $debug ]] && set -x
+    #kdumpctl sets this explicitly
+    if [ -z "$IN_KDUMP" ] || [ ! -f /etc/kdump.conf ]
+    then
+        return 1
+    fi
+    return 0
+}
+
+depends() {
+    local _dep="base shutdown"
+
+    if [ -d /sys/module/drm/drivers ]; then
+        _dep="$_dep drm"
+    fi
+
+    echo $_dep
+    return 0
+}
+
+kdump_to_udev_name() {
+    local dev="${1//\"/}"
+
+    case "$dev" in
+    UUID=*)
+        dev=`blkid -U "${dev#UUID=}"`
+        ;;
+    LABEL=*)
+        dev=`blkid -L "${dev#LABEL=}"`
+        ;;
+    esac
+    echo $(get_persistent_dev "$dev")
+}
+
+kdump_is_bridge() {
+     [ -d /sys/class/net/"$1"/bridge ]
+}
+
+kdump_is_bond() {
+     [ -d /sys/class/net/"$1"/bonding ]
+}
+
+kdump_is_team() {
+     [ -f /usr/bin/teamnl ] && teamnl $1 ports &> /dev/null
+}
+
+kdump_is_vlan() {
+     [ -f /proc/net/vlan/"$1" ]
+}
+
+# $1: netdev name
+kdump_setup_dns() {
+    _dnsfile=${initdir}/etc/cmdline.d/42dns.conf
+    . /etc/sysconfig/network-scripts/ifcfg-$1
+    [ -n "$DNS1" ] && echo "nameserver=$DNS1" > "$_dnsfile"
+    [ -n "$DNS2" ] && echo "nameserver=$DNS2" >> "$_dnsfile"
+}
+
+#$1: netdev name
+#checking /etc/sysconfig/network-scripts/ifcfg-$1,
+#if it use static ip echo it, or echo null
+kdump_static_ip() {
+    . /etc/sysconfig/network-scripts/ifcfg-$1
+    if [ -n "$IPADDR" ]; then
+       [ -z "$NETMASK" -a -n "$PREFIX" ] && \
+           NETMASK=$(ipcalc -m $IPADDR/$PREFIX | cut -d'=' -f2)
+       echo -n "${IPADDR}::${GATEWAY}:${NETMASK}::"
+    fi
+}
+
+kdump_get_mac_addr() {
+    cat /sys/class/net/$1/address
+}
+
+#Bonding or team master modifies the mac address
+#of its slaves, we should use perm address
+kdump_get_perm_addr() {
+    local addr=$(ethtool -P $1 | sed -e 's/Permanent address: //')
+    if [ -z "$addr" ] || [ "$addr" = "00:00:00:00:00:00" ]
+    then
+        derror "Can't get the permanent address of $1"
+    else
+        echo "$addr"
+    fi
+}
+
+kdump_setup_bridge() {
+    local _netdev=$1
+    local _brif _dev
+    for _dev in `ls /sys/class/net/$_netdev/brif/`; do
+        if kdump_is_bond "$_dev"; then
+            kdump_setup_bond "$_dev"
+        elif kdump_is_team "$_dev"; then
+            kdump_setup_team "$_dev"
+        elif kdump_is_vlan "$_dev"; then
+            kdump_setup_vlan "$_dev"
+        else
+            echo -n " ifname=$_dev:$(kdump_get_mac_addr $_dev)" >> ${initdir}/etc/cmdline.d/41bridge.conf
+        fi
+        _brif+="$_dev,"
+    done
+    echo " bridge=$_netdev:$(echo $_brif | sed -e 's/,$//')" >> ${initdir}/etc/cmdline.d/41bridge.conf
+}
+
+kdump_setup_bond() {
+    local _netdev=$1
+    local _dev
+    for _dev in `cat /sys/class/net/$_netdev/bonding/slaves`; do
+        echo -n " ifname=$_dev:$(kdump_get_perm_addr $_dev)" >> ${initdir}/etc/cmdline.d/42bond.conf
+    done
+    echo -n " bond=$_netdev:$(sed -e 's/ /,/g' /sys/class/net/$_netdev/bonding/slaves)" >> ${initdir}/etc/cmdline.d/42bond.conf
+    # Get bond options specified in ifcfg
+    . /etc/sysconfig/network-scripts/ifcfg-$_netdev
+    bondoptions="$(echo :$BONDING_OPTS | sed 's/\s\+/,/')"
+    echo "$bondoptions" >> ${initdir}/etc/cmdline.d/42bond.conf
+}
+
+kdump_setup_team() {
+    local _netdev=$1
+    local slaves _dev
+    for _dev in `teamnl $_netdev ports | awk -F':' '{print $2}'`; do
+        echo -n " ifname=$_dev:$(kdump_get_perm_addr $_dev)" >> ${initdir}/etc/cmdline.d/44team.conf
+        slaves+="$_dev,"
+    done
+    echo " team=$_netdev:$(echo $slaves | sed -e 's/,$//')" >> ${initdir}/etc/cmdline.d/44team.conf
+    #Buggy version teamdctl outputs to stderr!
+    #Try to use the latest version of teamd.
+    teamdctl "$_netdev" config dump > /tmp/$$-$_netdev.conf
+    if [ $? -ne 0 ]
+    then
+        derror "teamdctl failed."
+        exit 1
+    fi
+    inst_dir /etc/teamd
+    inst_simple /tmp/$$-$_netdev.conf "/etc/teamd/$_netdev.conf"
+    rm -f /tmp/$$-$_netdev.conf
+}
+
+kdump_setup_vlan() {
+    local _netdev=$1
+    local _phydev="$(awk '/^Device:/{print $2}' /proc/net/vlan/"$_netdev")"
+    local _netmac="$(kdump_get_mac_addr $_phydev)"
+
+    echo " vlan=$_netdev:$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf
+
+    #Just support vlan over bond, it is not easy
+    #to support all other complex setup
+    if kdump_is_bridge "$_phydev"; then
+        derror "Vlan over bridge is not supported!"
+        exit 1
+    elif kdump_is_team "$_phydev"; then
+        derror "Vlan over team is not supported!"
+        exit 1
+    elif kdump_is_bond "$_phydev"; then
+        kdump_setup_bond "$_phydev"
+    else
+        echo " vlan=$_netdev:$_phydev ifname=$_phydev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf
+    fi
+}
+
+# setup s390 znet cmdline
+# $1: netdev name
+kdump_setup_znet() {
+    local _options=""
+    . /etc/sysconfig/network-scripts/ifcfg-$1
+    for i in $OPTIONS; do
+        _options=${_options},$i
+    done
+    echo rd.znet=${NETTYPE},${SUBCHANNELS}${_options} > ${initdir}/etc/cmdline.d/30znet.conf
+}
+
+# Setup dracut to bringup a given network interface
+kdump_setup_netdev() {
+    local _netdev=$1
+    local _static _proto
+
+    if [ "$(uname -m)" = "s390x" ]; then
+        kdump_setup_znet $_netdev
+    fi
+
+    _netmac=$(kdump_get_mac_addr $_netdev)
+    _static=$(kdump_static_ip $_netdev)
+    if [ -n "$_static" ]; then
+        _proto=none
+    else
+        _proto=dhcp
+    fi
+
+    echo " ip=${_static}$_netdev:${_proto}" > ${initdir}/etc/cmdline.d/40ip.conf
+
+    if kdump_is_bridge "$_netdev"; then
+        kdump_setup_bridge "$_netdev"
+    elif kdump_is_bond "$_netdev"; then
+        kdump_setup_bond "$_netdev"
+    elif kdump_is_team "$_netdev"; then
+        kdump_setup_team "$_netdev"
+    elif kdump_is_vlan "$_netdev"; then
+        kdump_setup_vlan "$_netdev"
+    else
+        echo " ifname=$_netdev:$(kdump_get_mac_addr $_netdev)" >> ${initdir}/etc/cmdline.d/40ip.conf
+    fi
+
+    kdump_setup_dns "$_netdev"
+}
+
+#Function:kdump_install_net
+#$1: config values of net line in kdump.conf
+kdump_install_net() {
+    local _server _netdev
+    local config_val="$1"
+
+    _server=`echo $config_val | sed 's/.*@//' | cut -d':' -f1`
+
+    _need_dns=`echo $_server|grep "[a-zA-Z]"`
+    [ -n "$_need_dns" ] && _server=`getent hosts $_server|cut -d' ' -f1`
+
+    _netdev=`/sbin/ip route get to $_server 2>&1`
+    [ $? != 0 ] && echo "Bad kdump location: $config_val" && exit 1
+
+    #the field in the ip output changes if we go to another subnet
+    if [ -n "`echo $_netdev | grep via`" ]
+    then
+        # we are going to a different subnet
+        _netdev=`echo $_netdev|awk '{print $5;}'|head -n 1`
+    else
+        # we are on the same subnet
+        _netdev=`echo $_netdev|awk '{print $3}'|head -n 1`
+    fi
+
+    kdump_setup_netdev "${_netdev}"
+    #save netdev used for kdump as cmdline
+    echo "kdumpnic=${_netdev}" > ${initdir}/etc/cmdline.d/60kdumpnic.conf
+    echo "bootdev=${_netdev}" > ${initdir}/etc/cmdline.d/70bootdev.conf
+}
+
+#install kdump.conf and what user specifies in kdump.conf
+kdump_install_conf() {
+    sed -ne '/^#/!p' /etc/kdump.conf > /tmp/$$-kdump.conf
+
+    while read config_opt config_val;
+    do
+        # remove inline comments after the end of a directive.
+        config_val=$(strip_comments $config_val)
+        case "$config_opt" in
+        ext[234]|xfs|btrfs|minix|raw)
+            sed -i -e "s#$config_val#$(kdump_to_udev_name $config_val)#" /tmp/$$-kdump.conf
+            ;;
+        ssh|nfs)
+            kdump_install_net "$config_val"
+            ;;
+        kdump_pre|kdump_post|extra_bins)
+            dracut_install $config_val
+            ;;
+        core_collector)
+            dracut_install "${config_val%%[[:blank:]]*}"
+            ;;
+        esac
+    done < /etc/kdump.conf
+
+    inst "/tmp/$$-kdump.conf" "/etc/kdump.conf"
+    rm -f /tmp/$$-kdump.conf
+}
+
+kdump_iscsi_get_rec_val() {
+
+    local result
+
+    # The open-iscsi 742 release changed to using flat files in
+    # /var/lib/iscsi.
+
+    result=$(/sbin/iscsiadm --show -m session -r ${1} | grep "^${2} = ")
+    result=${result##* = }
+    echo $result
+}
+
+kdump_get_iscsi_initiator() {
+    local _initiator
+    local initiator_conf="/etc/iscsi/initiatorname.iscsi"
+
+    [ -f "$initiator_conf" ] || return 1
+
+    while read _initiator; do
+        [ -z "${_initiator%%#*}" ] && continue # Skip comment lines
+
+        case $_initiator in
+            InitiatorName=*)
+                initiator=${_initiator#InitiatorName=}
+                echo "rd.iscsi.initiator=${initiator}"
+                return 0;;
+            *) ;;
+        esac
+    done < ${initiator_conf}
+
+    return 1
+}
+
+# No ibft handling yet.
+kdump_setup_iscsi_device() {
+    local path=$1
+    local tgt_name; local tgt_ipaddr;
+    local username; local password; local userpwd_str;
+    local username_in; local password_in; local userpwd_in_str;
+    local netdev
+    local idev
+    local netroot_str ; local initiator_str;
+    local netroot_conf="${initdir}/etc/cmdline.d/50iscsi.conf"
+    local initiator_conf="/etc/iscsi/initiatorname.iscsi"
+
+    dinfo "Found iscsi component $1"
+
+    # Check once before getting explicit values, so we can output a decent
+    # error message.
+
+    if ! /sbin/iscsiadm -m session -r ${path} >/dev/null ; then
+        derror "Unable to find iscsi record for $path"
+        return 1
+    fi
+
+    tgt_name=$(kdump_iscsi_get_rec_val ${path} "node.name")
+    tgt_ipaddr=$(kdump_iscsi_get_rec_val ${path} "node.conn\[0\].address")
+
+    # get and set username and password details
+    username=$(kdump_iscsi_get_rec_val ${path} "node.session.auth.username")
+    [ "$username" == "<empty>" ] && username=""
+    password=$(kdump_iscsi_get_rec_val ${path} "node.session.auth.password")
+    [ "$password" == "<empty>" ] && password=""
+    username_in=$(kdump_iscsi_get_rec_val ${path} "node.session.auth.username_in")
+    [ -n "$username" ] && userpwd_str="$username:$password"
+
+    # get and set incoming username and password details
+    [ "$username_in" == "<empty>" ] && username_in=""
+    password_in=$(kdump_iscsi_get_rec_val ${path} "node.session.auth.password_in")
+    [ "$password_in" == "<empty>" ] && password_in=""
+
+    [ -n "$username_in" ] && userpwd_in_str=":$username_in:$password_in"
+
+    netdev=$(/sbin/ip route get to ${tgt_ipaddr} | \
+        sed 's|.*dev \(.*\).*|\1|g' | awk '{ print $1; exit }')
+
+    kdump_setup_netdev $netdev
+
+    # prepare netroot= command line
+    # FIXME: IPV6 addresses require explicit [] around $tgt_ipaddr
+    # FIXME: Do we need to parse and set other parameters like protocol, port
+    #        iscsi_iface_name, netdev_name, LUN etc.
+
+    netroot_str="netroot=iscsi:${userpwd_str}${userpwd_in_str}@$tgt_ipaddr::::$tgt_name"
+
+    [[ -f $netroot_conf ]] || touch $netroot_conf
+
+    # If netroot target does not exist already, append.
+    if ! grep -q $netroot_str $netroot_conf; then
+         echo $netroot_str >> $netroot_conf
+         dinfo "Appended $netroot_str to $netroot_conf"
+    fi
+
+    # Setup initator
+    initiator_str=$(kdump_get_iscsi_initiator)
+    [ $? -ne "0" ] && derror "Failed to get initiator name" && return 1
+
+    # If initiator details do not exist already, append.
+    if ! grep -q "$initiator_str" $netroot_conf; then
+         echo "$initiator_str" >> $netroot_conf
+         dinfo "Appended "$initiator_str" to $netroot_conf"
+    fi
+}
+
+kdump_check_iscsi_targets () {
+    # If our prerequisites are not met, fail anyways.
+    type -P iscsistart >/dev/null || return 1
+
+    kdump_check_setup_iscsi() (
+        local _dev
+        _dev=$1
+
+        [[ -L /sys/dev/block/$_dev ]] || return
+        cd "$(readlink -f /sys/dev/block/$_dev)"
+        until [[ -d sys || -d iscsi_session ]]; do
+            cd ..
+        done
+        [[ -d iscsi_session ]] && kdump_setup_iscsi_device "$PWD"
+    )
+
+    [[ $hostonly ]] || [[ $mount_needs ]] && {
+        for_each_host_dev_and_slaves_all kdump_check_setup_iscsi
+    }
+}
+
+
+install() {
+    kdump_install_conf
+    >"$initdir/lib/dracut/no-emergency-shell"
+
+    if is_ssh_dump_target; then
+        dracut_install /var/lib/random-seed || exit $?
+    fi
+    dracut_install -o /etc/adjtime /etc/localtime
+    inst "$moddir/monitor_dd_progress" "/kdumpscripts/monitor_dd_progress"
+    chmod +x ${initdir}/kdumpscripts/monitor_dd_progress
+    inst "/bin/dd" "/bin/dd"
+    inst "/bin/tail" "/bin/tail"
+    inst "/bin/date" "/bin/date"
+    inst "/bin/sync" "/bin/sync"
+    inst "/bin/cut" "/bin/cut"
+    inst "/sbin/makedumpfile" "/sbin/makedumpfile"
+    inst "/sbin/vmcore-dmesg" "/sbin/vmcore-dmesg"
+    inst_hook pre-pivot 9999 "$moddir/kdump.sh"
+    inst "/lib/kdump/kdump-lib.sh" "/lib/kdump-lib.sh"
+
+    # Check for all the devices and if any device is iscsi, bring up iscsi
+    # target. Ideally all this should be pushed into dracut iscsi module
+    # at some point of time.
+    kdump_check_iscsi_targets
+}
diff --git a/SOURCES/dracut-monitor_dd_progress b/SOURCES/dracut-monitor_dd_progress
new file mode 100644
index 0000000..e139d33
--- /dev/null
+++ b/SOURCES/dracut-monitor_dd_progress
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+SRC_FILE_MB=$1
+
+while true
+do
+    DD_PID=`pidof dd`
+    if [ -n "$DD_PID" ]; then
+        break
+    fi
+done
+
+while true
+do
+    sleep 5
+    if [ ! -d /proc/$DD_PID ]; then
+        break
+    fi
+
+    kill -s USR1 $DD_PID
+    CURRENT_SIZE=`tail -n 1 /tmp/dd_progress_file | sed "s/[^0-9].*//g"`
+    [ -n "$CURRENT_SIZE" ] && {
+        CURRENT_MB=$(($CURRENT_SIZE / 1048576))
+        echo -e "Copied $CURRENT_MB MB / $SRC_FILE_MB MB\r"
+    }
+done
+
+rm -f /tmp/dd_progress_file
diff --git a/SOURCES/firstboot_kdump.py b/SOURCES/firstboot_kdump.py
new file mode 100755
index 0000000..2bdec5b
--- /dev/null
+++ b/SOURCES/firstboot_kdump.py
@@ -0,0 +1,497 @@
+#
+# firstboot_kdump.py - kdump configuration page for firstboot
+# Copyright 2006 Red Hat, Inc.
+# Author: Jarod Wilson <jwilson@redhat.com>
+# Contributors:
+#	 Neil Horman <nhorman@redhat.com>
+#	 Dave Lehman <dlehman@redhat.com>
+#
+#
+# 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, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+import sys
+sys.path.append('/usr/share/system-config-kdump/')
+
+from gtk import *
+import string
+import os
+import os.path
+import time
+import gtk
+import gobject
+import commands
+from firstboot.config import *
+from firstboot.constants import *
+from firstboot.functions import *
+from firstboot.module import *
+import gettext
+_ = lambda x: gettext.ldgettext("kexec-tools", x)
+N_ = lambda x: x
+
+class moduleClass(Module):
+	def __init__(self):
+		Module.__init__(self)
+		self.priority = 100
+		self.sidebarTitle = N_("Kdump")
+		self.title = N_("Kdump")
+		self.reboot = False
+
+	# runPriority determines the order in which this module runs in firstboot
+	runPriority = 70
+	moduleName = _("Kdump")
+	windowName = moduleName
+	reboot = False
+
+	# possible bootloaders we'll need to adjust
+	#			 bootloader : (config file, kdump offset)
+	bootloaders = { "grub"   : (["/boot/grub/grub.conf", \
+				"/boot/efi/EFI/redhat/grub.conf"], [16, 256]),\
+			"grub2"   : (["/boot/grub2/grub.cfg", \
+				"/boot/efi/EFI/fedora/grub.cfg", \
+				"/boot/efi/EFI/redhat/grub.cfg"], [16, 256]),\
+			"zipl" : (["/etc/zipl.conf"], [0]),\
+			"yaboot" : (["/boot/etc/yaboot.conf"], [32]) }
+	bootloader = None
+	offset = 0
+
+	# list of architectures without kdump support
+	unsupportedArches = [ "ppc", "s390", "i386", "i586" ]
+
+	def needsReboot(self):
+		return self.reboot
+
+	# toggle sensitivity of kdump config bits
+	def showHideReserve(self, status):
+		self.labelKdump.set_sensitive(status)
+		self.kdumpMemspin.set_sensitive(status)
+		self.totalMem.set_sensitive(status)
+		self.systemUsableMem.set_sensitive(status)
+		self.labelTotal.set_sensitive(status)
+		self.labelSys.set_sensitive(status)
+
+	# toggle sensitivity of kdump config bits
+	def showHide(self, status):
+		show_kdumpmem = status
+		if self.distro == 'rhel':
+			show_autoreserve = self.buttonAuto.get_active()
+			if status == True:
+				if self.buttonAuto.get_active() == True:
+					show_kdumpmem = False
+			self.buttonAuto.set_active(show_autoreserve)
+			self.buttonManual.set_active(not show_autoreserve)
+			self.labelReserve.set_sensitive(status)
+			self.buttonAuto.set_sensitive(status)
+			self.buttonManual.set_sensitive(status)
+		self.showHideReserve(show_kdumpmem)
+		self.labelReserved.set_sensitive(status)
+		self.labelReservedMemsize.set_sensitive(status)
+		self.kdumpEnabled = status
+		self.AdvWindow.set_sensitive(status)
+
+	def on_enableKdumpCheck_toggled(self, *args):
+		showHideStatus = self.enableKdumpCheck.get_active()
+		self.showHide(showHideStatus)
+
+	def on_auto_toggled(self, *args):
+		if self.distro == 'rhel':
+			self.showHideReserve(not self.buttonAuto.get_active())
+
+	def on_manual_toggled(self, *args):
+		if self.distro == 'rhel':
+			self.showHideReserve(self.buttonManual.get_active())
+
+	def updateAvail(self, widget, spin):
+		self.reserveMem = eval(string.strip(self.kdumpMemspin.get_text()))
+		self.remainingMem = self.availMem - self.reserveMem
+		self.systemUsableMem.set_text("%s" % self.remainingMem)
+
+	def getBootloader(self):
+		for (name, (conf, offset)) in self.bootloaders.items():
+			i = 0
+			for c in conf:
+				if os.access(c, os.W_OK):
+					self.bootloader = name
+					self.offset = i
+					return self.bootloader
+				i += 1
+
+		self.offset = None
+		self.bootloader = None
+		return None
+
+	def createScreen(self, doDebug = None):
+		self.doDebug = doDebug
+
+		if doDebug:
+			print "initializing kdump module"
+
+		# What kernel are we running?
+		self.runningKernel = os.popen("/bin/uname -r").read().strip()
+
+		# What arch are we running on?
+		self.arch = os.popen("/bin/uname -m").read().strip()
+
+		# Check for a xen kernel, kdump doesn't work w/xen just yet...
+		self.xenKernel = self.runningKernel.find("xen")
+
+		# Fedora or RHEL?
+		releaseFile = '/etc/redhat-release'
+		lines = open(releaseFile).readlines()
+		for line in lines:
+			if line.find("Fedora") != -1:
+				self.distro = 'fedora'
+			else:
+				self.distro = 'rhel'
+
+		# Ascertain how much memory is in the system
+		memInfo = open("/proc/meminfo").readlines()
+		self.availMem = 0
+		for line in memInfo:
+				if line.startswith("MemTotal:"):
+					self.availMem = int(line.split()[1]) / 1024
+					break
+
+		# Fix up memory calculations if kdump is already on
+		cmdLine = open("/proc/cmdline").read()
+		self.kdumpOffset = 0
+		self.origCrashKernel = ""
+		self.kdumpEnabled = False
+		chkConfigStatus=commands.getoutput('/bin/systemctl is-enabled kdump.service')
+		if chkConfigStatus.find("enabled") > -1:
+			self.kdumpEnabled = True
+		self.kdumpMemInitial = 0
+
+		crashString = ""
+		kexec_crash_size = open("/sys/kernel/kexec_crash_size").read()
+		self.reservedMem = int(kexec_crash_size)/(1024*1024)
+
+		if cmdLine.find("crashkernel") != -1:
+			crashString = filter(lambda t: t.startswith("crashkernel="),
+					 cmdLine.split())[0].split("=")[1]
+			self.origCrashKernel = "crashkernel=%s" % (crashString)
+			if self.doDebug:
+				print "crashString is %s" % crashString
+			if crashString.find("@") != -1:
+				(self.kdumpMemInitial, self.kdumpOffset) = [int(m[:-1]) for m in crashString.split("@")]
+			else:
+				#kdumpMemInitial = -1 means auto reservation
+				if self.distro == 'rhel' and self.origCrashKernel == 'crashkernel=auto':
+					self.kdumpMemInitial=-1
+				else:
+					self.kdumpMemInitial=int(crashString[:-1])
+				self.kdumpOffset = 0
+		if self.kdumpMemInitial != 0:
+			self.availMem += self.reservedMem
+			self.kdumpEnabled = True
+		else:
+			self.kdumpEnabled = False
+			if self.origCrashKernel.find("crashkernel=") != -1:
+				self.kdumpEnabled = True
+
+		self.initialState = self.kdumpEnabled
+
+		# Do some sanity-checking and try to present only sane options.
+		#
+		# Defaults
+		lowerBound = 128
+		minUsable = 256
+		step = 1
+		self.enoughMem = True
+		if self.arch == 'ia64':
+			# ia64 usually needs at *least* 256M, page-aligned... :(
+			lowerBound = 256
+			minUsable = 512
+			step = 256
+		elif self.arch == 'ppc64':
+			# ppc64 often fails w/128M lately, and we want at least 1G
+			# of RAM for normal use, due to 64k page size... :\
+			lowerBound = 256
+			minUsable = 1024
+
+		upperBound = (self.availMem - minUsable) - (self.availMem % step)
+
+		if upperBound < lowerBound:
+			self.enoughMem = False
+
+		# Set spinner to lowerBound unless already set on kernel command line
+		if self.kdumpMemInitial == 0 or  self.kdumpMemInitial == -1:
+			self.kdumpMemInitial = lowerBound
+		else:
+			# round down to a multiple of step value
+			self.kdumpMemInitial = self.kdumpMemInitial - (self.kdumpMemInitial % step)
+
+		# kdump enable/disable checkbox
+		self.enableKdumpCheck = gtk.CheckButton(_("_Enable kdump?"))
+		self.enableKdumpCheck.set_alignment(xalign=0, yalign=0)
+
+		# detected total amount of system memory
+		self.totalMem = gtk.Label(_("%s" % self.availMem))
+		self.labelTotal = gtk.Label(_("Total System Memory (MB):"))
+		self.labelTotal.set_alignment(0.0, 0.5)
+		self.labelTotal.set_width_chars(32)
+
+		# how much ram to reserve for kdump
+		self.memAdjustment = gtk.Adjustment(self.kdumpMemInitial, lowerBound, upperBound, step, step, 0)
+		self.kdumpMemspin = gtk.SpinButton(self.memAdjustment, 0, 0)
+		self.kdumpMemspin.set_update_policy(gtk.UPDATE_IF_VALID)
+		self.kdumpMemspin.set_numeric(True)
+		self.memAdjustment.connect("value_changed", self.updateAvail, self.kdumpMemspin)
+		self.labelKdump = gtk.Label(_("Memory To Be _Reserved (MB):"))
+		self.labelKdump.set_use_underline(True)
+		self.labelKdump.set_mnemonic_widget(self.kdumpMemspin)
+		self.labelKdump.set_alignment(0.0, 0.5)
+
+		# remaining usable system memory
+		self.reserveMem = eval(string.strip(self.kdumpMemspin.get_text()))
+		self.remainingMem = self.availMem - self.reserveMem
+		self.systemUsableMem = gtk.Label(_("%s" % self.remainingMem))
+		self.labelSys = gtk.Label(_("Usable System Memory (MB):"))
+		self.labelSys.set_alignment(0.0, 0.5)
+
+		self.labelReserved=gtk.Label(_("Memory Currently Reserved (MB):"))
+		self.labelReservedMemsize=gtk.Label(_("%s" % self.reservedMem))
+		self.labelReserved.set_alignment(0.0, 0.5)
+
+		# rhel crashkernel=auto handling
+		if self.distro == 'rhel':
+			self.labelReserve = gtk.Label(_("Kdump Memory Reservation:"))
+			self.buttonAuto = gtk.RadioButton(None, _("_Automatic"))
+			self.buttonManual = gtk.RadioButton(self.buttonAuto, _("_Manual"))
+			self.buttonAuto.connect("toggled", self.on_auto_toggled, None)
+			self.buttonManual.connect("toggled", self.on_manual_toggled, None)
+			self.buttonAuto.set_use_underline(True)
+			self.buttonManual.set_use_underline(True)
+			self.labelReserve.set_alignment(0.0, 0.5)
+			if self.origCrashKernel == 'crashkernel=auto':
+				self.buttonAuto.set_active(True)
+				self.buttonManual.set_active(False)
+			else:
+				self.buttonAuto.set_active(False)
+				self.buttonManual.set_active(True)
+			self.autoinitial = self.buttonAuto.get_active()
+
+
+		# Add an advanced kdump config text widget
+		inputbuf = open("/etc/kdump.conf", "r")
+		self.AdvConfig = gtk.TextView()
+		AdvBuf = gtk.TextBuffer()
+		AdvBuf.set_text(inputbuf.read())
+		inputbuf.close()
+
+		self.AdvConfig.set_buffer(AdvBuf)
+		self.AdvWindow = gtk.ScrolledWindow()
+		self.AdvWindow.set_shadow_type(gtk.SHADOW_IN)
+		self.AdvWindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+		self.AdvWindow.set_size_request(500, 300)
+		self.AdvWindow.add(self.AdvConfig)
+
+		self.AdvConfLabel = gtk.Label(_("\nAdvanced kdump configuration"))
+		self.AdvConfLabel.set_alignment(0.0, 0.5)
+
+		self.vbox = gtk.VBox()
+		self.vbox.set_size_request(400, 200)
+
+		# title_pix = loadPixbuf("workstation.png")
+
+		internalVBox = gtk.VBox()
+		internalVBox.set_border_width(10)
+		internalVBox.set_spacing(10)
+
+		label = gtk.Label(_("Kdump is a kernel crash dumping mechanism. In the event of a "
+							"system crash, kdump will capture information from your system "
+							"that can be invaluable in determining the cause of the crash. "
+							"Note that kdump does require reserving a portion of system "
+							"memory that will be unavailable for other uses."))
+
+		label.set_line_wrap(True)
+		label.set_alignment(0.0, 0.5)
+		label.set_size_request(500, -1)
+		internalVBox.pack_start(label, False, True)
+
+		if self.distro == 'rhel':
+			table = gtk.Table(3, 100)
+			table.attach(self.enableKdumpCheck, 0, 3, 0, 1, gtk.FILL, gtk.FILL, 5, 5)
+			table.attach(self.labelReserve, 0, 1, 1, 2, gtk.FILL)
+			table.attach(self.buttonAuto, 1, 2, 1, 2, gtk.FILL, gtk.FILL, 5, 5)
+			table.attach(self.buttonManual, 2, 3, 1, 2, gtk.FILL, gtk.FILL, 5, 5)
+			table.attach(self.labelReserved, 0, 1, 2, 3, gtk.FILL)
+			table.attach(self.labelReservedMemsize, 2, 3, 2, 3, gtk.SHRINK, gtk.FILL, 5, 5)
+			table.attach(self.labelKdump, 0, 1, 3, 4, gtk.FILL)
+			table.attach(self.kdumpMemspin, 2, 3, 3, 4, gtk.SHRINK, gtk.FILL, 5, 5)
+			table.attach(self.labelTotal, 0, 1, 4, 5, gtk.FILL)
+			table.attach(self.totalMem, 2, 3, 4, 5, gtk.SHRINK, gtk.FILL, 5, 5)
+			table.attach(self.labelSys, 0, 1, 5, 6, gtk.FILL)
+			table.attach(self.systemUsableMem, 2, 3, 5, 6, gtk.SHRINK, gtk.FILL, 5, 5)
+			table.attach(self.AdvConfLabel, 0, 1, 6, 7, gtk.FILL)
+			table.attach(self.AdvWindow, 0, 3, 7, 100, gtk.FILL, gtk.FILL, 5, 5)
+		else:
+			table = gtk.Table(2, 100)
+			table.attach(self.enableKdumpCheck, 0, 2, 0, 1, gtk.FILL, gtk.FILL, 5, 5)
+			table.attach(self.labelTotal, 0, 1, 1, 2, gtk.FILL)
+			table.attach(self.totalMem, 1, 2, 1, 2, gtk.SHRINK, gtk.FILL, 5, 5)
+
+			table.attach(self.labelKdump, 0, 1, 2, 3, gtk.FILL)
+			table.attach(self.kdumpMemspin, 1, 2, 2, 3, gtk.SHRINK, gtk.FILL, 5, 5)
+
+			table.attach(self.labelReserved, 0, 1, 3, 4, gtk.FILL)
+			table.attach(self.labelReservedMemsize, 1, 2, 3, 4, gtk.SHRINK, gtk.FILL, 5, 5)
+
+			table.attach(self.labelSys, 0, 1, 4, 5, gtk.FILL)
+			table.attach(self.systemUsableMem, 1, 2, 4, 5, gtk.SHRINK, gtk.FILL, 5, 5)
+
+			table.attach(self.AdvConfLabel, 0, 1, 6, 7, gtk.FILL)
+			table.attach(self.AdvWindow, 0, 2, 7, 100, gtk.FILL, gtk.FILL, 5, 5)
+
+		# disable until user clicks check box, if not already enabled
+		if self.initialState is False:
+			self.showHide(False)
+		else:
+			self.enableKdumpCheck.set_active(True)
+			self.showHide(True)
+
+		internalVBox.pack_start(table, True, 15)
+
+		# toggle sensitivity of Mem items
+		self.enableKdumpCheck.connect("toggled", self.on_enableKdumpCheck_toggled)
+
+		self.vbox.pack_start(internalVBox, False, 15)
+
+	def grabFocus(self):
+		self.enableKdumpCheck.grab_focus()
+
+	def configChanged(self):
+		if self.initialState == self.kdumpEnabled and self.initialState == False:
+			return False
+		if self.initialState != self.kdumpEnabled \
+		or (self.distro == 'rhel' and self.autoinitial != self.buttonAuto.get_active()) \
+		or (self.distro == 'rhel' and self.buttonManual.get_active() == True and self.reserveMem != self.kdumpMemInitial) \
+		or (self.distro != 'rhel' and self.reserveMem != self.kdumpMemInitial):
+			return True
+		return False
+
+
+	def apply(self, *args):
+		if self.kdumpEnabled:
+			self.reserveMem = self.kdumpMemspin.get_value_as_int()
+		else:
+			self.reserveMem = self.kdumpMemInitial
+		self.remainingMem = self.availMem - self.reserveMem
+		if self.doDebug:
+			print "Running kernel %s on %s architecture" % (self.runningKernel, self.arch)
+			if self.enableKdumpCheck.get_active():
+				print "System Mem: %s MB	Kdump Mem: %s MB	Avail Mem: %s MB" % (totalSysMem, self.reserveMem, self.remainingMem)
+			else:
+				print "Kdump will be disabled"
+
+		# Before we do other checks we should save the users config
+		AdvBuf = self.AdvConfig.get_buffer()
+		start, end = AdvBuf.get_bounds()
+		outputbuf = open("/etc/kdump.conf", "rw+")
+		outputbuf.write(AdvBuf.get_text(start, end))
+		outputbuf.close()
+
+		# Regardless of what else happens we need to be sure to disalbe kdump if its disabled here, or
+		# else it will fail during startup
+		if (self.enableKdumpCheck.get_active() == False):
+			os.system("/bin/systemctl disable kdump.service")
+
+		# If the user simply doesn't have enough memory for kdump to be viable/supportable, tell 'em
+		if self.enoughMem is False and self.kdumpEnabled:
+			self.showErrorMessage(_("Sorry, your system does not have enough memory for kdump to be viable!"))
+			self.enableKdumpCheck.set_active(False)
+			self.showHide(False)
+			return RESULT_FAILURE 
+		# Alert user that we're not going to turn on kdump if they're running a xen kernel
+		elif self.xenKernel != -1 and self.kdumpEnabled:
+			self.showErrorMessage(_("Sorry, Xen kernels do not support kdump at this time!"))
+			self.enableKdumpCheck.set_active(False)
+			self.showHide(False)
+			return RESULT_FAILURE 
+		# If there's no kdump support on this arch, let the user know and don't configure
+		elif self.arch in self.unsupportedArches:
+			self.showErrorMessage(_("Sorry, the %s architecture does not support kdump at this time!" % self.arch))
+			self.enableKdumpCheck.set_active(False)
+			self.showHide(False)
+			return RESULT_FAILURE 
+
+		# Don't alert if nothing has changed
+		if self.configChanged() == True:
+			dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO,
+									gtk.BUTTONS_YES_NO,
+									_("Changing Kdump settings requires rebooting the "
+									  "system to reallocate memory accordingly. Would you "
+									  "like to continue with this change and reboot the "
+									  "system after firstboot is complete?"))
+			dlg.set_position(gtk.WIN_POS_CENTER)
+			dlg.show_all()
+			rc = dlg.run()
+			dlg.destroy()
+
+			if rc != gtk.RESPONSE_YES:
+				self.reboot = False
+				return RESULT_SUCCESS 
+			else:
+				self.reboot = True
+
+				# Find bootloader if it exists, and update accordingly
+				if self.getBootloader() == None:
+					self.showErrorMessage(_("Error! No bootloader config file found, aborting configuration!"))
+					self.enableKdumpCheck.set_active(False)
+					self.showHide(False)
+					return RESULT_FAILURE 
+
+				# Are we adding or removing the crashkernel param?
+				if self.kdumpEnabled:
+					_reserves = "%iM" % (self.reserveMem)
+					if self.distro == 'rhel':
+						if self.buttonAuto.get_active() == True:
+							_reserves = 'auto'
+
+					grubbyCmd = "/sbin/grubby --%s --update-kernel=ALL --args=crashkernel=%s" \
+								% (self.bootloader, _reserves)
+					chkconfigStatus = "enable"
+				else:
+					grubbyCmd = "/sbin/grubby --%s --update-kernel=ALL --remove-args=%s" \
+								% (self.bootloader, self.origCrashKernel)
+					chkconfigStatus = "disable"
+
+				if self.doDebug:
+					print "Using %s bootloader with %iM offset" % (self.bootloader, self.offset)
+					print "Grubby command would be:\n	%s" % grubbyCmd
+					print "chkconfig status is %s" % chkconfigStatus
+				else:
+					os.system(grubbyCmd)
+					os.system("/bin/systemctl %s kdump.service" % (chkconfigStatus))
+					if self.bootloader == 'yaboot':
+						os.system('/sbin/ybin')
+					if self.bootloader == 'zipl':
+						os.system('/sbin/zipl')
+		else:
+			self.reboot = False
+
+
+		return RESULT_SUCCESS
+
+	def showErrorMessage(self, text):
+		dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, text)
+		dlg.set_position(gtk.WIN_POS_CENTER)
+		dlg.set_modal(True)
+		rc = dlg.run()
+		dlg.destroy()
+		return None
+
+	def initializeUI(self):
+		pass
+
diff --git a/SOURCES/kdump-lib.sh b/SOURCES/kdump-lib.sh
new file mode 100755
index 0000000..e73ac09
--- /dev/null
+++ b/SOURCES/kdump-lib.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# Kdump common functions
+#
+
+is_ssh_dump_target()
+{
+    grep -q "^ssh[[:blank:]].*@" /etc/kdump.conf
+}
+
+is_nfs_dump_target()
+{
+    grep -q "^nfs" /etc/kdump.conf
+}
+
+is_raw_dump_target()
+{
+    grep -q "^raw" /etc/kdump.conf
+}
+
+strip_comments()
+{
+    echo $@ | sed -e 's/\(.*\)#.*/\1/'
+}
diff --git a/SOURCES/kdump.conf b/SOURCES/kdump.conf
new file mode 100644
index 0000000..c5cfb4a
--- /dev/null
+++ b/SOURCES/kdump.conf
@@ -0,0 +1,143 @@
+# Configures where to put the kdump /proc/vmcore files
+#
+# This file contains a series of commands to perform (in order) when a
+# kernel crash has happened and the kdump kernel has been loaded.  Directives in
+# this file are only applicable to the kdump initramfs, and have no effect if
+# the root filesystem is mounted and the normal init scripts are processed
+#
+# Currently only one dump target and path may be configured at once
+# if the configured dump target fails, the default action will be preformed
+# the default action may be configured with the default directive below.  If the
+# configured dump target succedes 
+#
+# Basics commands supported are:
+# raw <partition>	- Will dd /proc/vmcore into <partition>.
+#			  Use persistent device names for partition devices,
+#			  such as /dev/vg/<devname>.
+#
+# nfs <nfs mount>	- Will mount fs and copy /proc/vmcore to
+#			  <mnt>/var/crash/%HOST-%DATE/, supports DNS.
+#
+# ssh <user@server>	- Will scp /proc/vmcore to
+#			  <user@server>:/var/crash/%HOST-%DATE/, supports DNS
+#			  NOTE: make sure user has necessary write
+#			  permissions on server
+#
+# sshkey <path>		- Will use the sshkey to do ssh dump
+#			  Specifies the path of the ssh key you want to use
+#			  when do ssh dump, the default value is
+#			  /root/.ssh/kdump_id_rsa.
+#
+# <fs type> <partition> - Will mount -t <fs type> <partition> /mnt and copy
+#		 	  /proc/vmcore to /mnt/var/crash/%DATE/.
+#			  NOTE: <partition> can be a device node, label or uuid.
+#			  It's recommended to use persistent device names
+#			  such as /dev/vg/<devname>.
+#			  Otherwise it's suggested to use label or uuid.
+#
+# path <path> 		- Append path to the filesystem device which you are
+#			  dumping to.  Ignored for raw device dumps.
+#		 	  If unset, will default to /var/crash.
+#
+# core_collector <command> <options>
+#			- This allows you to specify the command to copy
+#			  the vmcore.  You could use the dump filtering
+#			  program makedumpfile, the default one, to retrieve
+#			  your core, which on some arches can drastically
+#			  reduce core file size. See /sbin/makedumpfile --help
+#			  for a list of options. Note that the -i and -g
+#			  options are not needed here, as the initrd will
+#			  automatically be populated with a config file
+#			  appropriate for the running kernel.
+#			  Default core_collector for raw/ssh dump is:
+#			  "makedumpfile -F -c --message-level 1 -d 31".
+#			  Default core_collector for other targets is:
+#			  "makedumpfile -c --message-level 1 -d 31".
+#			  For core_collector format details please refer to
+#			  kexec-kdump-howto.txt or kdump.conf manpage.
+#
+# kdump_post <binary | script>
+# 			- This directive allows you to run a specified
+# 			  executable just after the memory dump process
+# 			  terminates. The exit status from the dump process
+# 			  is fed to the kdump_post executable, which can be
+# 			  used to trigger different actions for success or
+# 			  failure.
+#
+# kdump_pre <binary | script>
+#			- works just like the kdump_post directive, but instead
+#			  of running after the dump process, runs immediately
+#			  before.  Exit status of this binary is interpreted
+#			  as follows:
+#			  0 - continue with dump process as usual
+#			  non 0 - reboot the system
+#
+# extra_bins <binaries | shell scripts>
+# 			- This directive allows you to specify additional
+# 			  binaries or shell scripts you'd like to include in
+# 			  your kdump initrd. Generally only useful in
+# 			  conjunction with a kdump_post binary or script that
+# 			  relies on other binaries or scripts.
+#
+# extra_modules <module(s)>
+# 			- This directive allows you to specify extra kernel
+# 			  modules that you want to be loaded in the kdump
+# 			  initrd, typically used to set up access to
+# 			  non-boot-path dump targets that might otherwise
+# 			  not be accessible in the kdump environment. Multiple
+# 			  modules can be listed, separated by a space, and any
+# 			  dependent modules will automatically be included.
+#
+# default <reboot | halt | poweroff | shell | dump_to_rootfs>
+#			- Action to preform in case dumping to intended target
+#			  fails. If no default action is specified, "reboot" 
+#			  is assumed default.
+#			  reboot: If the default action is reboot simply reboot
+#				  the system and loose the core that you are
+#				  trying to retrieve.
+#			  halt:   If the default action is halt, then simply
+#				  halt the system after attempting to capture
+#				  a vmcore, regardless of success or failure.
+#			  poweroff: The system will be powered down
+#			  shell:  If the default action is shell, then drop to
+#				  an shell session inside the initramfs from
+#				  where you can try to record the core manually.
+#				  Exiting this shell reboots the system.
+#				  Note: kdump uses bash as the default shell.
+#			  dump_to_rootfs: If non-root dump target is specified,
+#				  the default action can be set as dump_to_rootfs.
+#				  That means when dump to target fails, dump vmcore
+#				  to rootfs from initramfs context and reboot. 
+#
+# force_rebuild <0 | 1>
+#			- By default, kdump initrd only will be rebuilt when
+#			  necessary. Specify 1 to force rebuilding kdump
+#			  initrd every time when kdump service starts.
+#
+#override_resettable <0 | 1>
+#			- Usually a unresettable block device can't be dump target.
+#			Specifying 1 means though block target is unresettable, user
+#			understand this situation and want to try dumping. By default,
+#			it's set to 0, means not to try a destined failure.
+#
+# dracut_args <arg(s)>
+#			- Pass extra dracut options when rebuilding kdump
+#			  initrd.
+
+#raw /dev/vg/lv_kdump
+#ext4 /dev/vg/lv_kdump
+#ext4 LABEL=/boot
+#ext4 UUID=03138356-5e61-4ab3-b58e-27507ac41937
+#nfs my.server.com:/export/tmp
+#ssh user@my.server.com
+#sshkey /root/.ssh/kdump_id_rsa
+path /var/crash
+#core_collector makedumpfile -c --message-level 1 -d 31
+#core_collector scp
+#kdump_post /var/crash/scripts/kdump-post.sh
+#kdump_pre /var/crash/scripts/kdump-pre.sh
+#extra_bins /usr/bin/lftp
+#extra_modules gfs2
+#default shell
+#force_rebuild 1
+#dracut_args --omit-drivers "cfg80211 snd" --add-drivers "ext2 ext3"
diff --git a/SOURCES/kdump.conf.5 b/SOURCES/kdump.conf.5
new file mode 100644
index 0000000..6f88370
--- /dev/null
+++ b/SOURCES/kdump.conf.5
@@ -0,0 +1,316 @@
+.TH KDUMP.CONF 5 "07/23/2008" "kexec-tools"
+
+.SH NAME
+kdump.conf \- configuration file for kdump kernel.
+
+.SH DESCRIPTION 
+
+kdump.conf is a configuration file for the kdump kernel crash
+collection service.
+
+kdump.conf provides post-kexec instructions to the kdump kernel. It is
+stored in the initrd file managed by the kdump service. If you change
+this file and do not want to restart before it takes effect, restart
+the kdump service to rebuild to initrd.
+
+For most configurations, you can simply review the examples provided
+in the stock /etc/kdump.conf.
+
+.B NOTE: 
+For filesystem dump the dump target must be mounted before building
+kdump initramfs.
+
+kdump.conf only affects the behavior of the initramfs.  Please read the
+kdump operational flow section of kexec-kdump-howto.txt in the docs to better
+understand how this configuration file affects the behavior of kdump.
+
+.SH OPTIONS
+
+.B raw <partition>
+.RS
+Will dd /proc/vmcore into <partition>.  Use persistent device names for
+partition devices, such as /dev/vg/<devname>.
+.RE
+
+.B nfs <nfs mount>
+.RS
+Will mount fs and copy /proc/vmcore to <mnt>/var/crash/%HOST-%DATE/,
+supports DNS. Note that a fqdn should be used as the server name in the 
+mount point
+.RE
+
+.B ssh <user@server>
+.RS
+Will scp /proc/vmcore to <user@server>:/var/crash/%HOST-%DATE/,
+supports DNS. NOTE: make sure user has necessary write permissions on
+server and that a fqdn is used as the server name
+.RE
+
+.B sshkey <path>
+.RS
+Specifies the path of the ssh key you want to use when do ssh dump,
+the default value is /root/.ssh/kdump_id_rsa.
+.RE
+
+.B <fs type> <partition>
+.RS
+Will mount -t <fs type> <partition> /mnt and copy /proc/vmcore to
+/mnt/var/crash/%DATE/.  NOTE: <partition> can be a device node, label
+or uuid.  It's recommended to use persistent device names such as
+/dev/vg/<devname>. Otherwise it's suggested to use label or uuid.
+.RE
+
+.B path <path>
+.RS
+Append path to the filesystem device which you are dumping to.
+Ignored for raw device dumps.  If unset, will default to /var/crash.
+.RE
+
+.B core_collector <command> <options>
+.RS
+This allows you to specify the command to copy the vmcore.
+You could use the dump filtering program makedumpfile, the default one,
+to retrieve your core, which on some arches can drastically reduce
+core file size.  See /sbin/makedumpfile --help for a list of options.
+Note that the -i and -g options are not needed here, as the initrd
+will automatically be populated with a config file appropriate
+for the running kernel.
+.PP
+Note 1: About default core collector:
+Default core_collector for raw/ssh dump is:
+"makedumpfile -F -c --message-level 1 -d 31".
+Default core_collector for other targets is:
+"makedumpfile -c --message-level 1 -d 31".
+Even if core_collector option is commented out in kdump.conf, makedumpfile
+is default core collector and kdump uses it internally.
+If one does not want makedumpfile as default core_collector, then they
+need to specify one using core_collector option to change the behavior.
+.PP
+Note 2: If "makedumpfile -F" is used then you will get a flattened format
+vmcore.flat, you will need to use "makedumpfile -R" to rearrange the
+dump data from stdard input to a normal dumpfile (readable with analysis
+tools).
+ie. "makedumpfile -R vmcore < vmcore.flat"
+
+.RE
+
+.B kdump_post <binary | script>
+.RS
+This directive allows you to run a specified
+executable just after the memory dump process
+terminates. The exit status from the dump process
+is fed to the kdump_post executable, which can be
+used to trigger different actions for success or
+failure.
+.PP
+Note that scripts written for use with this
+directive must use the /bin/bash interpreter
+.RE
+
+.B kdump_pre <binary | script>
+.RS
+Works just like the kdump_post directive, but instead
+of running after the dump process, runs immediately
+before.  Exit status of this binary is interpreted
+as follows:
+.PP
+0 - continue with dump process as usual
+.PP
+non 0 - reboot the system
+.PP
+Note that scripts written for this directive must use
+the /bin/bash interpreter
+.RE
+
+.B extra_bins <binaries | shell scripts>
+.RS
+This directive allows you to specify additional
+binaries or shell scripts you'd like to include in
+your kdump initrd. Generally only useful in
+conjunction with a kdump_post binary or script that
+relies on other binaries or scripts.
+.RE
+
+.B extra_modules <module(s)>
+.RS
+This directive allows you to specify extra kernel
+modules that you want to be loaded in the kdump
+initrd, typically used to set up access to
+non-boot-path dump targets that might otherwise
+not be accessible in the kdump environment. Multiple
+modules can be listed, separated by a space, and any
+dependent modules will automatically be included.
+.RE
+
+.B default <reboot | halt | poweroff | shell | dump_to_rootfs>
+.RS
+Action to preform in case dumping to intended target fails. If no default
+action is specified, "reboot" is assumed default.
+reboot: If the default action is reboot simply reboot the system (this is what
+most people will want, as it returns the system to a nominal state).  shell: If the default
+action is shell, then drop to an shell session inside the initramfs from
+where you can manually preform additional recovery actions.  Exiting this shell
+reboots the system.  halt: bring the system to a halt, requiring manual reset
+poweroff: The system will be powered down. dump_to_rootfs:If the default action
+is dump_to_rootfs, specified root will be mounted and dump will be saved in "path"
+directory.
+Note: kdump uses bash as the default shell.
+.RE
+
+.B force_rebuild <0 | 1>
+.RS
+By default, kdump initrd only will be rebuilt when necessary.
+Specify 1 to force rebuilding kdump initrd every time when kdump service starts.
+.RE
+
+.B override_resettable <0 | 1>
+.RS
+Usually a unresettable block device can't be dump target. Specifying 1 means
+though block target is unresettable, user understand this situation and want
+to try dumping. By default, it's set to 0, means not to try a destined failure.
+.RE
+
+
+.B dracut_args <arg(s)>
+.RS
+Kdump uses dracut to generate initramfs for second kernel. This option
+allows a user to pass arguments to dracut directly.
+.RE
+
+.SH DEPRECATED OPTIONS
+
+.B net <nfs mount>|<user@server>
+.RS
+net option is replaced by nfs and ssh options. Use nfs or ssh options
+directly.
+.RE
+
+.B options <module> <option list>
+.RS
+Use KDUMP_COMMANDLINE_APPEND in /etc/sysconfig/kdump to add proper
+module option as kernel command line params. Such as append loop.max_loop=1
+to limit maximum loop devices to 1.
+.RE
+
+.B link_delay <seconds>
+.RS
+link_delay was used to wait a network device to initialize before using it.
+Now dracut network module take care of this issue automaticlly.
+.RE
+
+.B disk_timeout <seconds>
+.RS
+Similar to link_delay, dracut ensures disks being ready before kdump uses them.
+.RE
+
+.B debug_mem_level <0-3>
+.RS
+This was used to turns on debug/verbose output of kdump scripts regarding
+free/used memory at various points of execution.  This feature has been
+moved to dracut now.
+Use KDUMP_COMMANDLINE_APPEND in /etc/sysconfig/kdump and
+append dracut cmdline param rd.memdebug=[0-3] to enable the debug output.
+
+Higher level means more debugging output.
+.PP
+0 - no output
+.PP
+1 - partial /proc/meminfo
+.PP
+2 - /proc/meminfo
+.PP
+3 - /proc/meminfo + /proc/slabinfo
+.RE
+
+.B blacklist <list of kernel modules>
+.RS
+blacklist option was recently being used to prevent loading modules in
+initramfs. General terminology for blacklist has been that module is
+present in initramfs but it is not actually loaded in kernel. Hence
+retaining blacklist option creates more confusing behavior. It has been
+deprecated.
+.PP
+Instead use rd.driver.blacklist option on second kernel to blacklist
+a certain module. One can edit /etc/sysconfig/kdump.conf and edit
+KDUMP_COMMANDLINE_APPEND to pass kernel command line options. Refer
+to dracut.cmdline man page for more details on module blacklist option.
+.RE
+
+.RE
+
+.SH EXAMPLES
+Here is some examples for core_collector option:
+.PP
+Core collector command format depends on dump target type. Typically for
+filesystem (local/remote), core_collector should accept two arguments.
+First one is source file and second one is target file. For ex.
+.TP
+ex1.
+core_collector "cp --sparse=always"
+
+Above will effectively be translated to:
+
+cp --sparse=always /proc/vmcore <dest-path>/vmcore
+.TP
+ex2.
+core_collector "makedumpfile -c --message-level 1 -d 31"
+
+Above will effectively be translated to:
+
+makedumpfile -c --message-level 1 -d 31 /proc/vmcore <dest-path>/vmcore
+.PP
+For dump targets like raw and ssh, in general, core collector should expect
+one argument (source file) and should output the processed core on standard
+output (There is one exception of "scp", discussed later). This standard
+output will be saved to destination using appropriate commands.
+
+raw dumps examples:
+.TP
+ex3.
+core_collector "cat"
+
+Above will effectively be translated to.
+
+cat /proc/vmcore | dd of=<target-device>
+.TP
+ex4.
+core_collector "makedumpfile -F -c --message-level 1 -d 31"
+
+Above will effectively be translated to.
+
+makedumpfile -F -c --message-level 1 -d 31 | dd of=<target-device>
+.PP
+ssh dumps examples
+.TP
+ex5.
+core_collector "cat"
+
+Above will effectively be translated to.
+
+cat /proc/vmcore | ssh <options> <remote-location> "dd of=path/vmcore"
+.TP
+ex6.
+core_collector "makedumpfile -F -c --message-level 1 -d 31"
+
+Above will effectively be translated to.
+
+makedumpfile -F -c --message-level 1 -d 31 | ssh <options> <remote-location> "dd of=path/vmcore"
+
+There is one exception to standard output rule for ssh dumps. And that is
+scp. As scp can handle ssh destinations for file transfers, one can
+specify "scp" as core collector for ssh targets (no output on stdout).
+.TP
+ex7.
+core_collector "scp"
+
+Above will effectively be translated to.
+
+scp /proc/vmcore <user@host>:path/vmcore
+
+.PP
+examples for other options please see
+.I /etc/kdump.conf
+
+.SH SEE ALSO
+
+kexec(8) mkdumprd(8) dracut.cmdline(7)
diff --git a/SOURCES/kdump.service b/SOURCES/kdump.service
new file mode 100644
index 0000000..55b7ca2
--- /dev/null
+++ b/SOURCES/kdump.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Crash recovery kernel arming
+After=network.target network-online.target remote-fs.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/kdumpctl start
+ExecStop=/usr/bin/kdumpctl stop
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/SOURCES/kdump.sysconfig b/SOURCES/kdump.sysconfig
new file mode 100644
index 0000000..effe466
--- /dev/null
+++ b/SOURCES/kdump.sysconfig
@@ -0,0 +1,26 @@
+# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
+# If no version is specified, then the init script will try to find a
+# kdump kernel with the same version number as the running kernel.
+KDUMP_KERNELVER=""
+
+# The kdump commandline is the command line that needs to be passed off to
+# the kdump kernel.  This will likely match the contents of the grub kernel
+# line.  For example:
+#   KDUMP_COMMANDLINE="ro root=LABEL=/"
+# Dracut depends on proper root= options, so please make sure that appropriate
+# root= options are copied from /proc/cmdline. In general it is best to append
+# command line options using "KDUMP_COMMANDLINE_APPEND=".
+# If a command line is not specified, the default will be taken from
+# /proc/cmdline
+KDUMP_COMMANDLINE=""
+
+# This variable lets us append arguments to the current kdump commandline
+# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
+KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 reset_devices"
+
+# Any additional kexec arguments required.  In most situations, this should
+# be left empty
+#
+# Example:
+#   KEXEC_ARGS="--elf32-core-headers"
+KEXEC_ARGS=""
diff --git a/SOURCES/kdump.sysconfig.i386 b/SOURCES/kdump.sysconfig.i386
new file mode 100644
index 0000000..0d26a66
--- /dev/null
+++ b/SOURCES/kdump.sysconfig.i386
@@ -0,0 +1,35 @@
+# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
+# If no version is specified, then the init script will try to find a
+# kdump kernel with the same version number as the running kernel.
+KDUMP_KERNELVER=""
+
+# The kdump commandline is the command line that needs to be passed off to
+# the kdump kernel.  This will likely match the contents of the grub kernel
+# line.  For example:
+#   KDUMP_COMMANDLINE="ro root=LABEL=/"
+# Dracut depends on proper root= options, so please make sure that appropriate
+# root= options are copied from /proc/cmdline. In general it is best to append
+# command line options using "KDUMP_COMMANDLINE_APPEND=".
+# If a command line is not specified, the default will be taken from
+# /proc/cmdline
+KDUMP_COMMANDLINE=""
+
+# This variable lets us append arguments to the current kdump commandline
+# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
+KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off udev.children-max=2 panic=10 rootflags=nofail"
+
+# Any additional kexec arguments required.  In most situations, this should
+# be left empty
+#
+# Example:
+#   KEXEC_ARGS="--elf32-core-headers"
+KEXEC_ARGS=""
+
+#Where to find the boot image
+KDUMP_BOOTDIR="/boot"
+
+#What is the image type used for kdump
+KDUMP_IMG="vmlinuz"
+
+#What is the images extension.  Relocatable kernels don't have one
+KDUMP_IMG_EXT=""
diff --git a/SOURCES/kdump.sysconfig.ia64 b/SOURCES/kdump.sysconfig.ia64
new file mode 100644
index 0000000..83e8ad0
--- /dev/null
+++ b/SOURCES/kdump.sysconfig.ia64
@@ -0,0 +1,32 @@
+# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
+# If no version is specified, then the init script will try to find a
+# kdump kernel with the same version number as the running kernel.
+KDUMP_KERNELVER=""
+
+# The kdump commandline is the command line that needs to be passed off to
+# the kdump kernel.  This will likely match the contents of the grub kernel
+# line.  For example:
+#   KDUMP_COMMANDLINE="ro root=LABEL=/"
+# If a command line is not specified, the default will be taken from
+# /proc/cmdline
+KDUMP_COMMANDLINE=""
+
+# This variable lets us append arguments to the current kdump commandline
+# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
+KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 reset_devices"
+
+# Any additional kexec arguments required.  In most situations, this should
+# be left empty
+#
+# Example:
+#   KEXEC_ARGS="--elf32-core-headers"
+KEXEC_ARGS=""
+
+#Where to find the boot image
+KDUMP_BOOTDIR="/boot/efi/efi/redhat"
+
+#What is the image type used for kdump
+KDUMP_IMG="vmlinuz"
+
+#What is the images extension.  Relocatable kernels don't have one
+KDUMP_IMG_EXT=""
diff --git a/SOURCES/kdump.sysconfig.ppc64 b/SOURCES/kdump.sysconfig.ppc64
new file mode 100644
index 0000000..ca7e1d8
--- /dev/null
+++ b/SOURCES/kdump.sysconfig.ppc64
@@ -0,0 +1,37 @@
+# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
+# If no version is specified, then the init script will try to find a
+# kdump kernel with the same version number as the running kernel.
+KDUMP_KERNELVER=""
+
+# The kdump commandline is the command line that needs to be passed off to
+# the kdump kernel.  This will likely match the contents of the grub kernel
+# line.  For example:
+#   KDUMP_COMMANDLINE="ro root=LABEL=/"
+# Dracut depends on proper root= options, so please make sure that appropriate
+# root= options are copied from /proc/cmdline. In general it is best to append
+# command line options using "KDUMP_COMMANDLINE_APPEND=".
+# If a command line is not specified, the default will be taken from
+# /proc/cmdline
+KDUMP_COMMANDLINE=""
+
+# This variable lets us append arguments to the current kdump commandline
+# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
+KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 rootflags=nofail"
+
+# Any additional kexec arguments required.  In most situations, this should
+# be left empty
+#
+# Example:
+#   KEXEC_ARGS="--elf32-core-headers"
+KEXEC_ARGS=""
+
+#Where to find the boot image
+KDUMP_BOOTDIR="/boot"
+
+#What is the image type used for kdump
+KDUMP_IMG="vmlinuz"
+
+#What is the images extension.  Relocatable kernels don't have one
+KDUMP_IMG_EXT=""
+
+#Specify the action after failure
diff --git a/SOURCES/kdump.sysconfig.s390x b/SOURCES/kdump.sysconfig.s390x
new file mode 100644
index 0000000..b55515a
--- /dev/null
+++ b/SOURCES/kdump.sysconfig.s390x
@@ -0,0 +1,38 @@
+# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
+# If no version is specified, then the init script will try to find a
+# kdump kernel with the same version number as the running kernel.
+KDUMP_KERNELVER=""
+
+# The kdump commandline is the command line that needs to be passed off to
+# the kdump kernel.  This will likely match the contents of the grub kernel
+# line.  For example:
+#   KDUMP_COMMANDLINE="ro root=LABEL=/"
+# Dracut depends on proper root= options, so please make sure that appropriate
+# root= options are copied from /proc/cmdline. In general it is best to append
+# command line options using "KDUMP_COMMANDLINE_APPEND=".
+# If a command line is not specified, the default will be taken from
+# /proc/cmdline
+KDUMP_COMMANDLINE=""
+
+# This variable lets us append arguments to the current kdump commandline
+# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
+KDUMP_COMMANDLINE_APPEND="maxcpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 rootflags=nofail"
+
+# Any additional /sbin/mkdumprd arguments required.
+MKDUMPRD_ARGS=""
+
+# Any additional kexec arguments required.  In most situations, this should
+# be left empty
+#
+# Example:
+#   KEXEC_ARGS="--elf32-core-headers"
+KEXEC_ARGS=""
+
+#Where to find the boot image
+KDUMP_BOOTDIR="/boot"
+
+#What is the image type used for kdump
+KDUMP_IMG="vmlinuz"
+
+#What is the images extension.  Relocatable kernels don't have one
+KDUMP_IMG_EXT=""
diff --git a/SOURCES/kdump.sysconfig.x86_64 b/SOURCES/kdump.sysconfig.x86_64
new file mode 100644
index 0000000..7e4d611
--- /dev/null
+++ b/SOURCES/kdump.sysconfig.x86_64
@@ -0,0 +1,35 @@
+# Kernel Version string for the -kdump kernel, such as 2.6.13-1544.FC5kdump
+# If no version is specified, then the init script will try to find a
+# kdump kernel with the same version number as the running kernel.
+KDUMP_KERNELVER=""
+
+# The kdump commandline is the command line that needs to be passed off to
+# the kdump kernel.  This will likely match the contents of the grub kernel
+# line.  For example:
+#   KDUMP_COMMANDLINE="ro root=LABEL=/"
+# Dracut depends on proper root= options, so please make sure that appropriate
+# root= options are copied from /proc/cmdline. In general it is best to append
+# command line options using "KDUMP_COMMANDLINE_APPEND=".
+# If a command line is not specified, the default will be taken from
+# /proc/cmdline
+KDUMP_COMMANDLINE=""
+
+# This variable lets us append arguments to the current kdump commandline
+# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
+KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail"
+
+# Any additional kexec arguments required.  In most situations, this should
+# be left empty
+#
+# Example:
+#   KEXEC_ARGS="--elf32-core-headers"
+KEXEC_ARGS=""
+
+#Where to find the boot image
+KDUMP_BOOTDIR="/boot"
+
+#What is the image type used for kdump
+KDUMP_IMG="vmlinuz"
+
+#What is the images extension.  Relocatable kernels don't have one
+KDUMP_IMG_EXT=""
diff --git a/SOURCES/kdumpctl b/SOURCES/kdumpctl
new file mode 100755
index 0000000..358ef05
--- /dev/null
+++ b/SOURCES/kdumpctl
@@ -0,0 +1,594 @@
+#! /bin/sh
+KEXEC=/sbin/kexec
+
+KDUMP_KERNELVER=""
+KDUMP_COMMANDLINE=""
+KEXEC_ARGS=""
+KDUMP_CONFIG_FILE="/etc/kdump.conf"
+MKDUMPRD="/sbin/mkdumprd -f"
+SAVE_PATH=/var/crash
+SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa"
+DUMP_TARGET=""
+
+. /lib/kdump/kdump-lib.sh
+
+standard_kexec_args="-p"
+
+if [ -f /etc/sysconfig/kdump ]; then
+	. /etc/sysconfig/kdump
+fi
+
+single_instance_lock()
+{
+	exec 9>/var/lock/kdump
+	flock 9
+}
+
+# remove_cmdline_param <kernel cmdline> <param1> [<param2>] ... [<paramN>]
+# Remove a list of kernel parameters from a given kernel cmdline and print the result.
+# For each "arg" in the removing params list, "arg" and "arg=xxx" will be removed if exists.
+function remove_cmdline_param()
+{
+	local cmdline=$1
+	shift
+
+	for arg in $@; do
+		cmdline=`echo $cmdline | \
+			 sed -e "s/\b$arg=[^ ]*\b//g" \
+			     -e "s/\b$arg\b//g" \
+			     -e "s/\s\+/ /g"`
+	done
+	echo $cmdline
+}
+
+function save_core()
+{
+	coredir="/var/crash/`date +"%Y-%m-%d-%H:%M"`"
+
+	mkdir -p $coredir
+	cp --sparse=always /proc/vmcore $coredir/vmcore-incomplete
+	if [ $? == 0 ]; then
+		mv $coredir/vmcore-incomplete $coredir/vmcore
+		echo "saved a vmcore to $coredir"
+	else
+		echo "failed to save a vmcore to $coredir" >&2
+	fi
+
+	# pass the dmesg to Abrt tool if exists, in order
+	# to collect the kernel oops message.
+	# https://fedorahosted.org/abrt/
+	if [ -x /usr/bin/dumpoops ]; then
+		makedumpfile --dump-dmesg $coredir/vmcore $coredir/dmesg >/dev/null 2>&1
+		dumpoops -d $coredir/dmesg >/dev/null 2>&1
+		if [ $? == 0 ]; then
+			echo "kernel oops has been collected by abrt tool"
+		fi
+	fi
+}
+
+function rebuild_initrd()
+{
+	$MKDUMPRD $kdump_initrd $kdump_kver
+	if [ $? != 0 ]; then
+		echo "mkdumprd: failed to make kdump initrd" >&2
+		return 1
+	fi
+}
+
+#$1: the files to be checked with IFS=' '
+function check_exist()
+{
+	for file in $1; do
+		if [ ! -f "$file" ]; then
+			echo -n "Error: $file not found."; echo
+			return 1
+		fi
+	done
+}
+
+#$1: the files to be checked with IFS=' '
+function check_executable()
+{
+	for file in $1; do
+		if [ ! -x "$file" ]; then
+			echo -n "Error: $file is not executable."; echo
+			return 1
+		fi
+	done
+}
+
+function check_config()
+{
+	local nr
+
+	nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
+	[ $nr -gt 1 ] && {
+		echo "More than one dump targets specified."
+		return 1
+	}
+
+	while read config_opt config_val; do
+               # remove inline comments after the end of a directive.                                                                      
+               config_val=$(strip_comments $config_val)
+		case "$config_opt" in
+		\#* | "")
+			;;
+		raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args)
+			[ -z "$config_val" ] && {
+				echo "Invalid kdump config value for option $config_opt."
+				return 1;
+			}
+			;;
+		net|options|link_delay|disk_timeout|debug_mem_level|blacklist)
+			echo "Deprecated kdump config option: $config_opt. Refer to kdump.conf manpage for alternatives."
+			return 1
+			;;
+		*)
+			echo "Invalid kdump config option $config_opt"
+			return 1;
+			;;
+		esac
+	done < $KDUMP_CONFIG_FILE
+	return 0
+}
+
+function check_rebuild()
+{
+	local extra_modules modified_files=""
+	local _force_rebuild force_rebuild="0"
+
+	if [ -z "$KDUMP_KERNELVER" ]; then
+		kdump_kver=`uname -r`
+	else
+		kdump_kver=$KDUMP_KERNELVER
+	fi
+
+	kdump_kernel="${KDUMP_BOOTDIR}/${KDUMP_IMG}-${kdump_kver}${KDUMP_IMG_EXT}"
+	kdump_initrd="${KDUMP_BOOTDIR}/initramfs-${kdump_kver}kdump.img"
+
+	_force_rebuild=`grep ^force_rebuild $KDUMP_CONFIG_FILE 2>/dev/null`
+	if [ $? -eq 0 ]; then
+		force_rebuild=`echo $_force_rebuild | cut -d' '  -f2`
+		if [ "$force_rebuild" != "0" ] && [ "$force_rebuild" != "1" ];then
+			echo "Error: force_rebuild value is invalid"
+			return 1
+		fi
+	fi
+
+	#will rebuild every time if extra_modules are specified
+	extra_modules=`grep ^extra_modules $KDUMP_CONFIG_FILE`
+	[ -n "$extra_modules" ] && force_rebuild="1"
+
+	#check to see if dependent files has been modified
+	#since last build of the image file
+	if [ -f $kdump_initrd ]; then
+		image_time=`stat -c "%Y" $kdump_initrd 2>/dev/null`
+	else
+		image_time=0
+	fi
+
+	EXTRA_BINS=`grep ^kdump_post $KDUMP_CONFIG_FILE | cut -d\  -f2`
+	CHECK_FILES=`grep ^kdump_pre $KDUMP_CONFIG_FILE | cut -d\  -f2`
+	EXTRA_BINS="$EXTRA_BINS $CHECK_FILES"
+	CHECK_FILES=`grep ^extra_bins $KDUMP_CONFIG_FILE | cut -d\  -f2-`
+	EXTRA_BINS="$EXTRA_BINS $CHECK_FILES"
+	files="$KDUMP_CONFIG_FILE $kdump_kernel $EXTRA_BINS"
+
+	check_exist "$files" && check_executable "$EXTRA_BINS"
+	[ $? -ne 0 ] && return 1
+
+	for file in $files; do
+		time_stamp=`stat -c "%Y" $file`
+		if [ "$time_stamp" -gt "$image_time" ]; then
+			modified_files="$modified_files $file"
+		fi
+	done
+
+	if [ $image_time -eq 0 ]; then
+		echo  -n "No kdump initial ramdisk found."; echo
+	elif [ "$force_rebuild" != "0" ]; then
+		echo -n "Force rebuild $kdump_initrd"; echo
+	elif [ -n "$modified_files" ]; then
+		echo "Detected change(s) the following file(s):"
+		echo -n "  "; echo "$modified_files" | sed 's/\s/\n  /g'
+	else
+		return 0
+	fi
+
+	echo "Rebuilding $kdump_initrd"
+	rebuild_initrd
+	return $?
+}
+
+# This function check iomem and determines if we have more than
+# 4GB of ram available. Returns 1 if we do, 0 if we dont
+function need_64bit_headers()
+{
+    return `tail -n 1 /proc/iomem | awk '{ split ($1, r, "-"); \
+    print (strtonum("0x" r[2]) > strtonum("0xffffffff")); }'`
+}
+
+# Load the kdump kerel specified in /etc/sysconfig/kdump
+# If none is specified, try to load a kdump kernel with the same version
+# as the currently running kernel.
+function load_kdump()
+{
+	MEM_RESERVED=$(cat /sys/kernel/kexec_crash_size)
+	if [ $MEM_RESERVED -eq 0 ]
+	then
+		echo "No memory reserved for crash kernel." >&2
+		return 1
+	fi
+
+	ARCH=`uname -m`
+	if [ "$ARCH" == "i686" -o "$ARCH" == "i386" ]
+	then
+
+		need_64bit_headers
+		if [ $? == 1 ]
+		then
+			FOUND_ELF_ARGS=`echo $KEXEC_ARGS | grep elf32-core-headers`
+			if [ -n "$FOUND_ELF_ARGS" ]
+			then
+				echo -n "Warning: elf32-core-headers overrides correct elf64 setting"
+				echo
+			else	
+				KEXEC_ARGS="$KEXEC_ARGS --elf64-core-headers"
+			fi
+		else
+			FOUND_ELF_ARGS=`echo $KEXEC_ARGS | grep elf64-core-headers`
+			if [ -z "$FOUND_ELF_ARGS" ]
+			then
+				KEXEC_ARGS="$KEXEC_ARGS --elf32-core-headers"
+			fi
+		fi
+	fi
+
+	if [ -z "$KDUMP_COMMANDLINE" ]
+	then
+		KDUMP_COMMANDLINE=`cat /proc/cmdline`
+	fi
+	KDUMP_COMMANDLINE=`remove_cmdline_param "$KDUMP_COMMANDLINE" crashkernel hugepages hugepagesz`
+
+	KDUMP_COMMANDLINE="${KDUMP_COMMANDLINE} ${KDUMP_COMMANDLINE_APPEND}"
+
+	$KEXEC $KEXEC_ARGS $standard_kexec_args \
+		--command-line="$KDUMP_COMMANDLINE" \
+		--initrd=$kdump_initrd $kdump_kernel 2>/dev/null
+	if [ $? == 0 ]; then
+		echo "kexec: loaded kdump kernel"
+		return 0
+	else
+		echo "kexec: failed to load kdump kernel" >&2
+		return 1
+	fi
+}
+
+function check_ssh_config()
+{
+	while read config_opt config_val; do
+               # remove inline comments after the end of a directive.
+               config_val=$(strip_comments $config_val)
+		case "$config_opt" in
+		sshkey)
+			if [ -f "$config_val" ]; then
+				# canonicalize the path
+				SSH_KEY_LOCATION=$(/usr/bin/readlink -m $config_val)
+			else
+				echo "WARNING: '$config_val' doesn't exist, using default value '$SSH_KEY_LOCATION'"
+			fi
+			;;
+		path)
+			SAVE_PATH=$config_val
+			;;
+		ssh)
+			DUMP_TARGET=$config_val
+			;;
+		*)
+			;;
+		esac
+	done < $KDUMP_CONFIG_FILE
+
+	#make sure they've configured kdump.conf for ssh dumps
+	local SSH_TARGET=`echo -n $DUMP_TARGET | sed -n '/.*@/p'`
+	if [ -z "$SSH_TARGET" ]; then
+		return 1
+	fi
+	return 0
+}
+
+function check_ssh_target()
+{
+	local _ret
+	ssh -q -i $SSH_KEY_LOCATION -o BatchMode=yes $DUMP_TARGET mkdir -p $SAVE_PATH
+	_ret=$?
+	if [ $_ret -ne 0 ]; then
+		echo "Could not create $DUMP_TARGET:$SAVE_PATH, you probably need to run \"kdumpctl propagate\""  >&2
+		return 1
+	fi
+	return 0
+}
+
+function propagate_ssh_key()
+{
+	check_ssh_config
+	if [ $? -ne 0 ]; then
+		echo "No ssh config specified in $KDUMP_CONFIG_FILE.  Can't propagate" >&2
+		exit 1
+	fi
+
+	#Check if selinux is on... must flip to permissive mode
+	#for the moment to create key, then flip back...
+	se_enforce=`/usr/sbin/sestatus | grep -c "^Current mode.*enforcing"`
+	if [ "$se_enforce" -ge 1 ]; then
+		/usr/sbin/setenforce 0 2>&1 > /dev/null
+	fi
+
+	local KEYFILE=$SSH_KEY_LOCATION
+	local errmsg="Failed to propagate ssh key"
+
+	#Check to see if we already created key, if not, create it.
+	if [ -f $KEYFILE ]; then
+		echo "Using existing keys..."
+	else
+		echo -n "Generating new ssh keys... "
+		/usr/bin/ssh-keygen -t rsa -f $KEYFILE -N "" 2>&1 > /dev/null
+		echo "done."
+	fi
+
+	#If necessary, flip selinux back to enforcing
+	if [ "$se_enforce" -ge 1 ]; then
+		/usr/sbin/setenforce 1 2>&1 > /dev/null
+	fi
+	
+	#now find the target ssh user and server to contact.
+	SSH_USER=`echo $DUMP_TARGET | cut -d\  -f2 | cut -d@ -f1`
+	SSH_SERVER=`echo $DUMP_TARGET | sed -e's/\(.*@\)\(.*$\)/\2/'`
+ 
+	#now send the found key to the found server
+	ssh-copy-id -i $KEYFILE $SSH_USER@$SSH_SERVER
+	RET=$?
+	if [ $RET == 0 ]; then
+		echo $KEYFILE has been added to ~$SSH_USER/.ssh/authorized_keys on $SSH_SERVER
+		return 0
+	else
+		echo $errmsg, $KEYFILE failed in transfer to $SSH_SERVER  >&2
+		exit 1
+	fi
+		
+}
+
+function status()
+{
+	if [ ! -e /sys/kernel/kexec_crash_loaded ]
+	then
+		return 2 
+	fi
+	rc=`cat /sys/kernel/kexec_crash_loaded`
+	if [ $rc == 1 ]; then
+		return 0
+	else
+		return 1
+	fi
+}
+
+function save_raw()
+{
+	local kdump_dir
+	local raw_target
+
+	raw_target=$(awk '$1 ~ /^raw$/ { print $2; }' $KDUMP_CONFIG_FILE)
+	[ -z "$raw_target" ] && return 0
+	[ -b "$raw_target" ] || {
+		echo "raw partition $raw_target not found"
+		return 1
+	}
+	kdump_dir=`grep ^path $KDUMP_CONFIG_FILE | cut -d' '  -f2-`
+	if [ -z "${kdump_dir}" ]; then
+		coredir="/var/crash/`date +"%Y-%m-%d-%H:%M"`"
+	else
+		coredir="${kdump_dir}/`date +"%Y-%m-%d-%H:%M"`"
+	fi
+
+	mkdir -p "$coredir"
+	[ -d "$coredir" ] || {
+		echo "failed to create $coredir"
+		return 1
+	}
+	if makedumpfile -R $coredir/vmcore <$raw_target >/dev/null 2>&1; then
+		# dump found
+		echo "Dump saved to $coredir/vmcore"
+		# wipe makedumpfile header
+		dd if=/dev/zero of=$raw_target bs=1b count=1 2>/dev/null
+	else
+		rm -rf "$coredir"
+	fi
+
+	return 0
+}
+
+get_save_path() {
+	local _save_path=$(grep "^path" /etc/kdump.conf|awk '{print $2}')
+	if [ -z "$_save_path" ]; then
+		_save_path="/var/crash"
+	fi
+
+	echo $_save_path
+}
+
+is_dump_target_configured() {
+    local _target
+
+    _target=$(egrep "^ext[234]|^xfs|^btrfs|^minix|^raw|^ssh|^nfs" /etc/kdump.conf)
+
+     [ -n "$_target" ]
+}
+
+local_fs_dump_target()
+{
+	local _target
+
+	_target=$(egrep "^ext[234]|^xfs|^btrfs|^minix" /etc/kdump.conf)
+	if [ $? -eq 0 ]; then
+		echo $_target|awk '{print $2}'
+	fi
+}
+
+path_to_be_relabeled() {
+	local _path _target _mnt="/" _rmnt
+
+	if is_dump_target_configured; then
+		_target=$(local_fs_dump_target)
+		if [[ -n "$_target" ]]; then
+			_mnt=$(findmnt -k -f -n -r -o TARGET $_target)
+			if [ -z "$_mnt" ]; then
+				return
+			fi
+		else
+			return
+		fi
+	fi
+
+	_path=$(get_save_path)
+	# if $_path is masked by other mount, we will not relabel it.
+	_rmnt=$(df $_mnt/$_path 2>/dev/null | tail -1 | awk '{ print $NF }')
+	if [ "$_rmnt" == "$_mnt" ]; then
+		echo $_mnt/$_path
+	fi
+}
+
+selinux_relabel()
+{
+	local _path _i _attr
+
+	_path=$(path_to_be_relabeled)
+	if [ -z "$_path" ] || ! [ -d "$_path" ] ; then
+		return
+	fi
+
+	for _i in $(find $_path); do
+		_attr=$(getfattr -m "security.selinux" $_i 2>/dev/null)
+		if [ -z "$_attr" ]; then
+			restorecon $_i;
+		fi
+	done
+}
+
+function start()
+{
+	check_config
+	if [ $? -ne 0 ]; then
+		echo "Starting kdump: [FAILED]"
+		return 1
+	fi
+
+	if sestatus 2>/dev/null | grep -q "SELinux status.*enabled"; then
+		selinux_relabel
+	fi
+	save_raw
+	if [ $? -ne 0 ]; then
+		echo "Starting kdump: [FAILED]"
+		return 1
+	fi
+
+	status 
+	rc=$?
+	if [ $rc == 2 ]; then
+		echo "Kdump is not supported on this kernel: [WARNING]"
+		return 1;
+	else
+		if [ $rc == 0 ]; then
+			echo "Kdump already running: [WARNING]"
+			return 0
+		fi
+	fi
+
+	if check_ssh_config; then
+		if ! check_ssh_target; then
+			echo "Starting kdump: [FAILED]"
+			return 1
+		fi
+	fi
+
+	check_rebuild
+	if [ $? != 0 ]; then
+		echo "Starting kdump: [FAILED]"
+		return 1
+	fi
+	load_kdump
+	if [ $? != 0 ]; then
+		echo "Starting kdump: [FAILED]"
+		return 1
+	fi
+
+	echo "Starting kdump: [OK]"
+}
+
+function stop()
+{
+	$KEXEC -p -u 2>/dev/null
+	if [ $? == 0 ]; then
+		echo "kexec: unloaded kdump kernel"
+		echo "Stopping kdump: [OK]"
+		return 0
+	else
+		echo "kexec: failed to unloaded kdump kernel"
+		echo "Stopping kdump: [FAILED]"
+		return 1
+	fi
+}
+
+if [ ! -f "$KDUMP_CONFIG_FILE" ]; then
+	echo "Error: No kdump config file found!"  >&2
+	exit 1
+fi
+
+# Other kdumpctl instances will block in queue, until this one exits
+single_instance_lock
+
+case "$1" in
+  start)
+	if [ -s /proc/vmcore ]; then
+		save_core
+		reboot
+	else
+		start
+	fi
+	;;
+  stop)
+	stop
+	;;
+  status)
+	EXIT_CODE=0
+	status
+	case "$?" in
+	0)
+		echo "Kdump is operational"
+		EXIT_CODE=0
+		;;
+	1)
+		echo "Kdump is not operational"
+		EXIT_CODE=3
+		;;
+	2)
+		echo "Kdump is unsupported on this kernel"
+		EXIT_CODE=3
+		;;
+	esac
+	exit $EXIT_CODE
+	;;
+  restart)
+	stop
+	start
+	;;
+  condrestart)
+	;;
+  propagate)
+	propagate_ssh_key
+	;;
+  *)
+	echo $"Usage: $0 {start|stop|status|restart|propagate}"
+	exit 1
+esac
+
+exit $?
diff --git a/SOURCES/kexec-kdump-howto.txt b/SOURCES/kexec-kdump-howto.txt
new file mode 100644
index 0000000..d70781b
--- /dev/null
+++ b/SOURCES/kexec-kdump-howto.txt
@@ -0,0 +1,608 @@
+Kexec/Kdump HOWTO
+
+Introduction
+
+Kexec and kdump are new features in the 2.6 mainstream kernel. These features
+are included in Red Hat Enterprise Linux 5. The purpose of these features
+is to ensure faster boot up and creation of reliable kernel vmcores for
+diagnostic purposes.
+
+Overview
+
+Kexec
+
+Kexec is a fastboot mechanism which allows booting a Linux kernel from the
+context of already running kernel without going through BIOS. BIOS can be very
+time consuming especially on the big servers with lots of peripherals. This can
+save a lot of time for developers who end up booting a machine numerous times.
+
+Kdump
+
+Kdump is a new kernel crash dumping mechanism and is very reliable because
+the crash dump is captured from the context of a freshly booted kernel and
+not from the context of the crashed kernel. Kdump uses kexec to boot into
+a second kernel whenever system crashes. This second kernel, often called
+a capture kernel, boots with very little memory and captures the dump image.
+
+The first kernel reserves a section of memory that the second kernel uses
+to boot. Kexec enables booting the capture kernel without going through BIOS
+hence contents of first kernel's memory are preserved, which is essentially
+the kernel crash dump.
+
+Kdump is supported on the i686, x86_64, ia64 and ppc64 platforms. The
+standard kernel and capture kernel are one in the same on i686, x86_64,
+ia64 and ppc64.
+
+If you're reading this document, you should already have kexec-tools
+installed. If not, you install it via the following command:
+
+    # yum install kexec-tools
+
+Now load a kernel with kexec:
+
+    # kver=`uname -r` # kexec -l /boot/vmlinuz-$kver
+    --initrd=/boot/initrd-$kver.img \
+        --command-line="`cat /proc/cmdline`"
+
+NOTE: The above will boot you back into the kernel you're currently running,
+if you want to load a different kernel, substitute it in place of `uname -r`.
+
+Now reboot your system, taking note that it should bypass the BIOS:
+
+    # reboot
+
+
+How to configure kdump:
+
+Again, we assume if you're reading this document, you should already have
+kexec-tools installed. If not, you install it via the following command:
+
+    # yum install kexec-tools
+
+To be able to do much of anything interesting in the way of debug analysis,
+you'll also need to install the kernel-debuginfo package, of the same arch
+as your running kernel, and the crash utility:
+
+    # yum --enablerepo=\*debuginfo install kernel-debuginfo.$(uname -m) crash
+
+Next up, we need to modify some boot parameters to reserve a chunk of memory for
+the capture kernel. With the help of grubby, it's very easy to append
+"crashkernel=128M" to the end of your kernel boot parameters. Note that the X
+values are such that X = the amount of memory to reserve for the capture kernel.
+And based on arch and system configuration, one might require more than 128M to
+be reserved for kdump. One need to experiment and test kdump, if 128M is not
+sufficient, try reserving more memory.
+
+   # grubby --args="crashkernel=128M" --update-kernel=/boot/vmlinuz-`uname -r`
+
+Note that there is an alternative form in which to specify a crashkernel
+memory reservation, in the event that more control is needed over the size and
+placement of the reserved memory.  The format is:
+
+crashkernel=range1:size1[,range2:size2,...][@offset]
+
+Where range<n> specifies a range of values that are matched against the amount
+of physical RAM present in the system, and the corresponding size<n> value
+specifies the amount of kexec memory to reserve.  For example:
+
+crashkernel=512M-2G:64M,2G-:128M
+
+This line tells kexec to reserve 64M of ram if the system contains between
+512M and 2G of physical memory.  If the system contains 2G or more of physical
+memory, 128M should be reserved.
+
+After making said changes, reboot your system, so that the X MB of memory is
+left untouched by the normal system, reserved for the capture kernel. Take note
+that the output of 'free -m' will show X MB less memory than without this
+parameter, which is expected. You may be able to get by with less than 128M, but
+testing with only 64M has proven unreliable of late. On ia64, as much as 512M
+may be required.
+
+Now that you've got that reserved memory region set up, you want to turn on
+the kdump init script:
+
+    # chkconfig kdump on
+
+Then, start up kdump as well:
+
+    # systemctl start kdump.service
+
+This should load your kernel-kdump image via kexec, leaving the system ready
+to capture a vmcore upon crashing. To test this out, you can force-crash
+your system by echo'ing a c into /proc/sysrq-trigger:
+
+    # echo c > /proc/sysrq-trigger
+
+You should see some panic output, followed by the system restarting into
+the kdump kernel. When the boot process gets to the point where it starts
+the kdump service, your vmcore should be copied out to disk (by default,
+in /var/crash/<YYYY-MM-DD-HH:MM>/vmcore), then the system rebooted back into
+your normal kernel.
+
+Once back to your normal kernel, you can use the previously installed crash
+kernel in conjunction with the previously installed kernel-debuginfo to
+perform postmortem analysis:
+
+    # crash /usr/lib/debug/lib/modules/2.6.17-1.2621.el5/vmlinux
+    /var/crash/2006-08-23-15:34/vmcore
+
+    crash> bt
+
+and so on...
+
+Saving vmcore-dmesg.txt
+----------------------
+Kernel log bufferes are one of the most important information available
+in vmcore. Now before saving vmcore, kernel log bufferes are extracted
+from /proc/vmcore and saved into a file vmcore-dmesg.txt. After
+vmcore-dmesg.txt, vmcore is saved. Destination disk and directory for
+vmcore-dmesg.txt is same as vmcore. Note that kernel log buffers will
+not be available if dump target is raw device.
+
+Dump Triggering methods:
+
+This section talks about the various ways, other than a Kernel Panic, in which
+Kdump can be triggered. The following methods assume that Kdump is configured
+on your system, with the scripts enabled as described in the section above.
+
+1) AltSysRq C
+
+Kdump can be triggered with the combination of the 'Alt','SysRq' and 'C'
+keyboard keys. Please refer to the following link for more details:
+
+http://kbase.redhat.com/faq/FAQ_43_5559.shtm
+
+In addition, on PowerPC boxes, Kdump can also be triggered via Hardware
+Management Console(HMC) using 'Ctrl', 'O' and 'C' keyboard keys.
+
+2) NMI_WATCHDOG
+
+In case a machine has a hard hang, it is quite possible that it does not
+respond to keyboard interrupts. As a result 'Alt-SysRq' keys will not help
+trigger a dump. In such scenarios Nmi Watchdog feature can prove to be useful.
+The following link has more details on configuring Nmi watchdog option.
+
+http://kbase.redhat.com/faq/FAQ_85_9129.shtm
+
+Once this feature has been enabled in the kernel, any lockups will result in an
+OOPs message to be generated, followed by Kdump being triggered.
+
+3) Kernel OOPs
+
+If we want to generate a dump everytime the Kernel OOPses, we can achieve this
+by setting the 'Panic On OOPs' option as follows:
+
+    # echo 1 > /proc/sys/kernel/panic_on_oops
+
+This is enabled by default on RHEL5.
+
+4) NMI(Non maskable interrupt) button
+
+In cases where the system is in a hung state, and is not accepting keyboard
+interrupts, using NMI button for triggering Kdump can be very useful. NMI
+button is present on most of the newer x86 and x86_64 machines. Please refer
+to the User guides/manuals to locate the button, though in most occasions it
+is not very well documented. In most cases it is hidden behind a small hole
+on the front or back panel of the machine. You could use a toothpick or some
+other non-conducting probe to press the button.
+
+For example, on the IBM X series 366 machine, the NMI button is located behind
+a small hole on the bottom center of the rear panel.
+
+To enable this method of dump triggering using NMI button, you will need to set
+the 'unknown_nmi_panic' option as follows:
+
+   # echo 1 > /proc/sys/kernel/unknown_nmi_panic
+
+5) PowerPC specific methods:
+
+On IBM PowerPC machines, issuing a soft reset invokes the XMON debugger(if
+XMON is configured). To configure XMON one needs to compile the kernel with
+the CONFIG_XMON and CONFIG_XMON_DEFAULT options, or by compiling with
+CONFIG_XMON and booting the kernel with xmon=on option.
+
+Following are the ways to remotely issue a soft reset on PowerPC boxes, which
+would drop you to XMON. Pressing a 'X' (capital alphabet X) followed by an
+'Enter' here will trigger the dump.
+
+5.1) HMC
+
+Hardware Management Console(HMC) available on Power4 and Power5 machines allow
+partitions to be reset remotely. This is specially useful in hang situations
+where the system is not accepting any keyboard inputs.
+
+Once you have HMC configured, the following steps will enable you to trigger
+Kdump via a soft reset:
+
+On Power4
+  Using GUI
+
+    * In the right pane, right click on the partition you wish to dump.
+    * Select "Operating System->Reset".
+    * Select "Soft Reset".
+    * Select "Yes".
+
+  Using HMC Commandline
+
+    # reset_partition -m <machine> -p <partition> -t soft
+
+On Power5
+  Using GUI
+
+    * In the right pane, right click on the partition you wish to dump.
+    * Select "Restart Partition".
+    * Select "Dump".
+    * Select "OK".
+
+  Using HMC Commandline
+
+    # chsysstate -m <managed system name> -n <lpar name> -o dumprestart -r lpar
+
+5.2) Blade Management Console for Blade Center
+
+To initiate a dump operation, go to Power/Restart option under "Blade Tasks" in
+the Blade Management Console. Select the corresponding blade for which you want
+to initate the dump and then click "Restart blade with NMI". This issues a
+system reset and invokes xmon debugger.
+
+
+Advanced Setups:
+
+In addition to being able to capture a vmcore to your system's local file
+system, kdump can be configured to capture a vmcore to a number of other
+locations, including a raw disk partition, a dedicated file system, an NFS
+mounted file system, or a remote system via ssh/scp. Additional options
+exist for specifying the relative path under which the dump is captured,
+what to do if the capture fails, and for compressing and filtering the dump
+(so as to produce smaller, more manageable, vmcore files).
+
+In theory, dumping to a location other than the local file system should be
+safer than kdump's default setup, as its possible the default setup will try
+dumping to a file system that has become corrupted. The raw disk partition and
+dedicated file system options allow you to still dump to the local system,
+but without having to remount your possibly corrupted file system(s),
+thereby decreasing the chance a vmcore won't be captured. Dumping to an
+NFS server or remote system via ssh/scp also has this advantage, as well
+as allowing for the centralization of vmcore files, should you have several
+systems from which you'd like to obtain vmcore files. Of course, note that
+these configurations could present problems if your network is unreliable.
+
+Advanced setups are configured via modifications to /etc/kdump.conf,
+which out of the box, is fairly well documented itself. Any alterations to
+/etc/kdump.conf should be followed by a restart of the kdump service, so
+the changes can be incorporated in the kdump initrd. Restarting the kdump
+service is as simple as '/sbin/systemctl restart kdump.service'.
+
+
+Note that kdump.conf is used as a configuration mechanism for capturing dump
+files from the initramfs (in the interests of safety), the root file system is
+mounted, and the init process is started, only as a last resort if the
+initramfs fails to capture the vmcore.  As such, configuration made in
+/etc/kdump.conf is only applicable to capture recorded in the initramfs.  If
+for any reason the init process is started on the root file system, only a
+simple copying of the vmcore from /proc/vmcore to /var/crash/$DATE/vmcore will
+be preformed.
+
+For both local filesystem and nfs dump the dump target must be mounted before
+building kdump initramfs. That means one needs to put an entry for the dump
+file system in /etc/fstab so that after reboot when kdump service starts,
+it can find the dump target and build initramfs instead of failing.
+Usually the dump target should be used only for kdump. If you worry about
+someone uses the filesystem for something else other than dumping vmcore
+you can mount it as read-only. Mkdumprd will still remount it as read-write
+for creating dump directory and will move it back to read-only afterwards.
+
+Raw partition
+
+Raw partition dumping requires that a disk partition in the system, at least
+as large as the amount of memory in the system, be left unformatted. Assuming
+/dev/vg/lv_kdump is left unformatted, kdump.conf can be configured with
+'raw /dev/vg/lv_kdump', and the vmcore file will be copied via dd directly
+onto partition /dev/vg/lv_kdump. Restart the kdump service via
+'/sbin/systemctl restart kdump.service' to commit this change to your kdump
+initrd. Dump target should be persistent device name, such as lvm or device
+mapper canonical name.
+
+Dedicated file system
+
+Similar to raw partition dumping, you can format a partition with the file
+system of your choice, Again, it should be at least as large as the amount
+of memory in the system. Assuming it should be at least as large as the
+amount of memory in the system. Assuming /dev/vg/lv_kdump has been
+formatted ext4, specify 'ext4 /dev/vg/lv_kdump' in kdump.conf, and a
+vmcore file will be copied onto the file system after it has been mounted.
+Dumping to a dedicated partition has the advantage that you can dump multiple
+vmcores to the file system, space permitting, without overwriting previous ones,
+as would be the case in a raw partition setup. Restart the kdump service via
+'/sbin/systemctl restart kdump.service' to commit this change to
+your kdump initrd.  Note that for local file systems ext4 and ext2 are
+supported as dumpable targets.  Kdump will not prevent you from specifying
+other filesystems, and they will most likely work, but their operation
+cannot be guaranteed.  for instance specifying a vfat filesystem or msdos
+filesystem will result in a successful load of the kdump service, but during
+crash recovery, the dump will fail if the system has more than 2GB of memory
+(since vfat and msdos filesystems do not support more than 2GB files).
+Be careful of your filesystem selection when using this target.
+
+It is recommended to use persistent device names or UUID/LABEL for file system
+dumps. One example of persistent device is /dev/vg/<devname>.
+
+NFS mount
+
+Dumping over NFS requires an NFS server configured to export a file system
+with full read/write access for the root user. All operations done within
+the kdump initial ramdisk are done as root, and to write out a vmcore file,
+we obviously must be able to write to the NFS mount. Configuring an NFS
+server is outside the scope of this document, but either the no_root_squash
+or anonuid options on the NFS server side are likely of interest to permit
+the kdump initrd operations write to the NFS mount as root.
+
+Assuming your're exporting /dump on the machine nfs-server.example.com,
+once the mount is properly configured, specify it in kdump.conf, via
+'nfs nfs-server.example.com:/dump'. The server portion can be specified either
+by host name or IP address. Following a system crash, the kdump initrd will
+mount the NFS mount and copy out the vmcore to your NFS server. Restart the
+kdump service via '/sbin/systemctl restart kdump.service' to commit this change
+to your kdump initrd.
+
+Remote system via ssh/scp
+
+Dumping over ssh/scp requires setting up passwordless ssh keys for every
+machine you wish to have dump via this method. First up, configure kdump.conf
+for ssh/scp dumping, adding a config line of 'ssh user@server', where 'user'
+can be any user on the target system you choose, and 'server' is the host
+name or IP address of the target system. Using a dedicated, restricted user
+account on the target system is recommended, as there will be keyless ssh
+access to this account.
+
+Once kdump.conf is appropriately configured, issue the command
+'kdumpctl propagate' to automatically set up the ssh host keys and transmit
+the necessary bits to the target server. You'll have to type in 'yes'
+to accept the host key for your targer server if this is the first time
+you've connected to it, and then input the target system user's password
+to send over the necessary ssh key file. Restart the kdump service via
+'/sbin/systemctl restart kdump.service' to commit this change to your kdump initrd.
+
+Path
+
+By default, local file system vmcore files are written to /var/crash/%DATE
+on the local system, ssh/scp dumps to /var/crash/%HOST-%DATE on the target
+system, dedicated file system partition dumps to ./var/crash/%DATE, and
+NFS dumps to ./var/crash/%HOST-%DATE, the latter two both relative to
+their respective mount points within the kdump initrd (usually /mnt). The
+'/var/crash' portion of the path can be overridden using kdump.conf's 'path'
+variable, should you wish to write the vmcore out to a different location. For
+example, 'path /data/coredumps' would lead to vmcore files being written to
+/data/coredumps/%DATE if you were dumping to your local file system.  Note
+that the path option is ingnored if your kdump configuration results in the
+core being saved from the initscripts in the root filesystem.
+
+Kdump Post-Capture Executable
+
+It is possible to specify a custom script or binary you wish to run following
+an attempt to capture a vmcore. The executable is passed an exit code from
+the capture process, which can be used to trigger different actions from
+within your post-capture executable.
+
+Kdump Pre-Capture Executable
+
+It is possible to specify a custom script or binary you wish to run before
+capturing a vmcore. Exit status of this binary is interpreted:
+0 - continue with dump process as usual
+non 0 - reboot the system
+
+Extra Binaries
+
+If you have specific binaries or scripts you want to have made available
+within your kdump initrd, you can specify them by their full path, and they
+will be included in your kdump initrd, along with all dependent libraries.
+This may be particularly useful for those running post-capture scripts that
+rely on other binaries.
+
+Extra Modules
+
+By default, only the bare minimum of kernel modules will be included in your
+kdump initrd. Should you wish to capture your vmcore files to a non-boot-path
+storage device, such as an iscsi target disk or clustered file system, you may
+need to manually specify additional kernel modules to load into your kdump
+initrd.
+
+Default action
+==============
+Default action specifies what to do when dump to configured dump target
+fails. By default, default action is "reboot" and that is system reboots
+if attempt to save dump to dump target fails.
+
+There are other default actions available though.
+
+- dump_to_rootfs
+	This option tries to mount root and save dump on root filesystem
+	in a path specified by "path". This option will generally make
+	sense when dump target is not root filesystem. For example, if
+	dump is being saved over network using "ssh" then one can specify
+	default to "dump_to_rootfs" to try saving dump to root filesystem
+	if dump over network fails.
+
+- shell
+	Drop into a shell session inside initramfs.
+- halt
+	Halt system after failure
+- poweroff
+	Poweroff system after failure.
+
+Compression and filtering
+
+The 'core_collector' parameter in kdump.conf allows you to specify a custom
+dump capture method. The most common alternate method is makedumpfile, which
+is a dump filtering and compression utility provided with kexec-tools. On
+some architectures, it can drastically reduce the size of your vmcore files,
+which becomes very useful on systems with large amounts of memory.
+
+A typical setup is 'core_collector makedumpfile -F -c --message-level 1 -d 31',
+but check the output of '/sbin/makedumpfile --help' for a list of all available
+options (-i and -g don't need to be specified, they're automatically taken care
+of). Note that use of makedumpfile requires that the kernel-debuginfo package
+corresponding with your running kernel be installed.
+
+Core collector command format depends on dump target type. Typically for
+filesystem (local/remote), core_collector should accept two arguments.
+First one is source file and second one is target file. For ex.
+
+ex1.
+---
+core_collector "cp --sparse=always"
+
+Above will effectively be translated to:
+
+cp --sparse=always /proc/vmcore <dest-path>/vmcore
+
+ex2.
+---
+core_collector "makedumpfile -c --message-level 1 -d 31"
+
+Above will effectively be translated to:
+
+makedumpfile -c --message-level 1 -d 31 /proc/vmcore <dest-path>/vmcore
+
+
+For dump targets like raw and ssh, in general, core collector should expect
+one argument (source file) and should output the processed core on standard
+output (There is one exception of "scp", discussed later). This standard
+output will be saved to destination using appropriate commands.
+
+raw dumps core_collector examples:
+---------
+ex3.
+---
+core_collector "cat"
+
+Above will effectively be translated to.
+
+cat /proc/vmcore | dd of=<target-device>
+
+ex4.
+---
+core_collector "makedumpfile -F -c --message-level 1 -d 31"
+
+Above will effectively be translated to.
+
+makedumpfile -F -c --message-level 1 -d 31 | dd of=<target-device>
+
+ssh dumps core_collector examples:
+---------
+ex5.
+---
+core_collector "cat"
+
+Above will effectively be translated to.
+
+cat /proc/vmcore | ssh <options> <remote-location> "dd of=path/vmcore"
+
+ex6.
+---
+core_collector "makedumpfile -F -c --message-level 1 -d 31"
+
+Above will effectively be translated to.
+
+makedumpfile -F -c --message-level 1 -d 31 | ssh <options> <remote-location> "dd of=path/vmcore"
+
+There is one exception to standard output rule for ssh dumps. And that is
+scp. As scp can handle ssh destinations for file transfers, one can
+specify "scp" as core collector for ssh targets (no output on stdout).
+
+ex7.
+----
+core_collector "scp"
+
+Above will effectively be translated to.
+
+scp /proc/vmcore <user@host>:path/vmcore
+
+About default core collector
+----------------------------
+Default core_collector for ssh/raw dump is:
+"makedumpfile -F -c --message-level 1 -d 31".
+Default core_collector for other targets is:
+"makedumpfile -c --message-level 1 -d 31".
+
+Even if core_collector option is commented out in kdump.conf, makedumpfile
+is default core collector and kdump uses it internally.
+
+If one does not want makedumpfile as default core_collector, then they
+need to specify one using core_collector option to change the behavior.
+
+Note: If "makedumpfile -F" is used then you will get a flattened format
+vmcore.flat, you will need to use "makedumpfile -R" to rearrange the
+dump data from stdard input to a normal dumpfile (readable with analysis
+tools).
+For example: "makedumpfile -R vmcore < vmcore.flat"
+
+Caveats:
+
+Console frame-buffers and X are not properly supported. If you typically run
+with something along the lines of "vga=791" in your kernel config line or
+have X running, console video will be garbled when a kernel is booted via
+kexec. Note that the kdump kernel should still be able to create a dump,
+and when the system reboots, video should be restored to normal.
+
+
+Notes on resetting video:
+
+Video is a notoriously difficult issue with kexec.  Video cards contain ROM code
+that controls their initial configuration and setup.  This code is nominally
+accessed and executed from the Bios, and otherwise not safely executable. Since
+the purpose of kexec is to reboot the system without re-executing the Bios, it
+is rather difficult if not impossible to reset video cards with kexec.  The
+result is, that if a system crashes while running in a graphical mode (i.e.
+running X), the screen may appear to become 'frozen' while the dump capture is
+taking place.  A serial console will of course reveal that the system is
+operating and capturing a vmcore image, but a casual observer will see the
+system as hung until the dump completes and a true reboot is executed.
+
+There are two possiblilties to work around this issue.  One is by adding
+--reset-vga to the kexec command line options in /etc/sysconfig/kdump.  This
+tells kdump to write some reasonable default values to the video card register
+file, in the hopes of returning it to a text mode such that boot messages are
+visible on the screen.  It does not work with all video cards however.
+Secondly, it may be worth trying to add vga15fb.ko to the extra_modules list in
+/etc/kdump.conf.  This will attempt to use the video card in framebuffer mode,
+which can blank the screen prior to the start of a dump capture.
+
+Notes on rootfs mount:
+Dracut is designed to mount rootfs by default. If rootfs mounting fails it
+will refuse to go on. So kdump leaves rootfs mounting to dracut currently.
+We make the assumtion that proper root= cmdline is being passed to dracut
+initramfs for the time being. If you need modify "KDUMP_COMMANDLINE=" in
+/etc/sysconfig/kdump, you will need to make sure that appropriate root=
+options are copied from /proc/cmdline. In general it is best to append
+command line options using "KDUMP_COMMANDLINE_APPEND=" instead of replacing
+the original command line completely.
+
+Debugging Tips
+--------------
+- One can drop into a shell before/after saving vmcore with the help of
+  using kdump_pre/kdump_post hooks. Use following in one of the pre/post
+  scripts to drop into a shell.
+
+  #!/bin/bash
+  _ctty=/dev/ttyS0
+  setsid /bin/sh -i -l 0<>$_ctty 1<>$_ctty 2<>$_ctty
+
+  One might have to change the terminal depending on what they are using.
+
+- Serial console logging for virtual machines
+
+  I generally use "virsh console <domain-name>" to get to serial console.
+  I noticed after dump saving system reboots and when grub menu shows up
+  some of the previously logged messages are no more there. That means
+  any important debugging info at the end will be lost.
+
+  One can log serial console as follows to make sure messages are not lost.
+
+  virsh ttyconsole <domain-name>
+  ln -s <name-of-tty> /dev/modem
+  minicom -C /tmp/console-logs
+
+  Now minicom should be logging serial console in file console-logs.
+
+
diff --git a/SOURCES/kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch b/SOURCES/kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch
new file mode 100644
index 0000000..15b953e
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch
@@ -0,0 +1,20 @@
+--- kexec-tools-2.0.3/makedumpfile-1.5.4/Makefile.orig
++++ kexec-tools-2.0.3/makedumpfile-1.5.4/Makefile
+@@ -60,7 +60,7 @@ LIBS := -lsnappy $(LIBS)
+ CFLAGS += -DUSESNAPPY
+ endif
+ 
+-all: makedumpfile
++all: makedumpfile eppic_makedumpfile.so
+ 
+ $(OBJ_PART): $(SRC_PART)
+ 	$(CC) $(CFLAGS) -c -o ./$@ ./$(@:.o=.c) 
+@@ -80,7 +80,7 @@ makedumpfile: $(SRC) $(OBJ_PART) $(OBJ_A
+ 	gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz
+ 
+ eppic_makedumpfile.so: extension_eppic.c
+-	$(CC) $(CFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo
++	$(CC) $(CFLAGS) -shared -rdynamic -o $@ extension_eppic.c -I../eppic/libeppic -fPIC ../eppic/libeppic/libeppic.a -ltinfo
+ 
+ clean:
+ 	rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz makedumpfile.conf.5.gz
diff --git a/SOURCES/kexec-tools-2.0.3-disable-kexec-test.patch b/SOURCES/kexec-tools-2.0.3-disable-kexec-test.patch
new file mode 100644
index 0000000..6fc73f2
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.3-disable-kexec-test.patch
@@ -0,0 +1,17 @@
+diff --git kexec-tools-2.0.3/kexec_test/Makefile kexec-tools-2.0.3/kexec_test/Makefile
+index fec6210..2ed4d51 100644
+--- kexec-tools-2.0.3/kexec_test/Makefile
++++ kexec-tools-2.0.3/kexec_test/Makefile
+@@ -8,12 +8,6 @@ dist += kexec_test/Makefile $(KEXEC_TEST_SRCS)				\
+ 	kexec_test/x86-setup-legacy-pic.S
+ 
+ BUILD_KEXEC_TEST = no
+-ifeq ($(ARCH),i386)
+-BUILD_KEXEC_TEST = yes
+-endif
+-ifeq ($(ARCH),x86_64)
+-BUILD_KEXEC_TEST = yes
+-endif
+ 
+ ifeq ($(BUILD_KEXEC_TEST),yes)
+ 
diff --git a/SOURCES/kexec-tools-2.0.4-Revert-kexec-include-reserved-e820-sections-in-crash.patch b/SOURCES/kexec-tools-2.0.4-Revert-kexec-include-reserved-e820-sections-in-crash.patch
new file mode 100644
index 0000000..a37c3a5
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-Revert-kexec-include-reserved-e820-sections-in-crash.patch
@@ -0,0 +1,102 @@
+From 1a4e90ba221684e563bf1baf06f3547cd95e60b0 Mon Sep 17 00:00:00 2001
+Message-Id: <1a4e90ba221684e563bf1baf06f3547cd95e60b0.1380267809.git.bhe@redhat.com>
+From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
+Date: Sun, 31 Mar 2013 11:12:53 +0800
+Subject: [PATCH] Revert "kexec: include reserved e820 sections in crash
+ kernel"
+
+This reverts commit e35aa29fb40b37bf86d980b2e19af5e01c2d2549.
+This patch is based on the commit 49320340f705694e387d794f7f19d407ad9baefa
+     "kexec: lengthen the kernel command line image"
+Since the latter commit has been reverted due to its useless, this
+patch should be reverted too.
+
+Besides, This patch also changed a kernel restriction of max segments
+from 16 to 70. Though kexec-tools could have more segments, more than 16,
+the kexec_load syscall will still fail for the kernel side has a restriction
+of 16.
+
+Cc: Cliff Wickman <cpw@sgi.com>
+Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
+Signed-off-by: Simon Horman <horms@verge.net.au>
+Signed-off-by: Baoquan He <bhe@redhat.com>
+---
+ kexec/arch/i386/crashdump-x86.c | 31 ++-----------------------------
+ kexec/kexec-syscall.h           |  2 +-
+ 2 files changed, 3 insertions(+), 30 deletions(-)
+
+diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
+index 4167e5e..e44fceb 100644
+--- a/kexec/arch/i386/crashdump-x86.c
++++ b/kexec/arch/i386/crashdump-x86.c
+@@ -247,8 +247,6 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges,
+ 			type = RANGE_ACPI;
+ 		} else if(memcmp(str,"ACPI Non-volatile Storage\n",26) == 0 ) {
+ 			type = RANGE_ACPI_NVS;
+-		} else if(memcmp(str,"reserved\n", 9) == 0 ) {
+-			type = RANGE_RESERVED;
+ 		} else if (memcmp(str, "GART\n", 5) == 0) {
+ 			gart_start = start;
+ 			gart_end = end;
+@@ -908,27 +906,6 @@ static void get_backup_area(struct kexec_info *info,
+ 	info->backup_src_size = BACKUP_SRC_END - BACKUP_SRC_START + 1;
+ }
+ 
+-/* Appends memmap=X$Y commandline for reserved memory to command line*/
+-static int cmdline_add_memmap_reserved(char *cmdline, unsigned long start,
+-					unsigned long end)
+-{
+-	int align = 1024;
+-	unsigned long startk, endk;
+-
+-	if (!(end - start))
+-		return 0;
+-
+-	startk = start/1024;
+-	endk = (end + align - 1)/1024;
+-	cmdline_add_memmap_internal(cmdline, startk, endk, RANGE_RESERVED);
+-
+-#ifdef DEBUG
+-		printf("Command line after adding reserved memmap\n");
+-		printf("%s\n", cmdline);
+-#endif
+-	return 0;
+-}
+-
+ /* Loads additional segments in case of a panic kernel is being loaded.
+  * One segment for backup region, another segment for storing elf headers
+  * for crash memory image.
+@@ -1076,15 +1053,11 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
+ 	for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) {
+ 		unsigned long start, end;
+ 		if ( !( mem_range[i].type == RANGE_ACPI
+-			|| mem_range[i].type == RANGE_ACPI_NVS
+-			|| mem_range[i].type == RANGE_RESERVED) )
++			|| mem_range[i].type == RANGE_ACPI_NVS) )
+ 			continue;
+ 		start = mem_range[i].start;
+ 		end = mem_range[i].end;
+-		if (mem_range[i].type == RANGE_RESERVED)
+-			cmdline_add_memmap_reserved(mod_cmdline, start, end);
+-		else
+-			cmdline_add_memmap_acpi(mod_cmdline, start, end);
++		cmdline_add_memmap_acpi(mod_cmdline, start, end);
+ 	}
+ 	return 0;
+ }
+diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
+index f5ee992..b56cb00 100644
+--- a/kexec/kexec-syscall.h
++++ b/kexec/kexec-syscall.h
+@@ -78,7 +78,7 @@ static inline long kexec_load(void *entry, unsigned long nr_segments,
+ #define KEXEC_ARCH_MIPS    ( 8 << 16)
+ #define KEXEC_ARCH_CRIS    (76 << 16)
+ 
+-#define KEXEC_MAX_SEGMENTS 70
++#define KEXEC_MAX_SEGMENTS 16
+ 
+ #ifdef __i386__
+ #define KEXEC_ARCH_NATIVE	KEXEC_ARCH_386
+-- 
+1.8.3.1
+
diff --git a/SOURCES/kexec-tools-2.0.4-Revert-kexec-lengthen-the-kernel-command-line-image.patch b/SOURCES/kexec-tools-2.0.4-Revert-kexec-lengthen-the-kernel-command-line-image.patch
new file mode 100644
index 0000000..742d1f0
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-Revert-kexec-lengthen-the-kernel-command-line-image.patch
@@ -0,0 +1,35 @@
+From 827491661670e3d7f8edf08cce2ed0f423d710eb Mon Sep 17 00:00:00 2001
+Message-Id: <827491661670e3d7f8edf08cce2ed0f423d710eb.1380270065.git.bhe@redhat.com>
+From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
+Date: Wed, 27 Mar 2013 20:42:28 +0800
+Subject: [PATCH] Revert: "kexec: lengthen the kernel command line image"
+
+This reverts commit 49320340f705694e387d794f7f19d407ad9baefa. The change
+of COMMAND_LINE_SIZE cannot solve Cliff's problem since the kernel side
+has the restriction, so it is useless. Let's recover the original value
+defined by kernel side.
+
+Cc: Cliff Wickman <cpw@sgi.com>
+Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
+Signed-off-by: Simon Horman <horms@verge.net.au>
+Signed-off-by: Baoquan He <bhe@redhat.com>
+---
+ include/x86/x86-linux.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/x86/x86-linux.h b/include/x86/x86-linux.h
+index 6681f9e..0949dc2 100644
+--- a/include/x86/x86-linux.h
++++ b/include/x86/x86-linux.h
+@@ -197,7 +197,7 @@ struct x86_linux_param_header {
+ 	uint8_t _pad8[48];			/* 0xcd0 */
+ 	struct 	edd_info eddbuf[EDDMAXNR];	/* 0xd00 */
+ 						/* 0xeec */
+-#define COMMAND_LINE_SIZE (64*1024)
++#define COMMAND_LINE_SIZE 2048
+ };
+ 
+ struct x86_linux_faked_param_header {
+-- 
+1.8.3.1
+
diff --git a/SOURCES/kexec-tools-2.0.4-kdump-x86-Process-multiple-Crash-kernel-in-proc-iome.patch b/SOURCES/kexec-tools-2.0.4-kdump-x86-Process-multiple-Crash-kernel-in-proc-iome.patch
new file mode 100644
index 0000000..9e2fb41
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-kdump-x86-Process-multiple-Crash-kernel-in-proc-iome.patch
@@ -0,0 +1,230 @@
+From e25e6e7593cae350ecaa3fcd6d20c7de87f4c309 Mon Sep 17 00:00:00 2001
+From: Yinghai Lu <yinghai@kernel.org>
+Date: Fri, 22 Mar 2013 13:54:06 -0700
+Subject: [PATCH] kdump, x86: Process multiple Crash kernel in /proc/iomem
+
+Vivek found specical handling crashkernel low in not good.
+We should extend kexec-tools to handle multiple Crash kernel instead.
+
+Extend crash_reserved_mem to array instead and use
+kexec_iomem_for_each_line directly.  After that we can drop
+crashkernel low.
+
+-v2: fix left over calling of parse_iomem_single() found by Vivek.
+
+Suggested-by: Vivek Goyal <vgoyal@redhat.com>
+Signed-off-by: Yinghai Lu <yinghai@kernel.org>
+Signed-off-by: Simon Horman <horms@verge.net.au>
+---
+ kexec/arch/i386/crashdump-x86.c    | 107 +++++++++++++++++++++----------------
+ kexec/arch/i386/kexec-x86-common.c |   4 +-
+ kexec/kexec.h                      |   1 +
+ 3 files changed, 65 insertions(+), 47 deletions(-)
+
+diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
+index 9ab648b..4167e5e 100644
+--- a/kexec/arch/i386/crashdump-x86.c
++++ b/kexec/arch/i386/crashdump-x86.c
+@@ -188,9 +188,9 @@ static int exclude_region(int *nr_ranges, uint64_t start, uint64_t end);
+ static struct memory_range crash_memory_range[CRASH_MAX_MEMORY_RANGES];
+ 
+ /* Memory region reserved for storing panic kernel and other data. */
+-static struct memory_range crash_reserved_mem;
+-/* under 4G parts */
+-static struct memory_range crash_reserved_low_mem;
++#define CRASH_RESERVED_MEM_NR	8
++static struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
++static int crash_reserved_mem_nr;
+ 
+ /* Reads the appropriate file and retrieves the SYSTEM RAM regions for whom to
+  * create Elf headers. Keeping it separate from get_memory_ranges() as
+@@ -207,7 +207,7 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges,
+ 				   int kexec_flags, unsigned long lowmem_limit)
+ {
+ 	const char *iomem = proc_iomem();
+-	int memory_ranges = 0, gart = 0;
++	int memory_ranges = 0, gart = 0, i;
+ 	char line[MAX_LINE];
+ 	FILE *fp;
+ 	unsigned long long start, end;
+@@ -268,29 +268,28 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges,
+ 	}
+ 	fclose(fp);
+ 	if (kexec_flags & KEXEC_PRESERVE_CONTEXT) {
+-		int i;
+ 		for (i = 0; i < memory_ranges; i++) {
+ 			if (crash_memory_range[i].end > 0x0009ffff) {
+-				crash_reserved_mem.start = \
++				crash_reserved_mem[0].start = \
+ 					crash_memory_range[i].start;
+ 				break;
+ 			}
+ 		}
+-		if (crash_reserved_mem.start >= mem_max) {
++		if (crash_reserved_mem[0].start >= mem_max) {
+ 			fprintf(stderr, "Too small mem_max: 0x%llx.\n",
+ 				mem_max);
+ 			return -1;
+ 		}
+-		crash_reserved_mem.end = mem_max;
+-		crash_reserved_mem.type = RANGE_RAM;
++		crash_reserved_mem[0].end = mem_max;
++		crash_reserved_mem[0].type = RANGE_RAM;
++		crash_reserved_mem_nr = 1;
+ 	}
+-	if (exclude_region(&memory_ranges, crash_reserved_mem.start,
+-				crash_reserved_mem.end) < 0)
+-		return -1;
+-	if (crash_reserved_low_mem.start &&
+-	    exclude_region(&memory_ranges, crash_reserved_low_mem.start,
+-				crash_reserved_low_mem.end) < 0)
+-		return -1;
++
++	for (i = 0; i < crash_reserved_mem_nr; i++)
++		if (exclude_region(&memory_ranges, crash_reserved_mem[i].start,
++				crash_reserved_mem[i].end) < 0)
++			return -1;
++
+ 	if (gart) {
+ 		/* exclude GART region if the system has one */
+ 		if (exclude_region(&memory_ranges, gart_start, gart_end) < 0)
+@@ -351,9 +350,10 @@ static int get_crash_memory_ranges_xen(struct memory_range **range,
+ 
+ 	qsort(*range, *ranges, sizeof(struct memory_range), compare_ranges);
+ 
+-	if (exclude_region(ranges, crash_reserved_mem.start,
+-						crash_reserved_mem.end) < 0)
+-		goto err;
++	for (i = 0; i < crash_reserved_mem_nr; i++)
++		if (exclude_region(ranges, crash_reserved_mem[i].start,
++						crash_reserved_mem[i].end) < 0)
++			goto err;
+ 
+ 	ret = 0;
+ 
+@@ -434,9 +434,10 @@ static int get_crash_memory_ranges_xen(struct memory_range **range,
+ 
+ 	qsort(*range, *ranges, sizeof(struct memory_range), compare_ranges);
+ 
+-	if (exclude_region(ranges, crash_reserved_mem.start,
+-						crash_reserved_mem.end) < 0)
+-		goto err;
++	for (i = 0; i < crash_reserved_mem_nr; i++)
++		if (exclude_region(ranges, crash_reserved_mem[i].start,
++						crash_reserved_mem[i].end) < 0)
++			goto err;
+ 
+ 	ret = 0;
+ 
+@@ -1014,15 +1015,10 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
+ 	memmap_p = xmalloc(sz);
+ 	memset(memmap_p, 0, sz);
+ 	add_memmap(memmap_p, info->backup_src_start, info->backup_src_size);
+-	sz = crash_reserved_mem.end - crash_reserved_mem.start +1;
+-	if (add_memmap(memmap_p, crash_reserved_mem.start, sz) < 0) {
+-		return ENOCRASHKERNEL;
+-	}
+-
+-	if (crash_reserved_low_mem.start) {
+-		sz = crash_reserved_low_mem.end - crash_reserved_low_mem.start
+-					 +1;
+-		add_memmap(memmap_p, crash_reserved_low_mem.start, sz);
++	for (i = 0; i < crash_reserved_mem_nr; i++) {
++		sz = crash_reserved_mem[i].end - crash_reserved_mem[i].start +1;
++		if (add_memmap(memmap_p, crash_reserved_mem[i].start, sz) < 0)
++			return ENOCRASHKERNEL;
+ 	}
+ 
+ 	/* Create a backup region segment to store backup data*/
+@@ -1093,25 +1089,46 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
+ 	return 0;
+ }
+ 
+-int is_crashkernel_mem_reserved(void)
++int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end)
+ {
+-	uint64_t start, end;
++	int i, idx = -1;
++	unsigned long sz_max = 0, sz;
+ 
+-	if (parse_iomem_single("Crash kernel\n", &start, &end) || start == end)
+-		return 0;
++	if (!crash_reserved_mem_nr)
++		return -1;
+ 
+-	crash_reserved_mem.start = start;
+-	crash_reserved_mem.end = end;
+-	crash_reserved_mem.type = RANGE_RAM;
++	for (i = crash_reserved_mem_nr - 1; i >= 0; i--) {
++		sz = crash_reserved_mem[i].end - crash_reserved_mem[i].start +1;
++		if (sz <= sz_max)
++			continue;
++		sz_max = sz;
++		idx = i;
++	}
++
++	*start = crash_reserved_mem[idx].start;
++	*end = crash_reserved_mem[idx].end;
++
++	return 0;
++}
+ 
+-	/* If there is no Crash low kernel, still can go on */
+-	if (parse_iomem_single("Crash kernel low\n", &start, &end) ||
+-					start == end)
++static int crashkernel_mem_callback(void *UNUSED(data), int nr,
++                                          char *UNUSED(str),
++                                          unsigned long base,
++                                          unsigned long length)
++{
++	if (nr >= CRASH_RESERVED_MEM_NR)
+ 		return 1;
+ 
+-	crash_reserved_low_mem.start = start;
+-	crash_reserved_low_mem.end = end;
+-	crash_reserved_low_mem.type = RANGE_RAM;
++	crash_reserved_mem[nr].start = base;
++	crash_reserved_mem[nr].end   = base + length - 1;
++	crash_reserved_mem[nr].type  = RANGE_RAM;
++	return 0;
++}
++
++int is_crashkernel_mem_reserved(void)
++{
++	crash_reserved_mem_nr = kexec_iomem_for_each_line("Crash kernel\n",
++                                       crashkernel_mem_callback, NULL);
+ 
+-	return 1;
++	return !!crash_reserved_mem_nr;
+ }
+diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c
+index 234823c..ed6c950 100644
+--- a/kexec/arch/i386/kexec-x86-common.c
++++ b/kexec/arch/i386/kexec-x86-common.c
+@@ -465,9 +465,9 @@ int get_memory_ranges(struct memory_range **range, int *ranges,
+ 	    !(kexec_flags & KEXEC_PRESERVE_CONTEXT)) {
+ 		uint64_t start, end;
+ 
+-		ret = parse_iomem_single("Crash kernel\n", &start, &end);
++		ret = get_max_crash_kernel_limit(&start, &end);
+ 		if (ret != 0) {
+-			fprintf(stderr, "parse_iomem_single failed.\n");
++			fprintf(stderr, "get_max_crash_kernel_limit failed.\n");
+ 			return -1;
+ 		}
+ 
+diff --git a/kexec/kexec.h b/kexec/kexec.h
+index 916a24b..5ded390 100644
+--- a/kexec/kexec.h
++++ b/kexec/kexec.h
+@@ -272,6 +272,7 @@ int arch_process_options(int argc, char **argv);
+ int arch_compat_trampoline(struct kexec_info *info);
+ void arch_update_purgatory(struct kexec_info *info);
+ int is_crashkernel_mem_reserved(void);
++int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end);
+ char *get_command_line(void);
+ 
+ int kexec_iomem_for_each_line(char *match,
+-- 
+1.8.3.1
+
diff --git a/SOURCES/kexec-tools-2.0.4-kexec-i386-Add-cmdline_add_memmap_internal-to-reduce.patch b/SOURCES/kexec-tools-2.0.4-kexec-i386-Add-cmdline_add_memmap_internal-to-reduce.patch
new file mode 100644
index 0000000..c222834
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-kexec-i386-Add-cmdline_add_memmap_internal-to-reduce.patch
@@ -0,0 +1,150 @@
+From dc607e4d43308140b4cee6c4503ee71f32b827ad Mon Sep 17 00:00:00 2001
+Message-Id: <dc607e4d43308140b4cee6c4503ee71f32b827ad.1380269355.git.bhe@redhat.com>
+From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
+Date: Thu, 28 Mar 2013 21:09:59 +0800
+Subject: [PATCH] kexec: i386: Add cmdline_add_memmap_internal() to reduce the
+ code duplication
+
+Functions:
+- cmdline_add_memmap()
+- cmdline_add_memmap_acpi()
+- cmdline_add_memmap_reserved()
+is kind of similar, So add a new function cmdline_add_memmap_internal() to
+hold the common codes, reducing the duplication.
+
+Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
+Signed-off-by: Simon Horman <horms@verge.net.au>
+Signed-off-by: Baoquan He <bhe@redhat.com>
+---
+ kexec/arch/i386/crashdump-x86.c | 74 ++++++++++++++++++-----------------------
+ 1 file changed, 33 insertions(+), 41 deletions(-)
+
+diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
+index 5462f8b..9ab648b 100644
+--- a/kexec/arch/i386/crashdump-x86.c
++++ b/kexec/arch/i386/crashdump-x86.c
+@@ -685,13 +685,40 @@ static void ultoa(unsigned long i, char *str)
+ 	}
+ }
+ 
++static void cmdline_add_memmap_internal(char *cmdline, unsigned long startk,
++					unsigned long endk, int type)
++{
++	int cmdlen, len;
++	char str_mmap[256], str_tmp[20];
++
++	strcpy (str_mmap, " memmap=");
++	ultoa((endk-startk), str_tmp);
++	strcat (str_mmap, str_tmp);
++
++	if (type == RANGE_RAM)
++		strcat (str_mmap, "K@");
++	else if (type == RANGE_RESERVED)
++		strcat (str_mmap, "K$");
++	else if (type == RANGE_ACPI || type == RANGE_ACPI_NVS)
++		strcat (str_mmap, "K#");
++
++	ultoa(startk, str_tmp);
++	strcat (str_mmap, str_tmp);
++	strcat (str_mmap, "K");
++	len = strlen(str_mmap);
++	cmdlen = strlen(cmdline) + len;
++	if (cmdlen > (COMMAND_LINE_SIZE - 1))
++		die("Command line overflow\n");
++	strcat(cmdline, str_mmap);
++}
++
+ /* Adds the appropriate memmap= options to command line, indicating the
+  * memory regions the new kernel can use to boot into. */
+ static int cmdline_add_memmap(char *cmdline, struct memory_range *memmap_p)
+ {
+ 	int i, cmdlen, len;
+ 	unsigned long min_sizek = 100;
+-	char str_mmap[256], str_tmp[20];
++	char str_mmap[256];
+ 
+ 	/* Exact map */
+ 	strcpy(str_mmap, " memmap=exactmap");
+@@ -713,18 +740,7 @@ static int cmdline_add_memmap(char *cmdline, struct memory_range *memmap_p)
+ 		 * up precious command line length. */
+ 		if ((endk - startk) < min_sizek)
+ 			continue;
+-		strcpy (str_mmap, " memmap=");
+-		ultoa((endk-startk), str_tmp);
+-		strcat (str_mmap, str_tmp);
+-		strcat (str_mmap, "K@");
+-		ultoa(startk, str_tmp);
+-		strcat (str_mmap, str_tmp);
+-		strcat (str_mmap, "K");
+-		len = strlen(str_mmap);
+-		cmdlen = strlen(cmdline) + len;
+-		if (cmdlen > (COMMAND_LINE_SIZE - 1))
+-			die("Command line overflow\n");
+-		strcat(cmdline, str_mmap);
++		cmdline_add_memmap_internal(cmdline, startk, endk, RANGE_RAM);
+ 	}
+ 
+ 	dbgprintf("Command line after adding memmap\n");
+@@ -817,27 +833,15 @@ static enum coretype get_core_type(struct crash_elf_info *elf_info,
+ static int cmdline_add_memmap_acpi(char *cmdline, unsigned long start,
+ 					unsigned long end)
+ {
+-	int cmdlen, len, align = 1024;
++	int align = 1024;
+ 	unsigned long startk, endk;
+-	char str_mmap[256], str_tmp[20];
+ 
+ 	if (!(end - start))
+ 		return 0;
+ 
+ 	startk = start/1024;
+ 	endk = (end + align - 1)/1024;
+-	strcpy (str_mmap, " memmap=");
+-	ultoa((endk - startk), str_tmp);
+-	strcat (str_mmap, str_tmp);
+-	strcat (str_mmap, "K#");
+-	ultoa(startk, str_tmp);
+-	strcat (str_mmap, str_tmp);
+-	strcat (str_mmap, "K");
+-	len = strlen(str_mmap);
+-	cmdlen = strlen(cmdline) + len;
+-	if (cmdlen > (COMMAND_LINE_SIZE - 1))
+-		die("Command line overflow\n");
+-	strcat(cmdline, str_mmap);
++	cmdline_add_memmap_internal(cmdline, startk, endk, RANGE_ACPI);
+ 
+ 	dbgprintf("Command line after adding acpi memmap\n");
+ 	dbgprintf("%s\n", cmdline);
+@@ -907,27 +911,15 @@ static void get_backup_area(struct kexec_info *info,
+ static int cmdline_add_memmap_reserved(char *cmdline, unsigned long start,
+ 					unsigned long end)
+ {
+-	int cmdlen, len, align = 1024;
++	int align = 1024;
+ 	unsigned long startk, endk;
+-	char str_mmap[256], str_tmp[20];
+ 
+ 	if (!(end - start))
+ 		return 0;
+ 
+ 	startk = start/1024;
+ 	endk = (end + align - 1)/1024;
+-	strcpy (str_mmap, " memmap=");
+-	ultoa((endk - startk), str_tmp);
+-	strcat (str_mmap, str_tmp);
+-	strcat (str_mmap, "K$");
+-	ultoa(startk, str_tmp);
+-	strcat (str_mmap, str_tmp);
+-	strcat (str_mmap, "K");
+-	len = strlen(str_mmap);
+-	cmdlen = strlen(cmdline) + len;
+-	if (cmdlen > (COMMAND_LINE_SIZE - 1))
+-		die("Command line overflow\n");
+-	strcat(cmdline, str_mmap);
++	cmdline_add_memmap_internal(cmdline, startk, endk, RANGE_RESERVED);
+ 
+ #ifdef DEBUG
+ 		printf("Command line after adding reserved memmap\n");
+-- 
+1.8.3.1
+
diff --git a/SOURCES/kexec-tools-2.0.4-makedumpfile-Add-vmap_area_list-definition-for-ppc-ppc64.patch b/SOURCES/kexec-tools-2.0.4-makedumpfile-Add-vmap_area_list-definition-for-ppc-ppc64.patch
new file mode 100644
index 0000000..8b0a226
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-makedumpfile-Add-vmap_area_list-definition-for-ppc-ppc64.patch
@@ -0,0 +1,44 @@
+From 150b58eb299066c65ef7713a93effc35c00be03a Mon Sep 17 00:00:00 2001
+Message-Id: <150b58eb299066c65ef7713a93effc35c00be03a.1374133991.git.bhe@redhat.com>
+From: Baoquan He <bhe@redhat.com>
+Date: Mon, 15 Jul 2013 20:37:14 +0800
+Subject: [PATCH] [PATCH] Add vmap_area_list definition for ppc/ppc64.
+
+vmap_area_list is added to get vmalloc_start for ppc/ppc64, but its
+definition is missing, now add them.
+
+Signed-off-by: Baoquan He <bhe@redhat.com>
+---
+ makedumpfile-1.5.4/arch/ppc.c   |    2 +-
+ makedumpfile-1.5.4/arch/ppc64.c |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/makedumpfile-1.5.4/arch/ppc.c b/makedumpfile-1.5.4/arch/ppc.c
+index a9b4812..a3e1a12 100644
+--- a/makedumpfile-1.5.4/arch/ppc.c
++++ b/makedumpfile-1.5.4/arch/ppc.c
+@@ -28,7 +28,7 @@
+ int
+ get_machdep_info_ppc(void)
+ {
+-	unsigned long vmlist, vmalloc_start;
++	unsigned long vmlist, vmap_area_list, vmalloc_start;
+ 
+ 	info->section_size_bits = _SECTION_SIZE_BITS;
+ 	info->max_physmem_bits  = _MAX_PHYSMEM_BITS;
+diff --git a/makedumpfile-1.5.4/arch/ppc64.c b/makedumpfile-1.5.4/arch/ppc64.c
+index c229ede..85144f6 100644
+--- a/makedumpfile-1.5.4/arch/ppc64.c
++++ b/makedumpfile-1.5.4/arch/ppc64.c
+@@ -49,7 +49,7 @@ set_ppc64_max_physmem_bits(void)
+ int
+ get_machdep_info_ppc64(void)
+ {
+-	unsigned long vmlist, vmalloc_start;
++	unsigned long vmlist, vmap_area_list, vmalloc_start;
+ 
+ 	info->section_size_bits = _SECTION_SIZE_BITS;
+ 	if (!set_ppc64_max_physmem_bits()) {
+-- 
+1.7.1
+
diff --git a/SOURCES/kexec-tools-2.0.4-makedumpfile-Fix-max_mapnr-issue-on-system-has-over-44-b.patch b/SOURCES/kexec-tools-2.0.4-makedumpfile-Fix-max_mapnr-issue-on-system-has-over-44-b.patch
new file mode 100644
index 0000000..fee9cb8
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-makedumpfile-Fix-max_mapnr-issue-on-system-has-over-44-b.patch
@@ -0,0 +1,329 @@
+From 8e124174b62376b17ac909bc68622ef07bde6840 Mon Sep 17 00:00:00 2001
+Message-Id: <8e124174b62376b17ac909bc68622ef07bde6840.1382323707.git.bhe@redhat.com>
+From: Jingbai Ma <jingbai.ma@hp.com>
+Date: Fri, 18 Oct 2013 18:53:38 +0900
+Subject: [PATCH] [PATCH v4] Fix max_mapnr issue on system has over 44-bit
+ addressing.
+
+This patch will fix a bug of makedumpfile doesn't work correctly on system
+has over 44-bit addressing in compression dump mode.
+This bug was posted here:
+http://lists.infradead.org/pipermail/kexec/2013-September/009587.html
+
+This patch will add 3 new fields in struct kdump_sub_header.
+unsigned long long start_pfn_64;  /* header_version 6 and later */
+unsigned long long end_pfn_64;    /* header_version 6 and later */
+unsigned long long max_mapnr_64;  /* header_version 6 and later */
+
+And the old "unsigned int max_mapnr" in struct disk_dump_header will
+not be used anymore, but still be there for compatibility purpose.
+
+The max_mapnr_64 only exists in strcut kdump_sub_header, and that only
+for compressed kdump format, so for ELF format kdump files (non-compressed),
+only the max_mapnr is available, so it still may be truncated for addresses
+exceed 44bit (above 16TB).
+
+This patch will change the header_version to 6.
+
+The corresponding patch for crash utility can be found here:
+http://lists.infradead.org/pipermail/kexec/2013-October/009750.html
+
+This patch doesn't change sadump_header.
+
+Changelog:
+v4:
+- Do not change max_mapnr_64 in kdump_sub_header in memory for old kernel.
+
+v3:
+- Change notes for max_mapnr, start_pfn and end_pfn as obsolete.
+- Remove "(32bit)" from debug messages of max_mapnr, start_pfn and end_pfn.
+- Set the 32bit start_pfn and end_pfn to UINT_MAX.
+- Remove bitmap writting enhancement to another seperate patch.
+- Change type of len_bitmap in struct DumpInfo back to unsigned long.
+
+v2:
+- Rename max_mapnr in struct kdump_sub_header to max_mapnr_64.
+- Change type of max_mapnr_64 from unsigned long to unsigned long long.
+  In x86 PAE mode on x86_32 kernel, the address may exceeds 44bit limit.
+- Add start_pfn_64, end_pfn_64 for struct kdump_sub_header.
+- Only print 64bit start_pfn_64, end_pfn_64 and max_mapnr_64
+  debug messages for disk dump header version >= 6.
+- Change type of bitmap_len in struct DumpInfo, from unsigned long to
+  unsigned long long.
+- Enhance bitmap writting function in reassemble_kdump_header().
+  Prevent bitmap writting failure if the size of bitmap is too large to
+  fit a sigle write.
+
+v1:
+- http://lists.infradead.org/pipermail/kexec/2013-September/009662.html
+
+Signed-off-by: Jingbai Ma <jingbai.ma@hp.com>
+Tested-by: Lisa Mitchell <lisa.mitchell@hp.com>
+---
+ IMPLEMENTATION | 15 ++++++++++---
+ diskdump_mod.h | 15 ++++++++++---
+ makedumpfile.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++------------
+ 3 files changed, 77 insertions(+), 20 deletions(-)
+
+diff --git a/makedumpfile-1.5.4/IMPLEMENTATION b/makedumpfile-1.5.4/IMPLEMENTATION
+index f0f3135..2f4cfd6 100644
+--- a/makedumpfile-1.5.4/IMPLEMENTATION
++++ b/makedumpfile-1.5.4/IMPLEMENTATION
+@@ -48,7 +48,9 @@
+                                                    header in blocks */
+         unsigned int            bitmap_blocks;  /* Size of Memory bitmap in
+                                                    block */
+-        unsigned int            max_mapnr;      /* = max_mapnr */
++        unsigned int            max_mapnr;      /* = max_mapnr, OBSOLETE!
++						   32bit only, full 64bit
++						   in sub header. */
+         unsigned int            total_ram_blocks;/* Number of blocks should be
+                                                    written */
+         unsigned int            device_blocks;  /* Number of total blocks in
+@@ -69,14 +71,21 @@
+         unsigned long   phys_base;
+         int             dump_level;     /* header_version 1 and later */
+ 	int		split;		/* header_version 2 and later */
+-	unsigned long	start_pfn;	/* header_version 2 and later */
+-	unsigned long	end_pfn;	/* header_version 2 and later */
++	unsigned long	start_pfn;	/* header_version 2 and later,
++					   OBSOLETE! 32bit only, full
++					   64bit in start_pfn_64. */
++	unsigned long	end_pfn;	/* header_version 2 and later,
++					   OBSOLETE! 32bit only, full
++					   64bit in end_pfn_64. */
+ 	off_t		offset_vmcoreinfo;/* header_version 3 and later */
+ 	unsigned long	size_vmcoreinfo;  /* header_version 3 and later */
+ 	off_t		offset_note;      /* header_version 4 and later */
+ 	unsigned long	size_note;        /* header_version 4 and later */
+ 	off_t		offset_eraseinfo; /* header_version 5 and later */
+ 	unsigned long	size_eraseinfo;   /* header_version 5 and later */
++	unsigned long long start_pfn_64;  /* header_version 6 and later */
++	unsigned long long end_pfn_64;	  /* header_version 6 and later */
++	unsigned long long max_mapnr_64;  /* header_version 6 and later */
+     };
+ 
+   - 1st-bitmap
+diff --git a/makedumpfile-1.5.4/diskdump_mod.h b/makedumpfile-1.5.4/diskdump_mod.h
+index 00ab852..dd24eb2 100644
+--- a/makedumpfile-1.5.4/diskdump_mod.h
++++ b/makedumpfile-1.5.4/diskdump_mod.h
+@@ -52,7 +52,9 @@ struct disk_dump_header {
+ 						   header in blocks */
+ 	unsigned int		bitmap_blocks;	/* Size of Memory bitmap in
+ 						   block */
+-	unsigned int		max_mapnr;	/* = max_mapnr */
++	unsigned int		max_mapnr;	/* = max_mapnr, OBSOLETE!
++						   32bit only, full 64bit
++						   in sub header. */
+ 	unsigned int		total_ram_blocks;/* Number of blocks should be
+ 						   written */
+ 	unsigned int		device_blocks;	/* Number of total blocks in
+@@ -71,14 +73,21 @@ struct kdump_sub_header {
+ 	unsigned long	phys_base;
+ 	int		dump_level;	/* header_version 1 and later */
+ 	int		split;		/* header_version 2 and later */
+-	unsigned long	start_pfn;	/* header_version 2 and later */
+-	unsigned long	end_pfn;	/* header_version 2 and later */
++	unsigned long	start_pfn;	/* header_version 2 and later,
++					   OBSOLETE! 32bit only, full
++					   64bit in start_pfn_64. */
++	unsigned long	end_pfn;	/* header_version 2 and later,
++					   OBSOLETE! 32bit only, full
++					   64bit in end_pfn_64. */
+ 	off_t		offset_vmcoreinfo;/* header_version 3 and later */
+ 	unsigned long	size_vmcoreinfo;  /* header_version 3 and later */
+ 	off_t		offset_note;      /* header_version 4 and later */
+ 	unsigned long	size_note;        /* header_version 4 and later */
+ 	off_t		offset_eraseinfo; /* header_version 5 and later */
+ 	unsigned long	size_eraseinfo;   /* header_version 5 and later */
++	unsigned long long start_pfn_64;  /* header_version 6 and later */
++	unsigned long long end_pfn_64;	  /* header_version 6 and later */
++	unsigned long long max_mapnr_64;  /* header_version 6 and later */
+ };
+ 
+ /* page flags */
+diff --git a/makedumpfile-1.5.4/makedumpfile.c b/makedumpfile-1.5.4/makedumpfile.c
+index 9892108..428c53e 100644
+--- a/makedumpfile-1.5.4/makedumpfile.c
++++ b/makedumpfile-1.5.4/makedumpfile.c
+@@ -23,6 +23,7 @@
+ #include <stddef.h>
+ #include <ctype.h>
+ #include <sys/time.h>
++#include <limits.h>
+ 
+ struct symbol_table	symbol_table;
+ struct size_table	size_table;
+@@ -125,7 +126,10 @@ get_max_mapnr(void)
+ 	unsigned long long max_paddr;
+ 
+ 	if (info->flag_refiltering) {
+-		info->max_mapnr = info->dh_memory->max_mapnr;
++		if (info->dh_memory->header_version >= 6)
++			info->max_mapnr = info->kh_memory->max_mapnr_64;
++		else
++			info->max_mapnr = info->dh_memory->max_mapnr;
+ 		return TRUE;
+ 	}
+ 
+@@ -802,6 +806,12 @@ get_kdump_compressed_header_info(char *filename)
+ 	DEBUG_MSG("  split            : %d\n", kh.split);
+ 	DEBUG_MSG("  start_pfn        : 0x%lx\n", kh.start_pfn);
+ 	DEBUG_MSG("  end_pfn          : 0x%lx\n", kh.end_pfn);
++	if (dh.header_version >= 6) {
++		/* A dumpfile contains full 64bit values. */
++		DEBUG_MSG("  start_pfn_64     : 0x%llx\n", kh.start_pfn_64);
++		DEBUG_MSG("  end_pfn_64       : 0x%llx\n", kh.end_pfn_64);
++		DEBUG_MSG("  max_mapnr_64     : 0x%llx\n", kh.max_mapnr_64);
++	}
+ 
+ 	info->dh_memory = malloc(sizeof(dh));
+ 	if (info->dh_memory == NULL) {
+@@ -2799,14 +2809,16 @@ int
+ initialize_bitmap_memory(void)
+ {
+ 	struct disk_dump_header	*dh;
++	struct kdump_sub_header *kh;
+ 	struct dump_bitmap *bmp;
+ 	off_t bitmap_offset;
+-	int bitmap_len, max_sect_len;
++	off_t bitmap_len, max_sect_len;
+ 	unsigned long pfn;
+ 	int i, j;
+ 	long block_size;
+ 
+ 	dh = info->dh_memory;
++	kh = info->kh_memory;
+ 	block_size = dh->block_size;
+ 
+ 	bitmap_offset
+@@ -2826,7 +2838,10 @@ initialize_bitmap_memory(void)
+ 	bmp->offset = bitmap_offset + bitmap_len / 2;
+ 	info->bitmap_memory = bmp;
+ 
+-	max_sect_len = divideup(dh->max_mapnr, BITMAP_SECT_LEN);
++	if (dh->header_version >= 6)
++		max_sect_len = divideup(kh->max_mapnr_64, BITMAP_SECT_LEN);
++	else
++		max_sect_len = divideup(dh->max_mapnr, BITMAP_SECT_LEN);
+ 	info->valid_pages = calloc(sizeof(ulong), max_sect_len);
+ 	if (info->valid_pages == NULL) {
+ 		ERRMSG("Can't allocate memory for the valid_pages. %s\n",
+@@ -4743,7 +4758,7 @@ create_2nd_bitmap(void)
+ int
+ prepare_bitmap_buffer(void)
+ {
+-	unsigned long tmp;
++	unsigned long long tmp;
+ 
+ 	/*
+ 	 * Create 2 bitmaps (1st-bitmap & 2nd-bitmap) on block_size boundary.
+@@ -4775,7 +4790,7 @@ prepare_bitmap_buffer(void)
+ int
+ prepare_bitmap_buffer_cyclic(void)
+ {
+-	unsigned long tmp;
++	unsigned long long tmp;
+ 
+ 	/*
+ 	 * Create 2 bitmaps (1st-bitmap & 2nd-bitmap) on block_size boundary.
+@@ -5190,11 +5205,12 @@ write_kdump_header(void)
+ 	 * Write common header
+ 	 */
+ 	strncpy(dh->signature, KDUMP_SIGNATURE, strlen(KDUMP_SIGNATURE));
+-	dh->header_version = 5;
++	dh->header_version = 6;
+ 	dh->block_size     = info->page_size;
+ 	dh->sub_hdr_size   = sizeof(kh) + size_note;
+ 	dh->sub_hdr_size   = divideup(dh->sub_hdr_size, dh->block_size);
+-	dh->max_mapnr      = info->max_mapnr;
++	/* dh->max_mapnr may be truncated, full 64bit in kh.max_mapnr_64 */
++	dh->max_mapnr      = MIN(info->max_mapnr, UINT_MAX);
+ 	dh->nr_cpus        = get_nr_cpus();
+ 	dh->bitmap_blocks  = divideup(info->len_bitmap, dh->block_size);
+ 	memcpy(&dh->timestamp, &info->timestamp, sizeof(dh->timestamp));
+@@ -5219,12 +5235,22 @@ write_kdump_header(void)
+ 	 */
+ 	size = sizeof(struct kdump_sub_header);
+ 	memset(&kh, 0, size);
++	/* 64bit max_mapnr_64 */
++	kh.max_mapnr_64 = info->max_mapnr;
+ 	kh.phys_base  = info->phys_base;
+ 	kh.dump_level = info->dump_level;
+ 	if (info->flag_split) {
+ 		kh.split = 1;
+-		kh.start_pfn = info->split_start_pfn;
+-		kh.end_pfn   = info->split_end_pfn;
++		/*
++		 * start_pfn and end_pfn may be truncated,
++		 * only for compatibility purpose
++		 */
++		kh.start_pfn = MIN(info->split_start_pfn, UINT_MAX);
++		kh.end_pfn   = MIN(info->split_end_pfn, UINT_MAX);
++
++		/* 64bit start_pfn_64 and end_pfn_64 */
++		kh.start_pfn_64 = info->split_start_pfn;
++		kh.end_pfn_64   = info->split_end_pfn;
+ 	}
+ 	if (has_pt_note()) {
+ 		/*
+@@ -6470,7 +6496,7 @@ int
+ write_kdump_bitmap(void)
+ {
+ 	struct cache_data bm;
+-	long buf_size;
++	long long buf_size;
+ 	off_t offset;
+ 
+ 	int ret = FALSE;
+@@ -7853,10 +7879,8 @@ store_splitting_info(void)
+ 
+ 		if (i == 0) {
+ 			memcpy(&dh, &tmp_dh, sizeof(tmp_dh));
+-			info->max_mapnr = dh.max_mapnr;
+ 			if (!set_page_size(dh.block_size))
+ 				return FALSE;
+-			DEBUG_MSG("max_mapnr    : %llx\n", info->max_mapnr);
+ 			DEBUG_MSG("page_size    : %ld\n", info->page_size);
+ 		}
+ 
+@@ -7873,11 +7897,24 @@ store_splitting_info(void)
+ 			return FALSE;
+ 
+ 		if (i == 0) {
++			if (dh.header_version >= 6)
++				info->max_mapnr = kh.max_mapnr_64;
++			else
++				info->max_mapnr = dh.max_mapnr;
++
++			DEBUG_MSG("max_mapnr    : %llx\n", info->max_mapnr);
++
+ 			info->dump_level = kh.dump_level;
+ 			DEBUG_MSG("dump_level   : %d\n", info->dump_level);
+ 		}
+-		SPLITTING_START_PFN(i) = kh.start_pfn;
+-		SPLITTING_END_PFN(i)   = kh.end_pfn;
++
++		if (dh.header_version >= 6) {
++			SPLITTING_START_PFN(i) = kh.start_pfn_64;
++			SPLITTING_END_PFN(i)   = kh.end_pfn_64;
++		} else {
++			SPLITTING_START_PFN(i) = kh.start_pfn;
++			SPLITTING_END_PFN(i)   = kh.end_pfn;
++		}
+ 		SPLITTING_OFFSET_EI(i) = kh.offset_eraseinfo;
+ 		SPLITTING_SIZE_EI(i)   = kh.size_eraseinfo;
+ 	}
+@@ -8039,6 +8076,8 @@ reassemble_kdump_header(void)
+ 	kh.split = 0;
+ 	kh.start_pfn = 0;
+ 	kh.end_pfn   = 0;
++	kh.start_pfn_64 = 0;
++	kh.end_pfn_64 = 0;
+ 
+ 	if (lseek(info->fd_dumpfile, info->page_size, SEEK_SET) < 0) {
+ 		ERRMSG("Can't seek a file(%s). %s\n",
+-- 
+1.8.3.1
+
diff --git a/SOURCES/kexec-tools-2.0.4-makedumpfile-PATCH-Support-newer-kernels.patch b/SOURCES/kexec-tools-2.0.4-makedumpfile-PATCH-Support-newer-kernels.patch
new file mode 100644
index 0000000..5e4ff19
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-makedumpfile-PATCH-Support-newer-kernels.patch
@@ -0,0 +1,47 @@
+From 1202589997ad008b18276f504c5c2b8529b41dfe Mon Sep 17 00:00:00 2001
+Message-Id: <1202589997ad008b18276f504c5c2b8529b41dfe.1380186577.git.bhe@redhat.com>
+From: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
+Date: Fri, 20 Sep 2013 09:34:57 +0900
+Subject: [PATCH] [PATCH] Support newer kernels.
+
+ A new makedumpfile supports newer kernels:
+
+       - 3.10    (x86 FLATMEM)
+       - 3.10    (x86 SPARSEMEM)
+       - 3.10    (x86_64 SPARSEMEM)
+
+Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
+Signed-off-by: Baoquan He <bhe@redhat.com>
+---
+ README         | 1 +
+ makedumpfile.h | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/makedumpfile-1.5.4/README b/makedumpfile-1.5.4/README
+index b587485..4e838d8 100644
+--- a/makedumpfile-1.5.4/README
++++ b/makedumpfile-1.5.4/README
+@@ -97,6 +97,7 @@
+   3.7    | OK | ** |    |    |    | ** |    | -- | OK | OK |    |    |
+   3.8    | OK | ** |    |    |    | ** |    | -- | OK | OK |    |    |
+   3.9    | OK | ** |    |    |    | ** |    | -- | OK | OK |    |    |
++  3.10   | OK | ** |    |    |    | ** |    | -- | OK | OK |    |    |
+ 
+   OK    : Support.
+   --    : Not support.
+diff --git a/makedumpfile-1.5.4/makedumpfile.h b/makedumpfile-1.5.4/makedumpfile.h
+index a04154e..c504bfb 100644
+--- a/makedumpfile-1.5.4/makedumpfile.h
++++ b/makedumpfile-1.5.4/makedumpfile.h
+@@ -426,7 +426,7 @@ do { \
+ #define KVER_MIN_SHIFT 16
+ #define KERNEL_VERSION(x,y,z) (((x) << KVER_MAJ_SHIFT) | ((y) << KVER_MIN_SHIFT) | (z))
+ #define OLDEST_VERSION		KERNEL_VERSION(2, 6, 15)/* linux-2.6.15 */
+-#define LATEST_VERSION		KERNEL_VERSION(3, 9, 6)/* linux-3.9.6 */
++#define LATEST_VERSION		KERNEL_VERSION(3, 10, 7)/* linux-3.10.7 */
+ 
+ /*
+  * vmcoreinfo in /proc/vmcore
+-- 
+1.8.3.1
+
diff --git a/SOURCES/kexec-tools-2.0.4-makedumpfile-Update-pfn_cyclic-when-the-cyclic-buffer-size-.patch b/SOURCES/kexec-tools-2.0.4-makedumpfile-Update-pfn_cyclic-when-the-cyclic-buffer-size-.patch
new file mode 100644
index 0000000..87b9256
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-makedumpfile-Update-pfn_cyclic-when-the-cyclic-buffer-size-.patch
@@ -0,0 +1,33 @@
+From a785fa7dd7a7bd7dcbb017d0bea8848243b0924f Mon Sep 17 00:00:00 2001
+Message-Id: <a785fa7dd7a7bd7dcbb017d0bea8848243b0924f.1382423400.git.bhe@redhat.com>
+From: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
+Date: Thu, 12 Sep 2013 08:31:28 +0900
+Subject: [PATCH 1/2] [PATCH] Update pfn_cyclic when the cyclic buffer size is
+ corrected.
+
+When the clearing bit operation for excluding free pages can overrun
+the cyclic buffer, the buffer size is changed with
+check_cyclic_buffer_overrun().
+Then pfn_cyclic should be recalculated.
+
+Reviewed-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
+Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
+---
+ makedumpfile.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/makedumpfile-1.5.4/makedumpfile.c b/makedumpfile-1.5.4/makedumpfile.c
+index 09c0d4a..164b3f1 100644
+--- a/makedumpfile-1.5.4/makedumpfile.c
++++ b/makedumpfile-1.5.4/makedumpfile.c
+@@ -4091,6 +4091,7 @@ check_cyclic_buffer_overrun(void)
+ 
+ 		bufsize = info->bufsize_cyclic;
+ 		info->bufsize_cyclic = round(bufsize, max_block_size);
++		info->pfn_cyclic = info->bufsize_cyclic * BITPERBYTE;
+ 
+ 		MSG("cyclic buffer size has been changed: %lu => %lu\n",
+ 		    bufsize, info->bufsize_cyclic);
+-- 
+1.8.3.1
+
diff --git a/SOURCES/kexec-tools-2.0.4-makedumpfile-Use-divideup-to-calculate-maximum-required-bit.patch b/SOURCES/kexec-tools-2.0.4-makedumpfile-Use-divideup-to-calculate-maximum-required-bit.patch
new file mode 100644
index 0000000..177e853
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-makedumpfile-Use-divideup-to-calculate-maximum-required-bit.patch
@@ -0,0 +1,44 @@
+From f8c8218856effc43ea01cd9394761cfb8aeaa8df Mon Sep 17 00:00:00 2001
+Message-Id: <f8c8218856effc43ea01cd9394761cfb8aeaa8df.1382423400.git.bhe@redhat.com>
+In-Reply-To: <a785fa7dd7a7bd7dcbb017d0bea8848243b0924f.1382423400.git.bhe@redhat.com>
+References: <a785fa7dd7a7bd7dcbb017d0bea8848243b0924f.1382423400.git.bhe@redhat.com>
+From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
+Date: Thu, 12 Sep 2013 13:19:00 +0900
+Subject: [PATCH 2/2] [PATCH] Use divideup() to calculate maximum required
+ bitmap size.
+
+Currently, check_cyclic_buffer_overrun() wrongly calculates maximum
+bitmap size required to represent maximum block size managed by buddy
+allocator with roundup(). Then, max_block_size is BITPERBYTE-time
+larger than its correct size. As a result, although the bug never
+affect free-page filtering since roundup(max_order_nr_pages,
+BITPERBYTE) is a multiple of divideup(max_order_nr_pages, BITPERBYTE),
+the following sanity check, (max_block_size > info->bufsize_cyclic),
+and recalculation of info->bufsize_cyclic becomes BITPERBYTE-time
+conservative and inefficient.
+
+Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
+---
+ makedumpfile.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/makedumpfile-1.5.4/makedumpfile.c b/makedumpfile-1.5.4/makedumpfile.c
+index 164b3f1..1718f88 100644
+--- a/makedumpfile-1.5.4/makedumpfile.c
++++ b/makedumpfile-1.5.4/makedumpfile.c
+@@ -4078,10 +4078,9 @@ check_cyclic_buffer_overrun(void)
+ {
+ 	int max_order = ARRAY_LENGTH(zone.free_area);
+ 	int max_order_nr_pages = 1 << (max_order - 1);
+-	unsigned long max_block_size = roundup(max_order_nr_pages, BITPERBYTE);
++	unsigned long max_block_size = divideup(max_order_nr_pages, BITPERBYTE);
+ 
+-	if (info->bufsize_cyclic %
+-	    roundup(max_order_nr_pages, BITPERBYTE)) {
++	if (info->bufsize_cyclic % max_block_size) {
+ 		unsigned long bufsize;
+ 
+ 		if (max_block_size > info->bufsize_cyclic) {
+-- 
+1.8.3.1
+
diff --git a/SOURCES/kexec-tools-2.0.4-makedumpfile-cache-Allocate-buffers-at-initialization-t.patch b/SOURCES/kexec-tools-2.0.4-makedumpfile-cache-Allocate-buffers-at-initialization-t.patch
new file mode 100644
index 0000000..8f0fbeb
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-makedumpfile-cache-Allocate-buffers-at-initialization-t.patch
@@ -0,0 +1,105 @@
+From 92563d7a7a5175ef78c4a94ee269b1b455331b4c Mon Sep 17 00:00:00 2001
+From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
+Date: Tue, 17 Sep 2013 15:29:33 +0900
+Subject: [PATCH] [PATCH 1/2] cache: Allocate buffers at initialization to
+ detect malloc() failure.
+
+malloc() is used in cache_alloc() but there's no check for it. If I
+added check in cache_alloc() directly, cache_alloc() needs to return
+one more error status and code gets somewhat complicated. Instead, I
+move malloc() in initial() to detect allocation failure at
+initialization. By this change, 8 buffers are allocated at the same
+time, no longer incrementally. However, 8 buffers are almost always
+used throughout execution. There's essential differnece from the
+incremental one.
+
+Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
+---
+ cache.c        | 29 ++++++++++++++++++++++-------
+ cache.h        |  1 +
+ makedumpfile.c |  3 +++
+ 3 files changed, 26 insertions(+), 7 deletions(-)
+
+diff --git a/makedumpfile-1.5.4/cache.c b/makedumpfile-1.5.4/cache.c
+index 3bea089..dad8d80 100644
+--- a/makedumpfile-1.5.4/cache.c
++++ b/makedumpfile-1.5.4/cache.c
+@@ -18,6 +18,7 @@
+ 
+ #include "makedumpfile.h"
+ #include "cache.h"
++#include "print_info.h"
+ 
+ struct cache_entry {
+ 	unsigned long long paddr;
+@@ -36,6 +37,25 @@ static int avail = CACHE_SIZE;
+ 
+ static struct cache used, pending;
+ 
++int
++cache_init(void)
++{
++	void *bufptr;
++	int i;
++
++	for (i = 0; i < CACHE_SIZE; ++i) {
++		bufptr = malloc(info->page_size);
++		if (bufptr == NULL) {
++			ERRMSG("Can't allocate memory for cache. %s\n",
++			       strerror(errno));
++			return FALSE;
++		}
++		pool[i].bufptr = bufptr;
++	}
++
++	return TRUE;
++}
++
+ static void
+ add_entry(struct cache *cache, struct cache_entry *entry)
+ {
+@@ -83,13 +103,8 @@ cache_alloc(unsigned long long paddr)
+ {
+ 	struct cache_entry *entry = NULL;
+ 
+-	if (avail) {
+-		void *bufptr = malloc(info->page_size);
+-		if (bufptr) {
+-			entry = &pool[--avail];
+-			entry->bufptr = bufptr;
+-		}
+-	}
++	if (avail)
++		entry = &pool[--avail];
+ 
+ 	if (!entry) {
+ 		if (used.tail) {
+diff --git a/makedumpfile-1.5.4/cache.h b/makedumpfile-1.5.4/cache.h
+index f37d883..4730e12 100644
+--- a/makedumpfile-1.5.4/cache.h
++++ b/makedumpfile-1.5.4/cache.h
+@@ -19,6 +19,7 @@
+ #ifndef _CACHE_H
+ #define _CACHE_H
+ 
++int cache_init(void);
+ void *cache_search(unsigned long long paddr);
+ void *cache_alloc(unsigned long long paddr);
+ void cache_add(unsigned long long paddr);
+diff --git a/makedumpfile-1.5.4/makedumpfile.c b/makedumpfile-1.5.4/makedumpfile.c
+index 1718f88..e01ff50 100644
+--- a/makedumpfile-1.5.4/makedumpfile.c
++++ b/makedumpfile-1.5.4/makedumpfile.c
+@@ -3017,6 +3017,9 @@ out:
+ 		DEBUG_MSG("Buffer size for the cyclic mode: %ld\n", info->bufsize_cyclic);
+ 	}
+ 
++	if (!cache_init())
++		return FALSE;
++
+ 	if (debug_info) {
+ 		if (info->flag_sadump)
+ 			(void) sadump_virt_phys_base();
+-- 
+1.8.3.1
+
diff --git a/SOURCES/kexec-tools-2.0.4-makedumpfile-cache-Reuse-entry-in-pending-list.patch b/SOURCES/kexec-tools-2.0.4-makedumpfile-cache-Reuse-entry-in-pending-list.patch
new file mode 100644
index 0000000..1438b0f
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-makedumpfile-cache-Reuse-entry-in-pending-list.patch
@@ -0,0 +1,120 @@
+From e23dc0a1aa5fa7a4429f72ff1c2fe87a87291065 Mon Sep 17 00:00:00 2001
+From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
+Date: Tue, 17 Sep 2013 15:29:38 +0900
+Subject: [PATCH] [PATCH 2/2] cache: Reuse entry in pending list.
+
+Currently, sadump_virt_phys_base() fails to calculate phys_base as
+below:
+
+$ /pub/repos/makedumpfile/makedumpfile -f -p -d 31 -x /pub3/vmcores/comparevmcore_data/vmlinux-2.6.18-363.el5 /pub3/vmcores/comparevmcore_data/vmcore-2.6.18-363.el5-sadump /pub3/vmcores/comparevmcore_data/vmcore-pd31
+Switched running mode from cyclic to non-cyclic,
+because the cyclic mode doesn't support sadump format.
+readmem: type_addr: 1, addr:296020, size:13
+readmem: type_addr: 1, addr:ffffffffff296020, size:13
+readmem: type_addr: 1, addr:ffffffffff396020, size:13
+readmem: type_addr: 1, addr:ffffffffff496020, size:13
+readmem: type_addr: 1, addr:ffffffffff596020, size:13
+readmem: type_addr: 1, addr:ffffffffff696020, size:13
+readmem: type_addr: 1, addr:ffffffffff796020, size:13
+readmem: type_addr: 1, addr:ffffffffff896020, size:13
+readmem: type_addr: 1, addr:ffffffffff996020, size:13
+readmem: type_addr: 1, addr:ffffffffffa96020, size:13
+readmem: type_addr: 1, addr:ffffffffffb96020, size:13
+readmem: type_addr: 1, addr:ffffffffffc96020, size:13
+readmem: type_addr: 1, addr:ffffffffffd96020, size:13
+readmem: type_addr: 1, addr:ffffffffffe96020, size:13
+readmem: type_addr: 1, addr:fffffffffff96020, size:13
+readmem: type_addr: 1, addr:96020, size:13
+readmem: type_addr: 1, addr:196020, size:13
+readmem: type_addr: 1, addr:296020, size:13
+readmem: type_addr: 1, addr:396020, size:13
+readmem: type_addr: 1, addr:496020, size:13
+readmem: type_addr: 1, addr:596020, size:13
+readmem: type_addr: 1, addr:696020, size:13
+readmem: type_addr: 1, addr:796020, size:13
+readmem: type_addr: 1, addr:896020, size:13
+readmem: type_addr: 1, addr:996020, size:13
+readmem: type_addr: 1, addr:a96020, size:13
+readmem: type_addr: 1, addr:b96020, size:13
+readmem: type_addr: 1, addr:c96020, size:13
+readmem: type_addr: 1, addr:d96020, size:13
+readmem: type_addr: 1, addr:e96020, size:13
+readmem: type_addr: 1, addr:f96020, size:13
+readmem: type_addr: 1, addr:1096020, size:13
+readmem: type_addr: 1, addr:1196020, size:13
+readmem: type_addr: 1, addr:1296020, size:13
+readmem: type_addr: 0, addr:ffffffff8045e260, size:32
+cpu_online_mask_init: Can't read cpu_online_mask memory.
+
+makedumpfile Failed.
+
+By git bisect, I found this bug is caused by the following commit:
+
+commit 0aff0e5174d0708bf1bfb039ab863e1fea8a1029
+Author: Petr Tesarik <ptesarik@suse.cz>
+Date:   Wed Oct 31 16:12:47 2012 +0900
+
+    [PATCH] keep dumpfile pages in a cache.
+
+Then, I found this bug happens in the following senario.
+
+If one of the readpage_xxx() methods fails reading 8 pages in a row, 8
+entries in pool are fully contained in pending list. Then,
+cache_alloc() returns NULL and this continues forever in the
+execution. In other words, there's assumption in cache_alloc() that if
+pool is fully used, they are fully in used list, not in pending list
+at all. However, the buggy path here breaks the assumption. This patch
+changes cache_alloc() so that it first tries to reuse enty in pending
+list if exists.
+
+In fact, I found this bug in ad-hoc phys_base calculation performed in
+sadump_virt_phys_base(). However, I fixed cache side since this bug
+can occur in general on every vmcore format. Crash dump can contain
+broken data in any part of vmcore and so requested physical address to
+read can be broken likewise.
+
+Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
+---
+ cache.c | 25 +++++++++++++------------
+ 1 file changed, 13 insertions(+), 12 deletions(-)
+
+diff --git a/makedumpfile-1.5.4/cache.c b/makedumpfile-1.5.4/cache.c
+index dad8d80..0dd957c 100644
+--- a/makedumpfile-1.5.4/cache.c
++++ b/makedumpfile-1.5.4/cache.c
+@@ -103,19 +103,20 @@ cache_alloc(unsigned long long paddr)
+ {
+ 	struct cache_entry *entry = NULL;
+ 
+-	if (avail)
++	if (avail) {
+ 		entry = &pool[--avail];
+-
+-	if (!entry) {
+-		if (used.tail) {
+-			entry = used.tail;
+-			remove_entry(&used, entry);
+-		} else
+-			return NULL;
+-	}
+-
+-	entry->paddr = paddr;
+-	add_entry(&pending, entry);
++		entry->paddr = paddr;
++		add_entry(&pending, entry);
++	} else if (pending.tail) {
++		entry = pending.tail;
++		entry->paddr = paddr;
++	} else if (used.tail) {
++		entry = used.tail;
++		remove_entry(&used, entry);
++		entry->paddr = paddr;
++		add_entry(&pending, entry);
++	} else
++		return NULL;
+ 
+ 	return entry->bufptr;
+ }
+-- 
+1.8.3.1
+
diff --git a/SOURCES/kexec-tools-2.0.4-makedumpfile-disable-mmap.patch b/SOURCES/kexec-tools-2.0.4-makedumpfile-disable-mmap.patch
new file mode 100644
index 0000000..125b62f
--- /dev/null
+++ b/SOURCES/kexec-tools-2.0.4-makedumpfile-disable-mmap.patch
@@ -0,0 +1,36 @@
+makedumpfile: disable mmap read
+
+There's a kernel bug for mapping mem ranges which end with
+an address not aligned to page boundry. It's still not resolved
+in upstream, so let's disable mmap read for now as a workaround.
+
+Once upstream got a right fix we can revert this patch.
+
+Signed-off-by: Dave Young <dyoung@redhat.com>
+---
+ makedumpfile.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- kexec-tools/makedumpfile-1.5.4/makedumpfile.c.orig
++++ kexec-tools/makedumpfile-1.5.4/makedumpfile.c
+@@ -3144,6 +3144,12 @@ out:
+ 	if (info->dump_level & DL_EXCLUDE_FREE)
+ 		setup_page_is_buddy();
+ 
++	/* There's a kernel bug for mapping mem ranges which end with
++	 * an address not aligned to page boundry. It's still not resolved
++	 * in upstream, so let's disable mmap read for now.
++	 */
++	info->flag_usemmap = FALSE;
++#if 0
+ 	if (!initialize_mmap()) {
+ 		/* this kernel does not support mmap of vmcore */
+ 		DEBUG_MSG("Kernel can't mmap vmcore, using reads.\n");
+@@ -3152,6 +3158,7 @@ out:
+ 		DEBUG_MSG("read %s with mmap()\n", info->name_memory);
+ 		info->flag_usemmap = TRUE;
+ 	}
++#endif
+ 
+ 	return TRUE;
+ }
diff --git a/SOURCES/mkdumprd b/SOURCES/mkdumprd
new file mode 100644
index 0000000..6de1755
--- /dev/null
+++ b/SOURCES/mkdumprd
@@ -0,0 +1,574 @@
+#!/bin/bash --norc
+# New mkdumprd
+#
+# Copyright 2011 Red Hat, Inc.
+#
+# Written by Cong Wang <amwang@redhat.com>
+#
+
+. /lib/kdump/kdump-lib.sh
+export IN_KDUMP=1
+
+conf_file="/etc/kdump.conf"
+SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa"
+SAVE_PATH=$(grep ^path $conf_file| cut -d' '  -f2)
+[ -z "$SAVE_PATH" ] && SAVE_PATH="/var/crash"
+extra_modules=""
+dracut_args=("--hostonly" "-o" "plymouth dash")
+OVERRIDE_RESETTABLE=0
+
+perror_exit() {
+    echo $@ >&2
+    exit 1
+}
+
+perror() {
+    echo $@ >&2
+}
+
+get_persistent_dev() {
+    local i _tmp _dev
+
+    _dev=$(udevadm info --query=name --name="$1" 2>/dev/null)
+    [ -z "$_dev" ] && {
+        perror_exit "Kernel dev name of $1 is not found."
+    }
+
+    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
+
+    perror "WARNING: Persistent device name of $1 not found. Using $1 as dump target name"
+    echo $1
+}
+
+add_dracut_arg() {
+    local arg qarg is_quoted=0
+    while [ $# -gt 0 ];
+    do
+        arg="${1//\'/\"}"
+        #Handle quoted substring properly for passing it to dracut_args array.
+        if [ $is_quoted -eq 0 ]; then
+            if [[ "$arg" == "\"" ]] || [[ $arg != ${arg#\"} ]]; then
+                is_quoted=1
+                arg=${arg#\"}
+            fi
+        fi
+        if [ $is_quoted -eq 1 ]; then
+            qarg="$qarg $arg"
+            if [[ "$arg" == "\"" ]] || [[ $arg != ${arg%\"} ]]; then
+                is_quoted=0
+                arg=${qarg%\"}
+                qarg=""
+            else
+                shift
+                continue
+            fi
+        fi
+        dracut_args+=("$arg")
+        shift
+    done
+}
+
+add_dracut_module() {
+    add_dracut_arg "--add" "$1"
+}
+
+add_dracut_mount() {
+    add_dracut_arg "--mount" "$1"
+}
+
+add_dracut_sshkey() {
+    add_dracut_arg "--sshkey" "$1"
+}
+
+# Generic substring function.  If $2 is in $1, return 0.
+strstr() { [[ $1 =~ $2 ]]; }
+
+target_is_root() {
+    local _t
+    _t=$(findmnt -k -n -r -o TARGET $1|sort|head -1)
+    [ "$_t" = "/" ]
+}
+
+# caller should ensure $1 is valid and mounted in 1st kernel
+to_mount() {
+    local _dev=$1 _s _t _o _mntopts _pdev
+
+    _s=$(findmnt -k -f -n -r -o SOURCE $_dev)
+    _t=$(findmnt -k -f -n -r -o TARGET,FSTYPE $_dev)
+    _o=$(findmnt -k -f -n -r -o OPTIONS $_dev)
+    _o=${_o/#ro/rw} #mount fs target as rw in 2nd kernel
+    _o="${_o},nofail" #with nofail set, systemd won't block for mount failure
+    _mntopts="$_t $_o"
+    #for non-nfs _dev converting to use udev persistent name
+    if [ -b "$_s" ]; then
+        _pdev="$(get_persistent_dev $_s)"
+        if [ $? -ne 0 ]; then
+            return 1
+        fi
+
+    else
+        _pdev=$_dev
+    fi
+
+    echo "$_pdev $_mntopts"
+}
+
+to_mount_point() {
+    echo $(findmnt -k -f -n -r -o TARGET $1)
+}
+
+is_readonly_mount() {
+    local _mnt
+    _mnt=$(findmnt -k -f -n -r -o OPTIONS $1)
+
+    #fs/proc_namespace.c: show_mountinfo():
+    #seq_puts(m, mnt->mnt_flags & MNT_READONLY ? " ro" : " rw");
+    [[ "$_mnt" =~ ^ro ]]
+}
+
+#Function: get_ssh_size
+#$1=dump target
+get_ssh_size() {
+    local _opt _out _size
+    _opt="-i $SSH_KEY_LOCATION -o BatchMode=yes -o StrictHostKeyChecking=yes"
+    _out=$(ssh -q -n $_opt $1 "df -P $SAVE_PATH")
+    [ $? -ne 0 ] && {
+        perror_exit "checking remote ssh server available size failed."
+    }
+    #ssh output removed the line break, so print $11 instead of $4
+    _size=$(echo -n $_out|tail -1 | awk '{print $11}')
+    echo -n $_size
+}
+
+#mkdir if save path does not exist on ssh dump target
+#$1=ssh dump target
+#caller should ensure write permission on $DUMP_TARGET:$SAVE_PATH
+mkdir_save_path_ssh()
+{
+    local _opt _dir
+    _opt="-i $SSH_KEY_LOCATION -o BatchMode=yes -o StrictHostKeyChecking=yes"
+    ssh -q $_opt $1 mkdir -p $SAVE_PATH 2>&1 > /dev/null
+    _ret=$?
+    if [ $_ret -ne 0 ]; then
+        perror_exit "mkdir failed on $DUMP_TARGET:$SAVE_PATH"
+    fi
+
+    #check whether user has write permission on $SAVE_PATH/$DUMP_TARGET
+    _dir=$(ssh -qn $_opt $1 mktemp -dqp $SAVE_PATH 2>/dev/null)
+    _ret=$?
+    if [ $_ret -ne 0 ]; then
+        perror_exit "Could not create temporary directory on $DUMP_TARGET:$SAVE_PATH. Make sure user has write permission on destination"
+    fi
+    ssh -q $_opt $1 rmdir $_dir
+
+    return 0
+}
+
+
+#mkdir if save path does not exist on dump target filesystem
+#$1=dump target
+#caller should ensure $1 is mounted
+mkdir_save_path_fs() {
+    local _mnt=$(to_mount_point $1)
+    local _remount="no"
+    local _ret
+
+    [ ! -d ${_mnt}/$SAVE_PATH ] && {
+        if is_readonly_mount $1; then
+            echo "Mounting $1 as read-write for creating dump directory.."
+            mount -o remount,rw $1 || {
+                perror_exit "Mounting $1 as read-write failed."
+            }
+            _remount="yes"
+        fi
+        mkdir -p ${_mnt}/$SAVE_PATH
+        _ret=$?
+        [ "$_remount" = "yes" ] && {
+            echo "Remounting $1 as read-only."
+            mount -o remount,ro $1 || {
+                perror_exit "Remounting $1 as read-only failed."
+            }
+        }
+        [ $_ret -ne 0 ] && {
+            perror_exit "Creating ${_mnt}/$SAVE_PATH failed."
+        }
+    }
+}
+
+#Function: get_fs_size
+#$1=dump target
+get_fs_size() {
+    local _mnt=$(to_mount_point $1)
+    echo -n $(df -P "${_mnt}/$SAVE_PATH"|tail -1|awk '{print $4}')
+}
+
+#Function: get_raw_size
+#$1=dump target
+get_raw_size() {
+        echo -n $(fdisk -s "$1")
+}
+
+#Function: check_size
+#$1: dump type string ('raw', 'fs', 'ssh')
+#$2: dump target
+check_size() {
+    local avail memtotal
+
+    memtotal=$(awk '/MemTotal/{print $2}' /proc/meminfo)
+    case "$1" in
+        raw)
+            avail=$(get_raw_size "$2")
+            ;;
+        ssh)
+            avail=$(get_ssh_size "$2")
+            ;;
+        fs)
+            avail=$(get_fs_size "$2")
+            ;;
+        *)
+            return
+    esac
+
+    if [ $? -ne 0 ]; then
+            perror_exit "Check dump target size failed"
+    fi
+
+    if [ $avail -lt $memtotal ]; then
+        echo "Warning: There might not be enough space to save a vmcore."
+        echo "         The size of $2 should be greater than $memtotal kilo bytes."
+    fi
+}
+
+# $1: core_collector config value
+verify_core_collector() {
+    if grep -q "^raw" $conf_file && [ "${1%% *}" != "makedumpfile" ]; then
+        echo "Warning: specifying a non-makedumpfile core collector, you will have to recover the vmcore manually."
+    fi
+    if is_ssh_dump_target || is_raw_dump_target; then
+        if [ "${1%% *}" = "makedumpfile" ]; then
+            ! strstr "$1" "-F" && {
+                perror_exit "The specified dump target needs makedumpfile \"-F\" option."
+            }
+        fi
+    fi
+}
+
+add_mount() {
+    if ! target_is_root "$1"; then
+        local _mnt=$(to_mount "$1")
+        if [ $? -ne 0 ]; then
+            exit 1
+        fi
+        add_dracut_mount "$_mnt"
+    fi
+}
+
+# get_maj_min <device>
+# Prints the major and minor of a device node.
+# Example:
+# $ get_maj_min /dev/sda2
+# 8:2
+get_maj_min() {
+    local _dev
+    _dev=$(stat -L -c '$((0x%t)):$((0x%T))' "$1" 2>/dev/null)
+    _dev=$(eval "echo $_dev")
+    echo $_dev
+}
+
+# ugly workaround for the lvm design
+# There is no volume group device,
+# so, there are no slave devices for volume groups.
+# Logical volumes only have the slave devices they really live on,
+# but you cannot create the logical volume without the volume group.
+# And the volume group might be bigger than the devices the LV needs.
+check_vol_slaves() {
+    local _lv _vg _pv
+    for i in /dev/mapper/*; do
+        _lv=$(get_maj_min $i)
+        if [[ $_lv = $2 ]]; then
+            _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null)
+            # strip space
+            _vg=$(echo $_vg)
+            if [[ $_vg ]]; then
+                for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null)
+                do
+                    check_block_and_slaves $1 $(get_maj_min $_pv) && return 0
+                done
+            fi
+        fi
+    done
+    return 1
+}
+
+# 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
+# $2 = block device in major:minor format
+check_block_and_slaves() {
+    local _x
+    [[ -b /dev/block/$2 ]] || return 1 # Not a block device? So sorry.
+    "$1" $2 && return
+    check_vol_slaves "$@" && return 0
+    if [[ -f /sys/dev/block/$2/../dev ]]; then
+        check_block_and_slaves $1 $(cat "/sys/dev/block/$2/../dev") && return 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 $1 $(cat "$_x") && return 0
+    done
+    return 1
+}
+
+to_dev_name() {
+    local dev="${1//\"/}"
+
+    case "$dev" in
+    UUID=*)
+        dev=`blkid -U "${dev#UUID=}"`
+        ;;
+    LABEL=*)
+        dev=`blkid -L "${dev#LABEL=}"`
+        ;;
+    esac
+    echo $dev
+}
+
+get_block_dump_target()
+{
+    local _target
+
+    if is_ssh_dump_target || is_nfs_dump_target; then
+        return
+    fi
+
+    _target=$(egrep "^ext[234]|^xfs|^btrfs|^minix|^raw" /etc/kdump.conf 2>/dev/null |awk '{print $2}')
+    [ -n "$_target" ] && echo $(to_dev_name $_target) && return
+
+    #get rootfs device name
+    _target=$(findmnt -k -f -n -o SOURCE /)
+    [ -b "$_target" ] && echo $(to_dev_name $_target)
+}
+
+get_default_action_target()
+{
+    local _target
+    local _action=$(grep "^default" /etc/kdump.conf 2>/dev/null | awk '{print $2}')
+    if [ -n "$_action" ] && [ "$_action" = "dump_to_rootfs" ]; then
+        #get rootfs device name
+        _target=$(findmnt -k -f -n -o SOURCE /)
+        [ -b "$_target" ] && echo $(to_dev_name $_target)
+    fi
+    return
+}
+
+get_override_resettable()
+{
+    local override_resettable
+
+    override_resettable=$(grep "^override_resettable" $conf_file)
+    if [ -n "$override_resettable" ]; then
+        OVERRIDE_RESETTABLE=$(echo $override_resettable | cut -d' '  -f2)
+        if [ "$OVERRIDE_RESETTABLE" != "0" ] && [ "$OVERRIDE_RESETTABLE" != "1" ];then
+            perror_exit "override_resettable value $OVERRIDE_RESETTABLE is invalid"
+        fi
+    fi
+}
+
+
+# $1: function name
+for_each_block_target()
+{
+    local dev majmin
+
+    #check dump target
+    dev=$(get_block_dump_target)
+
+    if [ -n "$dev" ]; then
+        majmin=$(get_maj_min $dev)
+        check_block_and_slaves $1 $majmin && return 1
+    fi
+
+    #check rootfs when default action dump_to_rootfs is set
+    dev=$(get_default_action_target)
+    if [ -n "$dev" ]; then
+        majmin=$(get_maj_min $dev)
+        check_block_and_slaves $1 $majmin && return 2
+    fi
+
+    return 0
+}
+
+
+
+#judge if a specific device with $1 is unresettable
+#return false if unresettable.
+is_unresettable()
+{
+    local path="/sys/$(udevadm info --query=all --path=/sys/dev/block/$1 | awk '/^P:/ {print $2}' | sed -e 's/\(cciss[0-9]\+\/\).*/\1/g' -e 's/\/block\/.*$//')/resettable"
+    local resettable=1
+
+    if [ -f "$path" ]
+    then
+        resettable="$(cat $path)"
+        [ $resettable -eq 0 -a "$OVERRIDE_RESETTABLE" -eq 0 ] && {
+            local device=$(udevadm info --query=all --path=/sys/dev/block/$1 | awk -F= '/DEVNAME/{print $2}')
+            echo "Device $device is unresettable"
+            return 0
+        }
+    fi
+
+    return 1
+}
+
+#check if machine is resettable.
+#return true if resettable
+check_resettable()
+{
+    local _ret _target
+
+    get_override_resettable
+
+    for_each_block_target is_unresettable
+    _ret=$?
+
+    [ $_ret -eq 0 ] && return
+
+    if [ $_ret -eq 1 ]; then
+        _target=$(get_block_dump_target)
+        perror "Can not save vmcore to target device $_target . This device can not be initialized in kdump kernel as it is not resettable"
+    elif [ $_ret -eq 2 ]; then
+        _target=$(get_default_action_target)
+        perror "Rootfs device $_target is not resettable, can not be used as the default target, please specify a default action"
+    fi
+
+    return 1
+}
+
+if ! check_resettable; then
+    exit 1
+fi
+
+# $1: maj:min
+is_crypt()
+{
+    local majmin=$1 dev line ID_FS_TYPE=""
+
+    line=$(udevadm info --query=property --path=/sys/dev/block/$majmin \
+            | grep "^ID_FS_TYPE")
+    eval "$line"
+    [[ "$ID_FS_TYPE" = "crypto_LUKS" ]] && {
+        dev=$(udevadm info --query=all --path=/sys/dev/block/$majmin | awk -F= '/DEVNAME/{print $2}')
+        perror "Device $dev is encrypted, can not be used in kdump."
+        return 0
+    }
+    return 1
+}
+
+check_crypt()
+{
+    local _ret _target
+
+    for_each_block_target is_crypt
+    _ret=$?
+
+    [ $_ret -eq 0 ] && return
+
+    if [ $_ret -eq 1 ]; then
+        _target=$(get_block_dump_target)
+        perror "Can not save vmcore to target device $_target."
+    elif [ $_ret -eq 2 ]; then
+        perror "Default action is dump_to_rootfs but can not save vmcore to root device."
+    fi
+
+    return 1
+}
+
+if ! check_crypt; then
+    exit 1
+fi
+
+# firstly get right SSH_KEY_LOCATION
+keyfile=$(awk '/^sshkey/ {print $2}' $conf_file)
+if [ -f "$keyfile" ]; then
+    # canonicalize the path
+    SSH_KEY_LOCATION=$(/usr/bin/readlink -m $keyfile)
+fi
+
+if [ "$(uname -m)" = "s390x" ]; then
+    add_dracut_module "znet"
+fi
+
+while read config_opt config_val;
+do
+    # remove inline comments after the end of a directive.
+    config_val=$(strip_comments $config_val)
+    case "$config_opt" in
+    extra_modules)
+        extra_modules="$extra_modules $config_val"
+        ;;
+    ext[234]|xfs|btrfs|minix|nfs)
+        if ! findmnt $config_val >/dev/null; then
+            perror_exit "Dump target $config_val is probably not mounted."
+        fi
+
+        if [ "$config_opt" = "nfs" ]; then
+            add_dracut_module "nfs"
+        fi
+        add_mount "$config_val"
+        mkdir_save_path_fs $config_val
+        check_size fs $config_val
+        ;;
+    raw)
+        #checking raw disk writable
+        dd if=$config_val count=1 of=/dev/null > /dev/null 2>&1 || {
+            perror_exit "Bad raw disk $config_val"
+        }
+        _praw=$(get_persistent_dev $config_val)
+        if [ $? -ne 0 ]; then
+            exit 1
+        fi
+        add_dracut_arg "--device" "$_praw"
+        check_size raw $config_val
+        ;;
+    ssh)
+        if strstr "$config_val" "@";
+        then
+            check_size ssh $config_val
+            mkdir_save_path_ssh $config_val
+            add_dracut_module "ssh-client"
+		add_dracut_sshkey "$SSH_KEY_LOCATION"
+        else
+            perror_exit "Bad ssh dump target $config_val"
+        fi
+        ;;
+    core_collector)
+        verify_core_collector "$config_val"
+        ;;
+    dracut_args)
+        add_dracut_arg $config_val
+        ;;
+    *)
+        if [ -n $(echo $config_opt | grep "^#.*$") ]
+        then
+            continue
+        fi
+        ;;
+    esac
+done < $conf_file
+
+if [ -n "$extra_modules" ]
+then
+    add_dracut_arg "--add-drivers" "$extra_modules"
+fi
+
+dracut "${dracut_args[@]}" "$@"
+_rc=$?
+sync
+exit $_rc
diff --git a/SOURCES/mkdumprd.8 b/SOURCES/mkdumprd.8
new file mode 100644
index 0000000..7faae57
--- /dev/null
+++ b/SOURCES/mkdumprd.8
@@ -0,0 +1,33 @@
+.TH MKDUMRD 8 "Fri Feb 9 2007"
+.SH NAME
+mkdumprd \- creates initial ramdisk images for kdump crash recovery 
+.SH SYNOPSIS
+\fBmkdumprd\fR [OPTION]
+
+.SH DESCRIPTION
+\fBmkdumprd\fR creates an initial ram file system for use in conjunction with
+the booting of a kernel within the kdump framework for crash recovery.
+\fBmkdumprds\fR purpose is to create an initial ram filesystem capable of copying
+the crashed systems vmcore image to a location specified in \fI/etc/kdump.conf 
+
+\fBmkdumprd\fR interrogates the running system to understand what modules need to
+be loaded in the initramfs (based on configuration retrieved from
+\fI/etc/kdump.conf)\fR
+
+\fBmkdumprd\fR add a new \fBdracut\fR module 99kdumpbase and use \fBdracut\fR
+utility to generate the initramfs.
+
+\fBmkdumprd\fR was not intended for casual use outside of the service
+initialization script for the kdump utility, and should not be run manually.  If
+you require a custom kdump initramfs image, it is suggested that you use the
+kdump service infrastructure to create one, and then manually unpack, modify and
+repack the image.
+
+
+.SH OPTIONS
+.TP
+All options here are passed to dracut directly, please refer \fBdracut\fR docs
+for the info.
+
+.SH "SEE ALSO"
+.BR dracut (8)
diff --git a/SOURCES/rhcrashkernel-param b/SOURCES/rhcrashkernel-param
new file mode 100644
index 0000000..a823e4b
--- /dev/null
+++ b/SOURCES/rhcrashkernel-param
@@ -0,0 +1,6 @@
+#!/bin/sh
+if grep -q Fedora /etc/redhat-release; then
+    echo -n
+else
+    echo crashkernel=auto
+fi
diff --git a/SPECS/kexec-tools.spec b/SPECS/kexec-tools.spec
new file mode 100644
index 0000000..47d5af4
--- /dev/null
+++ b/SPECS/kexec-tools.spec
@@ -0,0 +1,1259 @@
+Name: kexec-tools
+Version: 2.0.4
+Release: 13%{?dist}
+License: GPLv2
+Group: Applications/System
+Summary: The kexec/kdump userspace component.
+Source0: http://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.bz2
+Source1: kdumpctl
+Source2: kdump.sysconfig
+Source3: kdump.sysconfig.x86_64
+Source4: kdump.sysconfig.i386
+Source5: kdump.sysconfig.ppc64
+Source6: kdump.sysconfig.ia64
+Source7: mkdumprd
+Source8: kdump.conf
+Source9: http://downloads.sourceforge.net/project/makedumpfile/makedumpfile/1.5.4/makedumpfile-1.5.4.tar.gz
+Source10: kexec-kdump-howto.txt
+Source11: firstboot_kdump.py
+Source12: mkdumprd.8
+Source13: kexec-tools-po.tar.gz
+Source14: 98-kexec.rules
+Source15: kdump.conf.5
+Source16: kdump.service
+Source17: rhcrashkernel-param
+Source18: kdump.sysconfig.s390x
+Source19: eppic_030413.tar.gz
+Source20: kdump-lib.sh
+
+#######################################
+# These are sources for mkdumpramfs
+# Which is currently in development
+#######################################
+Source100: dracut-kdump.sh
+Source101: dracut-module-setup.sh
+Source102: dracut-monitor_dd_progress
+
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+Requires(pre): coreutils sed zlib 
+Requires: dracut, dracut-network, ethtool
+BuildRequires: zlib-devel zlib zlib-static elfutils-devel-static glib2-devel bzip2-devel ncurses-devel bison flex lzo-devel snappy-devel
+BuildRequires: pkgconfig intltool gettext 
+BuildRequires: systemd-units
+%ifarch %{ix86} x86_64 ppc64 ia64 ppc s390x
+Obsoletes: diskdumputils netdump
+%endif
+
+
+#START INSERT
+
+#
+# Patches 0 through 100 are meant for x86 kexec-tools enablement
+#
+Patch001: kexec-tools-2.0.4-Revert-kexec-lengthen-the-kernel-command-line-image.patch
+Patch002: kexec-tools-2.0.4-kexec-i386-Add-cmdline_add_memmap_internal-to-reduce.patch
+Patch003: kexec-tools-2.0.4-Revert-kexec-include-reserved-e820-sections-in-crash.patch
+
+#
+# Patches 101 through 200 are meant for x86_64 kexec-tools enablement
+#
+Patch101: kexec-tools-2.0.4-kdump-x86-Process-multiple-Crash-kernel-in-proc-iome.patch
+
+#
+# Patches 201 through 300 are meant for ia64 kexec-tools enablement
+#
+
+#
+# Patches 301 through 400 are meant for ppc64 kexec-tools enablement
+#
+Patch301: kexec-tools-2.0.4-makedumpfile-Add-vmap_area_list-definition-for-ppc-ppc64.patch
+
+#
+# Patches 401 through 500 are meant for s390 kexec-tools enablement
+#
+#
+# Patches 501 through 600 are meant for ppc kexec-tools enablement
+#
+
+#
+# Patches 601 onward are generic patches
+#
+Patch601: kexec-tools-2.0.3-disable-kexec-test.patch
+Patch604: kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch
+Patch605: kexec-tools-2.0.4-makedumpfile-PATCH-Support-newer-kernels.patch
+Patch606: kexec-tools-2.0.4-makedumpfile-Fix-max_mapnr-issue-on-system-has-over-44-b.patch
+Patch607: kexec-tools-2.0.4-makedumpfile-Update-pfn_cyclic-when-the-cyclic-buffer-size-.patch
+Patch608: kexec-tools-2.0.4-makedumpfile-Use-divideup-to-calculate-maximum-required-bit.patch
+Patch609: kexec-tools-2.0.4-makedumpfile-cache-Allocate-buffers-at-initialization-t.patch
+Patch610: kexec-tools-2.0.4-makedumpfile-cache-Reuse-entry-in-pending-list.patch
+Patch611: kexec-tools-2.0.4-makedumpfile-disable-mmap.patch
+
+%description
+kexec-tools provides /sbin/kexec binary that facilitates a new
+kernel to boot using the kernel's kexec feature either on a
+normal or a panic reboot. This package contains the /sbin/kexec
+binary and ancillary utilities that together form the userspace
+component of the kernel's kexec feature.
+
+%ifarch %{ix86} x86_64 ia64 ppc64 s390x
+%package eppic
+Requires: %{name} = %{version}
+Summary: Additional eppic_makedumpfile.so shared object
+Group: Applications/System
+
+%description eppic
+The eppic_makedumpfile.so shared object is loaded by the
+"makedumpfile --eppic" option, and is used to erase sensitive
+or confidential kernel data from a dumpfile.
+%endif
+
+%prep
+%setup -q 
+
+mkdir -p -m755 kcp
+tar -z -x -v -f %{SOURCE9}
+tar -z -x -v -f %{SOURCE19}
+
+
+%patch101 -p1
+%patch301 -p1
+%patch601 -p1
+%patch604 -p1
+%patch605 -p1
+%patch606 -p1
+%patch607 -p1
+%patch608 -p1
+%patch609 -p1
+%patch610 -p1
+%patch611 -p1
+%patch001 -p1
+%patch002 -p1
+%patch003 -p1
+
+
+tar -z -x -v -f %{SOURCE13}
+
+%ifarch ppc
+%define archdef ARCH=ppc
+%endif
+
+%build
+%ifarch ia64
+# ia64 gcc seems to have a problem adding -fexception -fstack-protect and
+# -param ssp-protect-size, like the %configure macro does
+# while that shouldn't be a problem, and it still builds fine, it results in
+# the kdump kernel hanging on kexec boot.  I don't yet know why, but since those
+# options aren't critical, I'm just overrideing them here for ia64
+export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2"
+%endif
+
+%configure \
+%ifarch ppc64
+    --host=powerpc64-redhat-linux-gnu \
+    --build=powerpc64-redhat-linux-gnu \
+%endif
+    --sbindir=/sbin
+rm -f kexec-tools.spec.in
+# setup the docs
+cp %{SOURCE10} . 
+
+make
+%ifarch %{ix86} x86_64 ia64 ppc64 s390x
+make -C eppic/libeppic
+make -C makedumpfile-1.5.4 LINKTYPE=dynamic USELZO=on USESNAPPY=on
+%endif
+make -C kexec-tools-po
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
+mkdir -p -m755 $RPM_BUILD_ROOT%{_localstatedir}/crash
+mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/man8/
+mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/man5/
+mkdir -p -m755 $RPM_BUILD_ROOT%{_docdir}
+mkdir -p -m755 $RPM_BUILD_ROOT%{_datadir}/kdump
+mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
+mkdir -p $RPM_BUILD_ROOT%{_unitdir}
+mkdir -p -m755 $RPM_BUILD_ROOT%{_bindir}
+mkdir -p -m755 $RPM_BUILD_ROOT%{_libdir}
+mkdir -p -m755 $RPM_BUILD_ROOT%{_prefix}/lib/kdump
+install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/kdumpctl
+
+SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig.%{_target_cpu}
+[ -f $SYSCONFIG ] || SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig.%{_arch}
+[ -f $SYSCONFIG ] || SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig
+install -m 644 $SYSCONFIG $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/kdump
+
+install -m 755 %{SOURCE7} $RPM_BUILD_ROOT/sbin/mkdumprd
+install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/kdump.conf
+install -m 644 kexec/kexec.8 $RPM_BUILD_ROOT%{_mandir}/man8/kexec.8
+install -m 755 %{SOURCE11} $RPM_BUILD_ROOT%{_datadir}/kdump/firstboot_kdump.py
+install -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_mandir}/man8/mkdumprd.8
+install -m 755 %{SOURCE20} $RPM_BUILD_ROOT%{_prefix}/lib/kdump/kdump-lib.sh
+%ifnarch s390x
+# For s390x the ELF header is created in the kdump kernel and therefore kexec
+# udev rules are not required
+install -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/98-kexec.rules
+%endif
+install -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_mandir}/man5/kdump.conf.5
+install -m 644 %{SOURCE16} $RPM_BUILD_ROOT%{_unitdir}/kdump.service
+mkdir -p $RPM_BUILD_ROOT/usr/sbin
+install -m 755 %{SOURCE17} $RPM_BUILD_ROOT/usr/sbin/rhcrashkernel-param
+
+%ifarch %{ix86} x86_64 ia64 ppc64 s390x
+install -m 755 makedumpfile-1.5.4/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
+install -m 644 makedumpfile-1.5.4/makedumpfile.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/makedumpfile.8.gz
+install -m 755 makedumpfile-1.5.4/eppic_makedumpfile.so $RPM_BUILD_ROOT/%{_libdir}/eppic_makedumpfile.so
+%endif
+make -C kexec-tools-po install DESTDIR=$RPM_BUILD_ROOT
+%find_lang %{name}
+
+%define remove_dracut_prefix() %(echo -n %1|sed 's/.*dracut-//g')
+
+# deal with dracut modules
+mkdir -p -m755 $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase
+cp %{SOURCE100} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE100}}
+cp %{SOURCE101} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE101}}
+cp %{SOURCE102} $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE102}}
+
+chmod 755 $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE100}}
+chmod 755 $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99kdumpbase/%{remove_dracut_prefix %{SOURCE101}}
+
+
+%define dracutlibdir %{_prefix}/lib/dracut
+#and move the custom dracut modules to the dracut directory
+mkdir -p $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/
+mv $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/* $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/
+
+%post
+# Initial installation
+%systemd_post kdump.service
+
+touch /etc/kdump.conf
+# This portion of the script is temporary.  Its only here
+# to fix up broken boxes that require special settings 
+# in /etc/sysconfig/kdump.  It will be removed when 
+# These systems are fixed.
+
+if [ -d /proc/bus/mckinley ]
+then
+	# This is for HP zx1 machines
+	# They require machvec=dig on the kernel command line
+	sed -e's/\(^KDUMP_COMMANDLINE_APPEND.*\)\("$\)/\1 machvec=dig"/' \
+	/etc/sysconfig/kdump > /etc/sysconfig/kdump.new
+	mv /etc/sysconfig/kdump.new /etc/sysconfig/kdump
+elif [ -d /proc/sgi_sn ]
+then
+	# This is for SGI SN boxes
+	# They require the --noio option to kexec 
+	# since they don't support legacy io
+	sed -e's/\(^KEXEC_ARGS.*\)\("$\)/\1 --noio"/' \
+	/etc/sysconfig/kdump > /etc/sysconfig/kdump.new
+	mv /etc/sysconfig/kdump.new /etc/sysconfig/kdump
+fi
+
+
+%postun
+%systemd_postun_with_restart kdump.service
+
+%preun
+# Package removal, not upgrade
+%systemd_preun kdump.service
+
+%triggerun -- kexec-tools < 2.0.2-3
+# Save the current service runlevel info
+# User must manually run systemd-sysv-convert --apply kdump
+# to migrate them to systemd targets
+/usr/bin/systemd-sysv-convert --save kdump >/dev/null 2>&1 ||:
+
+# Run these because the SysV package being removed won't do them
+/sbin/chkconfig --del kdump >/dev/null 2>&1 || :
+/bin/systemctl try-restart kdump.service >/dev/null 2>&1 || :
+
+
+%triggerin -- firstboot
+# we enable kdump everywhere except for paravirtualized xen domains; check here
+if [ -f /proc/xen/capabilities ]; then
+	if [ -z `grep control_d /proc/xen/capabilities` ]; then
+		exit 0
+	fi
+fi
+if [ ! -e %{_datadir}/firstboot/modules/firstboot_kdump.py ]
+then
+	ln -s %{_datadir}/kdump/firstboot_kdump.py %{_datadir}/firstboot/modules/firstboot_kdump.py
+fi
+
+%triggerin -- kernel-kdump
+touch %{_sysconfdir}/kdump.conf
+
+
+%triggerun -- firstboot
+rm -f %{_datadir}/firstboot/modules/firstboot_kdump.py
+
+%triggerpostun -- kernel kernel-xen kernel-debug kernel-PAE kernel-kdump
+# List out the initrds here, strip out version nubmers
+# and search for corresponding kernel installs, if a kernel
+# is not found, remove the corresponding kdump initrd
+
+#start by getting a list of all the kdump initrds
+MY_ARCH=`uname -m`
+if [ "$MY_ARCH" == "ia64" ]
+then
+	IMGDIR=/boot/efi/efi/redhat
+else
+	IMGDIR=/boot
+fi
+
+for i in `ls $IMGDIR/initramfs*kdump.img 2>/dev/null`
+do
+	KDVER=`echo $i | sed -e's/^.*initramfs-//' -e's/kdump.*$//'`
+	if [ ! -e $IMGDIR/vmlinuz-$KDVER ]
+	then
+		# We have found an initrd with no corresponding kernel
+		# so we should be able to remove it
+		rm -f $i
+	fi
+done
+
+%files -f %{name}.lang
+/sbin/*
+/usr/sbin/*
+%{_bindir}/*
+%{_datadir}/kdump
+%{_prefix}/lib/kdump
+%config(noreplace,missingok) %{_sysconfdir}/sysconfig/kdump
+%config(noreplace,missingok) %{_sysconfdir}/kdump.conf
+%ifnarch s390x
+%config %{_sysconfdir}/udev/rules.d/*
+%endif
+%{dracutlibdir}/modules.d/*
+%dir %{_localstatedir}/crash
+%{_mandir}/man8/*
+%{_mandir}/man5/*
+%{_unitdir}/kdump.service
+%doc News
+%doc COPYING
+%doc TODO
+%doc kexec-kdump-howto.txt
+
+%ifarch %{ix86} x86_64 ia64 ppc64 s390x
+%files eppic
+%{_libdir}/eppic_makedumpfile.so
+%endif
+
+%changelog
+* Fri Nov 15 2013 WANG Chao <chaowang@redhat.com> - 2.0.4-13
+- makedumpfile: disable mmap()
+
+* Tue Oct 29 2013 WANG Chao <chaowang@redhat.com> - 2.0.4-12
+- fix sadump format phys_base calculating error
+- kdump, x86: Process multiple Crash kernel in /proc/iomem
+- makedumpfile: wrong cyclic buffer size recalculation causes bitmap data corruption
+- Fix max_mapnr issue on system has over 44-bit addressing.
+
+* Sat Oct 12 2013 Baoquan He <bhe@redhat.com> -2.0.4-11
+- kdump-lib.sh: strip_comments is not implemented correcty
+
+* Fri Sep 27 2013 Baoquan He <bhe@redhat.com> - 2.0.4-10
+- Back port 2 revert commits
+- kdump.sysconfig: default to "nofail" mount
+
+* Fri Sep 27 2013 Baoquan He <bhe@redhat.com> - 2.0.4-9
+- Strip inline comments from the kdump config file before use
+- kdump-lib.sh: add common function strip_comments
+- Introduce kdump-lib.sh for kdump shared functions
+- kdump.service: Start kdump after network is online and remote fs is mounted
+- dracut-module-setup: _dev to be a local variable
+- kdumpctl: Run multiple kdumpctl instances one by one in serial order
+
+* Wed Aug 21 2013 Baoquan He <bhe@redhat.com> - 2.0.4-8
+- remove 98selinux dependency
+
+* Fri Aug 2  2013 Baoquan He <bhe@redhat.com> - 2.0.4-7
+- dracut-kdump.sh: add do_dump() and error out if dump vmcore fails
+- dracut-module-setup.sh: setup correct system time and time zone in 2nd kernel.
+- kernel cmdline: Remove hugepage allocations
+- Use /lib/dracut/no-emergency-shell to control action on fail
+- Revert: kdump.sysconfig: Add option action_on_fail and set its default as continue
+- dracut-kdump.sh: Redirect kdump script stdout/stderr to /dev/console
+- add snappy build
+
+* Fri Jul 12 2013 Baoquan He <bhe@redhat.com> - 2.0.4-6
+- add lzo build
+- makedumpfile: Add vmap_area_list definition for ppc/ppc64.
+- pull makedumpfile-1.5.4
+- mkdumprd: check return value of subshell
+- mkdumprd: get_persistent_dev() return original dev if no persistent dev exists.
+- dracut-kdump.sh: Merge dump_to_rootfs() to dump_fs()
+- dracut-kdump.sh: explicitly sync after each dump
+- Correct wrong weekday of changelog
+- kexec-tools.spec: Remove incorrect description in changelog
+
+* Tue Jun 25 2013 Baoquan He <bhe@redhat.com> - 2.0.4-5
+- monitor-dd-progress fix
+- rawdump: only show dd progress bar when core_collector is not makedumpfile
+- kexec-tools.spec: replaces scriptlets with new systemd macros
+- dracut-kdump.sh: umount fs right before kdump exit
+- dracut-kdump.sh: recursively umount fs and its submounts
+- dracut-kdump.sh: cleanup - using local variable names instead of $1/$2 in functions
+- dracut-kdump.sh: name the invalid vmcore to vmcore-incomplete
+- dracut-kdump.sh: Output top level information about the kdump progress.
+- kexec-kdump-howto: Add a section for debugging tips
+
+* Tue Jun 18 2013 Baoquan He <bhe@redhat.com> - 2.0.4-4
+- dracut-module-setup.sh: improve the approach to get a bridged interface list
+- dracut-module-setup.sh: cleanup - use kdump_get_mac_addr() function
+- dracut-module-setup.sh: use kernel exported mac address in kdump_get_mac_addr()
+- dracut-module-setup.sh: use perm addr of slaves to setup bonding network
+- kdump: Do not output debug messages by default
+- dracut-module-setup.sh: kdump module depends on drm module
+- mkdumprd: return error if no write permission on save path of server for ssh
+
+* Thu Jun 13 2013 Baoquan He <bhe@redhat.com> - 2.0.4-3
+- mkdumprd: remove -M option for dracut
+- kdumpctl: add selinux relabel when service startup
+- depends on dracut selinux module
+- dracut-kdump.sh: umount rootfs after dump_to_rootfs
+- kdump.sysconfig: append "panic=10" to kdump cmdline
+- kexec-kdump-howto: grubby is suggested modifing kernel cmdline
+- kexec-tools.spec: removes kexec udev rules for s390
+- kdump.sysconfig: Add option action_on_fail and set its default as continue
+- Add tab key as delimiter for core_collector in kdump.conf
+- redirect stdout to stderr
+
+* Tue May 14 2013 Baoquan He <bhe@redhat.com> - 2.0.4-2
+- kdump: Save vmcore-dmesg.txt before saving vmcore
+- Remove "ip=" overwrite to 40ip.conf
+- Add support for bridge over bond/team/vlan.
+- Fix bonding options syntax and get all specified options from ifcfg file.
+- add dracut_args option to kdump.conf
+- kexec-tools.spec: Add ethtool to dependency.
+- error out if dump target is encrypted
+
+* Wed Apr  3 2013 Baoquan He <bhe@redhat.com> - 2.0.4-1
+- Delete several patches which have been merged into kexec-tools-2.0.4
+- Revert: Release 2.0.3-72
+- Release 2.0.3-72
+- Pull kexec-tools-2.0.4
+- Check if block device as dump target is resettable
+- mkdumprd: add function perror_exit
+- Deprecate blacklist option
+
+* Wed Mar 27 2013 Baoquan He <bhe@redhat.com> - 2.0.3-71
+- Remove eppic support on ppc and s390 arch
+
+* Mon Mar 18 2013 Baoquan He <bhe@redhat.com> - 2.0.3-70
+- Change rules related to eppic in kexec-tools.spec
+
+* Thu Mar 14 2013 Baoquan He <bhe@redhat.com> - 2.0.3-69
+- Support for eppic language as a subpackage
+ 
+* Thu Mar 14 2013 Baoquan He <bhe@redhat.com> - 2.0.3-68
+- tune sysconfig to save memory usage
+- Remove useless codes related to LOGGER in kdumpctl
+- kdumpctl:print out the service status
+- Return to start() function when check_ssh_target failed
+- use findmnt instead of blkid in mkdumprd
+- check dump target mounting earlier
+- kdumpctl: rename function name check_config
+- add function to check kdump config file
+- dracut-module-setup.sh: remove UUID/LABEL quotes before using it
+- Change dump_to_rootfs to be a default option and reboot to be default action
+- Remove "-F" in CORE_COLLECTOR when dump_to_rootfs
+
+* Tue Feb 19 2013 Baoquan He <bhe@redhat.com> - 2.0.3-67
+- Remove comma which is redundant
+- Modify codes related to dump dir to make it clearer
+- Rectify the get_host_ip implementation
+- Revert: Merge an upstream patch for fix a ppc64 makedumpfile bug with with CONFIG_SPARSEMEM_EXTREME
+- pull makedumpfile 1.5.3
+
+* Tue Feb 5 2013 Dave Young <ruyang@redhat.com> - 2.0.3-66
+- Spec: remove kdump image when a corresponding kernel is removed
+- Merge an upstream patch for fix a ppc64 makedumpfile bug
+
+* Mon Jan 28 2013 Dave Young <ruyang@redhat.com> - 2.0.3-65
+- Add support for team devices
+- Update translation file po/it.po
+- remove wait for net ok function
+- add bootdev cmdline param
+- kdumpnic cmdline file name cleanup
+
+* Fri Jan 4 2013 Dave Young <ruyang@redhat.com> - 2.0.3-64
+- fix issue of exec on stack for ppc32
+
+* Fri Dec 21 2012 Dave Young <ruyang@redhat.com> - 2.0.3-63
+- revert explictly handling of PIPESTATUS
+- enable pipefail bash option
+- wrong ssh key fix
+- build fix: Update 3 po files: po/gu.po po/or.po po/zh_CN.po
+
+* Fri Dec 21 2012 Dave Young <ruyang@redhat.com> - 2.0.3-62
+- Pull translated po files from zanata
+- Optimize redundent code fetching server of network dump
+- change the dump dir format to be more readable
+
+* Wed Dec 12 2012 Dave Young <ruyang@redhat.com> - 2.0.3-61
+- firstboot:fix reserve mem ui spinbox step size
+- handle readonly mounted filesystem
+
+* Mon Dec 10 2012 Dave Young <ruyang@redhat.com> - 2.0.3-60
+- makedumpfile 1.5.1
+- Update po tar.gz
+- Add a notes for zanata process
+- Add two xmls file for po zanata translation
+- Cleanup and recreate po files
+
+* Fri Nov 16 2012 Dave Young <ruyang@redhat.com> - 2.0.3-59
+- Enable kdump service after installation
+- get MEM_RESERVED from sysfs attribute
+- get_ssh_size: use -n to redirect stdin from /dev/null
+- add random feeding code for ssh dump
+- kdump option space checking improvement
+- kdumpctl: multi dump target checking fix
+
+* Thu Oct 25 2012 Dave Young <ruyang@redhat.com> - 2.0.3-58
+- pull in two upstream patches
+
+* Thu Oct 11 2012 Dave Young <ruyang@redhat.com> - 2.0.3-57
+- improve persistent name handling
+
+* Sat Sep 29 2012 Dave Young <ruyang@redhat.com> - 2.0.3-56
+- Pull vmcore-dmesg patches from vivek
+- ppc/ppc64: compile purgatory with gcc option msoft-float
+- Update to support f18 grub2 efi config file
+- pass persistent name to dracut --device
+- pass persistent name to dracut --mount
+- use persistent name in kdump.conf of initramfs
+- mkdumprd: add function get_persistent_dev
+- remove useless uuid and label handling
+
+* Thu Sep 06 2012 Dave Young <ruyang@redhat.com> - 2.0.3-55
+- doc fix for mount dump target before mkdumprd
+- pull makedumpfile 1.5.0
+
+* Wed Aug 29 2012 Dave Young <ruyang@redhat.com> - 2.0.3-54
+- pass raw device as dracut argument
+- iscsi setup fix
+- firstboot: add automatic and manual memory reservation for rhel
+- firstboot: remove unnecessary underline shortkey
+- firstboot: fix gtk warning about non-zero page size
+- firstboot: update all kernels config in grubbyCmd
+- firstboot: add actual reserved memory widget
+- firstboot code cleanup
+- rhcrashkernel-param: echo crashkernel=auto for rhel7
+- Remove the kernel-kdump handling
+- s390x firstboot fix
+- remove elilo support
+- grub2 fix in firstboot
+- Take closing the reboot dialog as no
+- Handle new crashkernel= syntax in firstboot
+- Fix a localized string in firstboot
+- Configure kdump in firstboot
+- fix firstboot to ensure kdump svc is disabled properly
+- firstboot text domain fix
+- Update to use systemctl instead of sysv chkconfig
+- port force_rebuild kdump.conf option
+- Change return value to indicate the result of dump_raw() correctly.
+- call dracut function for default shell
+
+* Mon Jul 23 2012 Dave Young <ruyang@redhat.com> - 2.0.3-53
+- refactor net option
+- use fstab-sys to mount nfs
+- rename function dump_localfs
+- dump_localfs error path fix
+- update kexec-kdump-howto.txt about systemctl commands
+- ssh propagate alert message fix
+- remove useless dracut cmdline '-c /dev/null'
+- remove useless dracut cmdline for kernel-modules and kdumpbase
+- install core_collector in module-setup.sh
+- install extra_bins in module-setup.sh
+- remove busybox dependency
+- improve warning message of space checking
+- do not mount root twice
+- do not add fstab-sys module in dracut cmdline
+- omit dash module
+- network dns config fix
+- shell exit value fix 
+
+* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-52
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Thu Jul 5 2012 Dave Young <ruyang@redhat.com> - 2.0.3-51
+- add s390x netdev setup
+- Add s390x support
+- Cleanup temp file leaved at /tmp/
+- add check_size function for fs dump
+- add ssh check_size
+- blacklist patch apply fix
+- Respect bonding mode
+- Support dump over vlan tagged bonding
+
+* Fri Jun 22 2012 Dave Young <ruyang@redhat.com> - 2.0.3-50
+- add blacklist option, Resolves: bz805774
+- Add kdump_post and kdump_pre support, Resolves: bz805773
+- Port check_config from rhel6, Resolves: bz805778
+- raw core_collector fix
+- ssh core_collector fix
+- drcut-kdump.sh: cleanup kdump.conf check
+
+* Tue Jun 12 2012 Dave Young <ruyang@redhat.com> - 2.0.3-49
+- cleanup DUMP_INSTRUCTION handling
+- final reboot behavior fix
+- dump_rootfs for default target fix
+- add vlan support
+- fix and refactor bond handling code
+- fix and refactor bridge handling code
+- core_collector doc basic fix
+- omit plymouth module, Resolves: bz821997
+- mkdumprd manpage cleanup manpage
+- mkdumprd: remove --debug
+- mkdumprd: remove noconf
+- makedumprd: remove -d
+- kdump.conf add sshkey
+- kdump.conf remove disk_timeout
+- kdump.conf make path uncommented
+- kdump.conf.5 add default poweroff
+- kdump.conf default shell fix
+- kdump.conf default default action fix
+- kdump.conf.5 remove module option
+- kdump.conf remove kdump_pre/kdump_post
+- kdump.conf: remove link_delay
+
+* Mon May 28 2012 Dave Young <ruyang@redhat.com> - 2.0.3-48
+- do_default_action cleanup, Resolves: bz805773
+- add rhcrashkernel-param for anaconda use, Resolves: bz707441
+- Basic iscsi target dump support (software initiator), Resolves bz822701
+- Static ip configuratio support, Resolves: bz822739
+- udev rules fix, Resolves: bz808817
+
+* Thu May 3 2012 Dave Young <ruyang@redhat.com> - 2.0.3-47
+- remove dracut-files.tgz2
+
+* Wed May 2 2012 Dave Young <ruyang@redhat.com> - 2.0.3-46
+- mkdumprd: Start using --hostonly and --add kdumpbase while calling dracut
+- get_mp function cleanup
+- move kdump script order to the end of pre pivot
+- port raw dump from rhel6
+- remove multi dump
+
+* Mon Apr 23 2012 Dave Young <ruyang@redhat.com> - 2.0.3-45
+- update dracut-files.tbz2
+
+* Thu Apr 19 2012 Dave Young <dyoung@redhat.com> - 2.0.3-44
+- update ppc64 sysconfig, resolve bug 811449
+- deal with nic rename issue, resolve bug 810107
+- update x86_64 sysconfig, resolve bug 813711
+
+* Wed Apr 11 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.3-43
+- variable name fix from Dave Young.
+
+* Fri Mar 30 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.3-42
+- get ip addr with getent
+- spec: depends on dracut-network
+- Handle net option for nfs in kdump.conf correctly
+
+* Mon Feb 27 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.3-41
+- Bump this version.
+
+* Wed Feb 22 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-40
+- Fixup sysytemd service file.
+
+* Wed Feb 22 2012 Dave Young <ruyang@redhat.com> - 2.0.2-39
+- Add ssh dump support, resolve bug 789253.
+
+* Fri Jan 27 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-38
+- Pull the latest makedumpfile release, 1.4.2.
+
+* Fri Jan 27 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-37
+- Add initial NFS dump support, experimental.
+
+* Wed Jan 25 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-36
+- Really upload the dracut module.
+
+* Wed Jan 25 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-35
+- Fix various bugs for nfs dump.
+
+* Wed Jan 25 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-34
+- kdump.sh cleanup for fstab handling, from Dave Young.
+
+* Wed Jan 25 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-33
+- Handle rootfs correctly.
+
+* Tue Jan 10 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-32
+- Fix add_dracut_arg in mkdumprd.
+
+* Tue Jan 10 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-31
+- Update kdump dracut module with the latest dracut kdump branch.
+
+* Fri Dec 16 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-30
+- Update kdump dracut module to use the latest dracut feature.
+
+* Fri Sep 9 2011 Tom Callaway <spot@fedoraproject.org> - 2.0.2-29
+- fix systemd scriptlets
+
+* Wed Sep 7 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-28
+- Rename mkdumprd2 to mkdumpramfs.
+
+* Wed Aug 31 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-27
+- Add debug_mem_level debugging option, from Jan Stancek.
+  Resolve Bug 731395.
+
+* Mon Aug 15 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-26
+- Fix several issues caused by the previous revert.
+
+* Mon Aug 15 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-25
+- Switch back to old mkdumprd and also keep the new one.
+
+* Tue Aug 2 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-24
+- Fix default action handling.
+
+* Tue Aug 2 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-23
+- Install modified kdump.conf in initrd.
+
+* Tue Aug 2 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-22
+- Handle lvm in pre-pivot hook.
+
+* Tue Aug 2 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-21
+- Fix udev rules in module-setup.sh
+
+* Mon Aug 1 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-20
+- Generate udev rules in module-setup.sh
+
+* Mon Aug 1 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-19
+- Generate udev rules to handle device names.
+
+* Mon Aug 1 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-18
+- Fix dump to local filesystem and raw dump.
+
+* Mon Aug 1 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-17
+- Depend on dracut-network.
+
+* Mon Aug 1 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-16
+- Move dracut module detection code to module-setup.sh.
+
+* Thu Jul 28 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-15
+- Use shutdown module of dracut to handle reboot/shutdown/halt.
+
+* Wed Jul 27 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-14
+- Wait for loginit.
+
+* Wed Jul 27 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-13
+- Use absolute path of reboot/halt/poweroff.
+
+* Wed Jul 27 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-12
+- Don't use consolehelper, use real reboot/halt/poweroff.
+
+* Wed Jul 27 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-11
+- Rename initrd to initramfs.
+
+* Wed Jul 27 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-10
+- Don't depend on busybox, as it doesn't save much space.
+
+* Tue Jul 26 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-9
+- Parse default action.
+
+* Mon Jul 25 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-8
+- Move path/core_collector/default parsing code to initrd.
+
+* Mon Jul 25 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-7
+- Remove obsolete code in kdumpctl.
+
+* Mon Jul 25 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-6
+- Support core_collector and extran_bins.
+
+* Thu Jul 21 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-5
+- Bypass '-d' option.
+
+* Thu Jul 21 2011 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-4
+- Update initramfs infrastructure to make it working
+  with dracut.
+
+* Wed Jul 06 2011 Neil Horman <nhorman@redhat.com> - 2.0.2-3
+- Removed sysv init script from package
+
+* Mon Jul 04 2011 Neil Horman <nhorman@redhat.com> - 2.0.2-2
+- Added systemd unit file (bz 716994)
+
+* Fri Jun 24 2011 Neil Horman <nhorman@redhat.com> - 2.0.2-1
+- Updated to upstream version 2.0.2
+
+* Thu Jun 02 2011 Neil Horman <nhorman@redhat.com> - 2.0.0-47
+- Fixed misuse of readlink command after directory change (bz 710744)
+
+* Tue Apr 26 2011 Neil Horman <nhorman@redhat.com> - 2.0.0-46
+- Fix some grammer in man page (bz 673817)
+
+* Mon Mar 28 2011 Neil Horman <nhorman@redhat.com> - 2.0.0-45
+- Fix misuse of basename in mkdumprd (bz 683769)
+
+* Thu Mar 10 2011 Neil Horman <nhorman@redhat.com> - 2.0.0-44
+- Fix build break in purgatory makefile
+
+* Thu Mar 10 2011 Neil Horman <nhorman@redhat.com> - 2.0.0-43
+- Remove vestigual emitdms code and call from mkdumprd
+
+* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-42
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Fri Oct 22 2010 Neil Horman <nhorman@redhat.com> - 2.0.0-41
+- Fixed dhcp retry mechanism (bz 645734)
+
+* Wed Sep 29 2010 jkeating - 2.0.0-40
+- Rebuilt for gcc bug 634757
+
+* Wed Sep 22 2010 Neil Horman <nhorman@redhat.com> - 2.0.0-39
+- fix finding modalias/mkdumprd hang (bz 635893)
+
+* Wed Aug 11 2010 David Malcolm <dmalcolm@redhat.com> - 2.0.0-38
+- recompiling .py files against Python 2.7 (rhbz#623327)
+
+* Sun Jun 13 2010 Lubomir Rintel <lkundrak@v3.sk> - 2.0.0-37
+- Fix a syntax error in kdump init script
+
+* Sun Jun 13 2010 Lubomir Rintel <lkundrak@v3.sk> - 2.0.0-36
+- Cosmetic mkdumprd fixes (drop an unused function, streamline another)
+
+* Sat May 29 2010 CAI Qian <caiqian@redhat.com> - 2.0.0-35
+- Forward-port from F13
+- Fixed kernel text area search in kcore (bz 587750)
+
+* Sat May 29 2010 CAI Qian <caiqian@redhat.com> - 2.0.0-34
+- Massive forward-port from RHEL6
+- Update kexec-kdump-howto.txt
+- Update docs to reflect use of ext4
+- Update mkdumprd to pull in all modules needed
+- Fix mkdumprd typo
+- Removed universal add of ata_piix from mkdumprd
+- Fix infinite loop from modprobe changes
+- Fixed kexec-kdump-howto.doc for RHEL6
+- Update makedumpfile to 1.3.5
+- Improved mkdumprd run time
+- Cai's fix for broken regex
+- Fixing crashkernel syntax parsing
+- Fix initscript to return proper LSB return codes
+- Fixed bad call to resolve_dm_name
+- Added poweroff option to mkdumprd
+- Fixed readlink issue
+- Fixed x86_64 page_offset specifictaion
+- Fixed lvm setup loop to not hang
+- Added utsname support to makedumpfile for 2.6.32
+- Fix critical_disks list to exclude cciss/md
+- Add help info for -b option
+- Add ability to handle firmware hotplug events
+- Update mkdumprd to deal with changes in busybox fsck
+- Vitaly's fix to detect need for 64 bit elf
+- Fix major/minor numbers on /dev/rtc
+- Fix ssh id propogation w/ selinux
+- Add blacklist feature to kdump.conf
+- Removed rhpl code from firstboot
+- Fixed firstboot enable sense
+- Remove bogus debug comment from mkdumprd.
+- Handle SPARSEMEM properly
+- Fix scp monitoring script
+- Fix firstboot to find grub on EFI systems
+- Fixed mkdumprd to remove dup insmod
+- Fixed kdump fsck pause
+- Fixed kdump option handling
+- fixed raid5 module detection
+
+* Thu Mar 11 2010 Neil Horman <nhorman@redhat.com> - 2.0.0-33
+- Remove nash references from mkdumprd
+
+* Wed Feb 17 2010 Neil Horman <nhorman@redhat.com> - 2.0.0-32
+- Fixed spec file error
+
+* Wed Feb 17 2010 Neil Horman <nhorman@redhat.com> - 2.0.0-31
+- Adding kdump.conf man page
+- Adding disk timeout parameter (bz 566135)
+
+* Tue Dec 01 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-30
+- Fix raid support in mkdumprd (bz 519767)
+
+* Mon Nov 23 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-29
+- Updating firstboot script to RHEL-6 version (bz 539812)
+
+* Fri Nov 06 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-28
+- Added abrt infrastructure to kdump init script (bz 533370)
+
+* Tue Sep 15 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-27
+- Fixing permissions on dracut module files
+
+* Fri Sep 11 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-26
+- Rebuild for translation team (bz 522415)
+
+* Thu Sep 10 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-25
+- Fix dracut module check file (bz 522486)
+
+* Thu Aug 13 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-24
+- update kdump adv conf init script & dracut module
+
+* Wed Jul 29 2009 Neil Horman <nhorman@redhat.com> - 2.0,0-23
+- Remove mkdumprd2 and start replacement with dracut
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-22
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Mon Jul 06 2009 Neil Horman <nhorman@redhat.com> 2.0.0-21
+- Fixed build break
+
+* Mon Jul 06 2009 Neil Horman <nhorman@redhat.com> 2.0.0-20
+- Make makedumpfile a dynamic binary
+
+* Mon Jul 06 2009 Neil Horman <nhorman@redhat.com> 2.0.0-19
+- Fix build issue 
+
+* Mon Jul 06 2009 Neil Horman <nhorman@redhat.com> 2.0.0-18
+- Updated initscript to use mkdumprd2 if manifest is present
+- Updated spec to require dash
+- Updated sample manifest to point to correct initscript
+- Updated populate_std_files helper to fix sh symlink
+
+* Mon Jul 06 2009 Neil Horman <nhorman@redhat.com> 2.0.0-17
+- Fixed mkdumprd2 tarball creation
+
+* Tue Jun 23 2009 Neil Horman <nhorman@redhat.com> 2.0.0-16
+- Fix up kdump so it works with latest firstboot
+
+* Mon Jun 15 2009 Neil Horman <nhorman@redhat.com> 2.0.0-15
+- Fixed some stat drive detect bugs by E. Biederman (bz505701)
+
+* Wed May 20 2009 Neil Horman <nhorman@redhat.com> 2.0.0-14
+- Put early copy of mkdumprd2 out in the wild (bz 466392)
+
+* Fri May 08 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-13
+- Update makedumpfile to v 1.3.3 (bz 499849)
+
+* Tue Apr 07 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-12
+- Simplifed rootfs mounting code in mkdumprd (bz 494416)
+
+* Sun Apr 05 2009 Lubomir Rintel <lkundrak@v3.sk> - 2.0.0-11
+- Install the correct configuration for i586
+
+* Fri Apr 03 2009 Neil Horman <nhorman@redhat.com> - 2.0.0-10
+- Fix problem with quoted CORE_COLLECTOR string (bz 493707)
+
+* Thu Apr 02 2009 Orion Poplawski <orion@cora.nwra.com> - 2.0.0-9
+- Add BR glibc-static
+
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Thu Dec 04 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0.0-7
+- Rebuild for Python 2.6
+
+* Mon Dec 01 2008 Neil Horman <nhorman@redhat.com> - 2.0.0.6
+- adding makedumpfile man page updates (bz 473212)
+
+* Mon Dec 01 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0.0-5
+- Rebuild for Python 2.6
+
+* Wed Nov 05 2008 Neil Horman <nhorman@redhat.com> - 2.0.0-3
+- Correct source file to use proper lang package (bz 335191)
+
+* Wed Oct 29 2008 Neil Horman <nhorman@redhat.com> - 2.0.0-2
+- Fix mkdumprd typo (bz 469001)
+
+* Mon Sep 15 2008 Neil Horman <nhorman@redhat.com> - 2.0.0-2
+- Fix sysconfig files to not specify --args-linux on x86 (bz 461615)
+
+* Wed Aug 27 2008 Neil Horman <nhorman@redhat.com> - 2.0.0-1
+- Update kexec-tools to latest upstream version
+
+* Wed Aug 27 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-16
+- Fix mkdumprd to properly use UUID/LABEL search (bz 455998)
+
+* Tue Aug  5 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.102pre-15
+- fix license tag
+
+* Mon Jul 28 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-14
+- Add video reset section to docs (bz 456572)
+
+* Fri Jul 11 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-13
+- Fix mkdumprd to support dynamic busybox (bz 443878)
+
+* Wed Jun 11 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-12
+- Added lvm to bin list (bz 443878)
+
+* Thu Jun 05 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-11
+- Update to latest makedumpfile from upstream
+- Mass import of RHEL fixes missing in rawhide
+
+* Thu Apr 24 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-10
+- Fix mkdumprd to properly pull in libs for lvm/mdadm (bz 443878)
+
+* Wed Apr 16 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-9
+- Fix cmdline length issue
+
+* Tue Mar 25 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-8
+- Fixing ARCH definition for bz 438661
+
+* Mon Mar 24 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-7
+- Adding patches for bz 438661
+
+* Fri Feb 22 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-6
+- Bringing rawhide up to date with bugfixes from RHEL5
+- Adding patch to prevent kexec buffer overflow on ppc (bz 428684)
+
+* Tue Feb 19 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-5
+- Modifying mkdumprd to include dynamic executibles (bz 433350)
+
+* Tue Feb 12 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-4
+- bumping rev number for rebuild
+
+* Wed Jan 02 2008 Neil Horman <nhorman@redhat.com> - 1.102pre-3
+- Fix ARCH placement in kdump init script (bz 427201)
+- Fix BuildRequires
+- Fix Makedumpfile to build with new libelf
+
+* Mon Oct 01 2007 Neil Horman <nhorman@redhat.com> - 1.102pre-2
+- Fix triggerpostun script (bz 308151)
+
+* Thu Aug 30 2007 Neil Horman <nhorman@redhat.com> - 1.102pre-1
+- Bumping kexec version to latest horms tree (bz 257201)
+- Adding trigger to remove initrds when a kernel is removed
+
+* Wed Aug 22 2007 Neil Horman <nhorman@redhat.com> - 1.101-81
+- Add xen-syms patch to makedumpfile (bz 250341)
+
+* Wed Aug 22 2007 Neil Horman <nhorman@redhat.com> - 1.101-80
+- Fix ability to determine space on nfs shares (bz 252170)
+
+* Tue Aug 21 2007 Neil Horman <nhorman@redhat.com> - 1.101-79
+- Update kdump.init to always create sparse files (bz 253714)
+
+* Fri Aug 10 2007 Neil Horman <nhorman@redhat.com> - 1.101-78
+- Update init script to handle xen kernel cmdlnes (bz 250803)
+
+* Wed Aug 01 2007 Neil Horman <nhorman@redhat.com> - 1.101-77
+- Update mkdumprd to suppres notifications /rev makedumpfile (bz 250341)
+
+* Thu Jul 19 2007 Neil Horman <nhorman@redhat.com> - 1.101-76
+- Fix mkdumprd to suppress informative messages (bz 248797)
+
+* Wed Jul 18 2007 Neil Horman <nhorman@redhat.com> - 1.101-75
+- Updated fr.po translations (bz 248287)
+
+* Tue Jul 17 2007 Neil Horman <nhorman@redhat.com> - 1.101-74
+- Fix up add_buff to retry locate_hole on segment overlap (bz 247989)
+
+* Mon Jul 09 2007 Neil Horman <nhorman@redhat.com> - 1.101-73
+- Fix up language files for kexec (bz 246508)
+
+* Thu Jul 05 2007 Neil Horman <nhorman@redhat.com> - 1.101-72
+- Fixing up initscript for LSB (bz 246967)
+
+* Tue Jun 19 2007 Neil Horman <nhorman@redhat.com> - 1.101-71
+- Fixed conflict in mkdumprd in use of /mnt (bz 222911)
+
+* Mon Jun 18 2007 Neil Horman <nhorman@redhat.com> - 1.101-70
+- Fixed kdump.init to properly read cmdline (bz 244649)
+
+* Wed Apr 11 2007 Neil Horman <nhorman@redhat.com> - 1.101-69
+- Fixed up kdump.init to enforce mode 600 on authorized_keys2 (bz 235986)
+
+* Tue Apr 10 2007 Neil Horman <nhorman@redhat.com> - 1.101-68
+- Fix alignment of bootargs and device-tree structures on ppc64
+
+* Tue Apr 10 2007 Neil Horman <nhorman@redhat.com> - 1.101-67
+- Allow ppc to boot ppc64 kernels (bz 235608)
+
+* Tue Apr 10 2007 Neil Horman <nhorman@redhat.com> - 1.101-66
+- Reduce rmo_top to 0x7c000000 for PS3 (bz 235030)
+
+* Mon Mar 26 2007 Neil Horman <nhorman@redhat.com> - 1.101-65
+- Fix spec to own kexec_tools directory (bz 219035)
+
+* Wed Mar 21 2007 Neil Horman <nhorman@redhat.com> - 1.101-64
+- Add fix for ppc memory region computation (bz 233312)
+
+* Thu Mar 15 2007 Neil Horman <nhorman@redhat.com> - 1.101-63
+- Adding extra check to avoid oom kills on nfs mount failure (bz 215056)
+
+* Tue Mar 06 2007 Neil Horman <nhorman@redhat.com> - 1.101-62
+- Updating makedumpfile to version 1.1.1 (bz 2223743)
+
+* Thu Feb 22 2007 Neil Horman <nhorman@redhat.com> - 1.101-61
+- Adding multilanguage infrastructure to firstboot_kdump (bz 223175)
+
+* Mon Feb 12 2007 Neil Horman <nhorman@redhat.com> - 1.101-60
+- Fixing up file permissions on kdump.conf (bz 228137)
+
+* Fri Feb 09 2007 Neil Horman <nhorman@redhat.com> - 1.101-59
+- Adding mkdumprd man page to build
+
+* Thu Jan 25 2007 Neil Horman <nhorman@redhat.com> - 1.101-58
+- Updating kdump.init and mkdumprd with most recent RHEL5 fixes
+- Fixing BuildReq to require elfutils-devel-static
+
+* Thu Jan 04 2007 Neil Horman <nhorman@redhat.com> - 1.101-56
+- Fix option parsing problem for bzImage files (bz 221272)
+
+* Fri Dec 15 2006 Neil Horman <nhorman@redhat.com> - 1.101-55
+- Wholesale update of RHEL5 revisions 55-147
+
+* Tue Aug 29 2006 Neil Horman <nhorman@redhat.com> - 1.101-54
+- integrate default elf format patch
+
+* Tue Aug 29 2006 Neil Horman <nhorman@redhat.com> - 1.101-53
+- Taking Viveks x86_64 crashdump patch (rcv. via email)
+
+* Tue Aug 29 2006 Neil Horman <nhorman@redhat.com> - 1.101-52
+- Taking ia64 tools patch for bz 181358
+
+* Mon Aug 28 2006 Neil Horman <nhorman@redhat.com> - 1.101-51
+- more doc updates
+- added patch to fix build break from kernel headers change
+
+* Thu Aug 24 2006 Neil Horman <nhorman@redhat.com> - 1.101-50
+- repo patch to enable support for relocatable kernels.
+
+* Thu Aug 24 2006 Neil Horman <nhorman@redhat.com> - 1.101-49
+- rewriting kcp to properly do ssh and scp
+- updating mkdumprd to use new kcp syntax
+
+* Wed Aug 23 2006 Neil Horman <nhorman@redhat.com> - 1.101-48
+- Bumping revision number 
+
+* Tue Aug 22 2006 Jarod Wilson <jwilson@redhat.com> - 1.101-47
+- ppc64 no-more-platform fix
+
+* Mon Aug 21 2006 Jarod Wilson <jwilson@redhat.com> - 1.101-46
+- ppc64 fixups:
+  - actually build ppc64 binaries (bug 203407)
+  - correct usage output
+  - avoid segfault in command-line parsing
+- install kexec man page
+- use regulation Fedora BuildRoot
+
+* Fri Aug 18 2006 Neil Horman <nhorman@redhat.com> - 1.101-45
+- fixed typo in mkdumprd for bz 202983
+- fixed typo in mkdumprd for bz 203053
+- clarified docs in kdump.conf with examples per bz 203015
+
+* Tue Aug 15 2006 Neil Horman <nhorman@redhat.com> - 1.101-44
+- updated init script to implement status function/scrub err messages
+ 
+* Wed Aug 09 2006 Jarod Wilson <jwilson@redhat.com> - 1.101-43
+- Misc spec cleanups and macro-ifications
+
+* Wed Aug 09 2006 Jarod Wilson <jwilson@redhat.com> - 1.101-42
+- Add %dir /var/crash, so default kdump setup works
+
+* Thu Aug 03 2006 Neil Horman <nhorman@redhat.com> - 1.101-41
+- fix another silly makefile error for makedumpfile 
+
+* Thu Aug 03 2006 Neil Horman <nhorman@redhat.com> - 1.101-40
+- exclude makedumpfile from build on non-x86[_64] arches 
+
+* Thu Aug 03 2006 Neil Horman <nhorman@redhat.com> - 1.101-39
+- exclude makedumpfile from build on non-x86[_64] arches 
+
+* Thu Aug 03 2006 Neil Horman <nhorman@redhat.com> - 1.101-38
+- updating makedumpfile makefile to use pkg-config on glib-2.0
+
+* Thu Aug 03 2006 Neil Horman <nhorman@redhat.com> - 1.101-37
+- updating makedumpfile makefile to use pkg-config
+
+* Thu Aug 03 2006 Neil Horman <nhorman@redhat.com> - 1.101-36
+- Removing unneeded deps after Makefile fixup for makedumpfile
+
+* Thu Aug 03 2006 Neil Horman <nhorman@redhat.com> - 1.101-35
+- fixing up FC6/RHEL5 BuildRequires line to build in brew
+
+* Wed Aug 02 2006 Neil Horman <nhorman@redhat.com> - 1.101-34
+- enabling makedumpfile in build
+
+* Wed Aug 02 2006 Neil Horman <nhorman@redhat.com> - 1.101-33
+- added makedumpfile source to package
+
+* Mon Jul 31 2006 Neil Horman <nhorman@redhat.com> - 1.101-32
+- added et-dyn patch to allow loading of relocatable kernels
+
+* Thu Jul 27 2006 Neil Horman <nhorman@redhat.com> - 1.101-30
+- fixing up missing patch to kdump.init
+
+* Wed Jul 19 2006 Neil Horman <nhorman@redhat.com> - 1.101-30
+- add kexec frontend (bz 197695)
+
+* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.101-29
+- rebuild
+
+* Fri Jul 07 2006 Neil Horman <nhorman@redhat.com> 1.101-27.fc6
+- Buildrequire zlib-devel
+
+* Thu Jun 22 2006 Neil Horman <nhorman@redhat.com> -1.101-19
+- Bumping rev number
+
+* Thu Jun 22 2006 Neil Horman <nhorman@redhat.com> -1.101-17
+- Add patch to allow ppc64 to ignore args-linux option
+
+* Wed Mar 08 2006 Bill Nottingham <notting@redhat.com> - 1.101-16
+- fix scriptlet - call chkconfig --add, change the default in the
+  script itself (#183633)
+
+* Wed Mar 08 2006 Thomas Graf <tgraf@redhat.com> - 1.101-15
+- Don't add kdump service by default, let the user manually add it to
+  avoid everyone seeing a warning.
+
+* Tue Mar 07 2006 Thomas Graf <tgraf@redhat.com> - 1.101-14
+- Fix kdump.init to call kexec from its new location
+
+* Mon Mar  6 2006 Jeremy Katz <katzj@redhat.com> - 1.101-13
+- proper requires for scriptlets
+
+* Mon Mar 06 2006 Thomas Graf <tgraf@redhat.com> - 1.101-12
+- Move kexec and kdump binaries to /sbin
+
+* Thu Mar 02 2006 Thomas Graf <tgraf@redhat.com> - 1.101-11
+- Fix argument order when stopping kexec
+
+* Mon Feb 27 2006 Thomas Graf <tgraf@redhat.com> - 1.101-10
+- kdump7.patch
+   o Remove elf32 core headers support for x86_64
+   o Fix x86 prepare elf core header routine
+   o Fix ppc64 kexec -p failure for gcc 4.10
+   o Fix few warnings for gcc 4.10
+   o Add the missing --initrd option for ppc64
+   o Fix ppc64 persistent root device bug
+- Remove --elf32-core-headers from default configuration, users
+  may re-add it via KEXEC_ARGS.
+- Remove obsolete KEXEC_HEADERS
+* Wed Feb 22 2006 Thomas Graf <tgraf@redhat.com> - 1.101-9
+- Remove wrong quotes around --command-line in kdump.init
+
+* Fri Feb 17 2006 Jeff Moyer <jmoyer@redhat.com> - 1.101-8
+- Fix the service stop case.  It was previously unloading the wrong kernel.
+- Implement the "restart" function.
+- Add the "irqpoll" option as a default kdump kernel commandline parameter.
+- Create a default kernel command line in the sysconfig file upon rpm install.
+
+* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.101-7.1.1
+- rebuilt for new gcc4.1 snapshot and glibc changes
+
+* Thu Feb 02 2006 Thomas Graf <tgraf@redhat.com> - 1.101-7.1
+- Add patch to enable the kdump binary for x86_64
+* Wed Feb 01 2006 Thomas Graf <tgraf@redhat.com>
+- New kdump patch to support s390 arch + various fixes
+- Include kdump in x86_64 builds
+* Mon Jan 30 2006 Thomas Graf <tgraf@redhat.com>
+- New kdump patch to support x86_64 userspace
+
+* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
+- rebuilt for new gcj
+
+* Wed Nov 16 2005 Thomas Graf <tgraf@redhat.com> - 1.101-5
+- Report missing kdump kernel image as warning
+ 
+* Thu Nov  3 2005 Jeff Moyer <jmoyer@redhat.com> - 1.101-4
+- Build for x86_64 as well.  Kdump support doesn't work there, but users
+  should be able to use kexec.
+
+* Fri Sep 23 2005 Jeff Moyer <jmoyer@redhat.com> - 1.101-3
+- Add a kdump sysconfig file and init script
+- Spec file additions for pre/post install/uninstall
+
+* Thu Aug 25 2005 Jeff Moyer <jmoyer@redhat.com>
+- Initial prototype for RH/FC5