debian/0000775000000000000000000000000012276174054007200 5ustar debian/changelog0000664000000000000000000002323712276174053011060 0ustar makedumpfile (1.5.5-2ubuntu1) trusty; urgency=low * Merge from Debian unstable (LP: #1277065). Remaining changes: - Build makedumpfile on armel, armhf, ppc64el, and x32. -- Louis Bouchard Thu, 06 Feb 2014 13:56:52 +0100 makedumpfile (1.5.5-2) unstable; urgency=low * Drop debug kernel requirement from kdump-config [Konstantin Khlebnikov] Starting from 2.6.24 kernel provides vmcoreinfo right in vmcore, so makedumpfile can produce filtered dumps without vmlinux or slecial vmcoreinfo. Closes: #638849 * debian/kdump-config : Define Timestamp only once in variable and reuse -- Louis Bouchard Wed, 15 Jan 2014 10:29:34 +0100 makedumpfile (1.5.5-1) unstable; urgency=low [ Louis Bouchard ] * New upstream version - Reworked debian/patches to use DEP3 - Use install statement from upstream Makefile -- Louis Bouchard Thu, 19 Dec 2013 11:31:10 +0100 makedumpfile (1.5.4-1ubuntu2) trusty; urgency=low * 0003-powerpc-vmap_area_list.patch: Apply patch from RedHat to add vmap_area_list definitions on powerpc and ppc64 to fix the FTBFS. -- Adam Conrad Mon, 04 Nov 2013 22:21:00 -0700 makedumpfile (1.5.4-1ubuntu1) trusty; urgency=low * Merge from Debian unstable. Remaining changes: - Build makedumpfile on armel, armhf, ppc64el, and x32. * Stop trying to build on arm64 until upstream supports it. -- Adam Conrad Mon, 04 Nov 2013 14:04:29 -0700 makedumpfile (1.5.4-1) unstable; urgency=low [Louis Bouchard] * New upstream version -- Louis Bouchard Tue, 16 Jul 2013 16:05:09 +0200 makedumpfile (1.5.3-1ubuntu1) saucy; urgency=low * Merge from Debian unstable. Remaining changes: - Build makedumpfile on armel, armhf, arm64, and x32. -- Adam Conrad Sun, 26 May 2013 06:20:29 -0600 makedumpfile (1.5.3-1) unstable; urgency=low [ Louis Bouchard ] * New upstream version - Drop 0003-PATCH-dump-dmesg-fix-for-post-3.5-kernels.patch (included upstream) - Rebase 0002-Use-install-instead-of-cp-in-Makefile.patch -- John Wright Sun, 31 Mar 2013 20:45:37 -0700 makedumpfile (1.5.1-1ubuntu1) raring; urgency=low * Build makedumpfile on armel, armhf, arm64, and x32 (LP: #831643) -- Adam Conrad Sun, 24 Feb 2013 14:57:12 -0700 makedumpfile (1.5.1-1) unstable; urgency=low * Merge of new upstream version 1.5.1 * Add --dmesg-fix from upstream 1.5.2 for kernels 3.5 and above * Add creation of /var/crash/dmesg.{timestamp} by kdump-config -- Louis Bouchard Tue, 05 Feb 2013 09:55:43 +0100 makedumpfile (1.5.0-1) unstable; urgency=low * New upstream version 1.5.0 -- Louis Bouchard Mon, 17 Sep 2012 15:55:39 +0200 makedumpfile (1.4.4-1) unstable; urgency=low * New upstream version -- John Wright Mon, 16 Jul 2012 04:01:21 -0600 makedumpfile (1.4.3-1) unstable; urgency=low [ Louis Bouchard ] * Update packaging for upstream version 1.4.3 [ John Wright ] * Add Louis Bouchard to Uploaders. Thanks! -- John Wright Sun, 10 Jun 2012 00:34:07 -0700 makedumpfile (1.4.0-1) unstable; urgency=low * New upstream version * Drop makedumpfile-static package, since makedumpfile depends on libebl, which is no longer available statically, and nobody is depending on makedumpfile-static anyway -- John Wright Sun, 22 Jan 2012 16:49:51 -0800 makedumpfile (1.3.7-2) unstable; urgency=low * Cherry-pick upstream commits: - [PATCH] BUGFIX: Avoid SIGSEGV when specifying -V option. (5b8c2da75cbdb230019a3b956793fb768055b977) - [PATCH] Copy correct nr_cpus info to dumpfile during re-filtering. (c4f1c98a9827c1c0e41772c1954940fbf1b48048) * kdump-tools.init: Don't exit with failure status except for bad usage. This way, even if /etc/default/kdump-tools has USE_KDUMP=1 but the kernel command line or debug kernels are not set up, installation of a new version of the package will not leave it unconfigured. (Closes: #623470) -- John Wright Tue, 26 Apr 2011 20:05:16 -0700 makedumpfile (1.3.7-1) unstable; urgency=low [ John Wright ] * New upstream version * kdump-config: Clean up kernel command-line argument stripping * kdump-tools.init: Remove a stray "$" in the usage statement (Closes: #581116) [ dave medberry ] * kdump-config: Convert 3 log_failure_msg to a log_warning_msg (Closes: #594411) -- John Wright Sun, 17 Apr 2011 21:03:04 -0700 makedumpfile (1.3.5-1) unstable; urgency=low * New upstream version * Preserve upstream's original makedumpfile.8 in clean target * kdump-config: Fix a typo * Switch to the "3.0 (quilt)" source format - Remove unneeded Build-Depends on quilt * Update kdump-tools.README.Debian to reflect that recent kernels don't need a crash kernel start address * Apply patch from Petter Reinholdtsen to fix incorrect dependencies in kdump-tools.init (Closes: #569685) * Indicate support for Linux 2.6.32 - Although upstream hasn't updated its LATEST_VERSION macro, this version works without modification on Linux 2.6.32. Squelch a warning that a 2.6.32 kernel is not supported. * Backport upstream commit 4a16bd39866093f4949f8e9dc183fa2321bda22d - Fix buffer overflow when writing dh->signature -- John Wright Wed, 03 Mar 2010 17:17:35 -0700 makedumpfile (1.3.4-1) unstable; urgency=low * New upstream version. - Remove debian/patches/02-Add_x86_64_linux-2.6.31.patch - already included upstream * Upload to Debian. Changes from Ubuntu: - Switch to quilt from dpatch - Set myself as the maintainer - Don't ignore make clean errors - Update to debhelper compatibility level 7 and simplify the rules file by using dh - Install the manpage with maximum compression - Update Standards-Version to 3.8.2, adding a README.source explaining the quilt patch setup - Add ${perl:Depends} to Depends, since we ship a perl script - Add Vcs-Git and Vcs-Browser fields to debian/control - Clarify the copyright description - Provide a dynamically linked binary in the makedumpfile package, and a static binary in the makedumpfile-static package - Add lintian overrides relating to makedumpfile-static being statically linked - Remove unused Build-Depends on zip - Build a kdump-tools package that includes an init script and tools to configure kdump -- John Wright Thu, 12 Nov 2009 19:03:18 -0700 makedumpfile (1.3.3-0ubuntu4) karmic; urgency=low * debian/patches/02-Add_x86_64_linux-2.6.31.patch: - apply patch by Ken'ichi Ohmichi to support 2.6.31 on amd64 (kernel memory layout changed) -- Michael Vogt Thu, 16 Jul 2009 09:18:33 +0200 makedumpfile (1.3.3-0ubuntu3) karmic; urgency=low * debian/rules, debian/control: - add dpatch * debian/patches/01_fix_makefile: - fix make install target -- Michael Vogt Tue, 23 Jun 2009 13:14:10 +0200 makedumpfile (1.3.3-0ubuntu2) karmic; urgency=low * fix FTBFS due to missing man dir -- Michael Vogt Tue, 23 Jun 2009 09:21:08 +0200 makedumpfile (1.3.3-0ubuntu1) karmic; urgency=low * New upstream release * depends on latest libdw-dev (the previous version does not ship the required static lib) -- Michael Vogt Mon, 22 Jun 2009 16:19:42 +0200 makedumpfile (1.2.9-0ubuntu3) intrepid; urgency=low * Add missing build dependency "zip" to fix FTBFS. -- Martin Pitt Wed, 08 Oct 2008 15:11:25 +0200 makedumpfile (1.2.9-0ubuntu2) intrepid; urgency=low * Corrected FTBFS caused by a mistake in the makefile -- Michael Casadevall Mon, 06 Oct 2008 02:01:26 -0400 makedumpfile (1.2.9-0ubuntu1) intrepid; urgency=low * New upstream version (LP: #271956) * Support ia64 discontigmem kernels of linux-2.6.20+. * Support x86_64 linux-2.6.27 kernel. * Add "--vtop" option for debugging. * Add the debugging message for ia64 pgtable. * Get information from vmcoreinfo of /proc/vmcore even if -x/-i option. * Add free() for error handling. * Fix NOT_FOUND value of SIZE(nodemask_t). * Use the terminal sizes of 80 for the IMPLEMENTATION file. (Bernhard Walle) * Use static allocation instead of malloc(). * Add get_num_dumpable() function. * Remove the unused pointer. * Remove the unused code. * Make the ELF methods simple. * Merge the same code in write_elf_pages(). * Add "void" to some arguments. * Separate the dependency code to machine and linux version. * Cleanup vaddr_to_paddr() function. -- Kevin Worth Thu, 18 Sep 2008 10:34:45 -0700 makedumpfile (1.2.6-0ubuntu3) intrepid; urgency=low * Added lpia to architectures. -- Ben Collins Tue, 08 Jul 2008 10:51:37 -0400 makedumpfile (1.2.6-0ubuntu2) intrepid; urgency=low * Get rid of prerm and postinst from packaging, they were empty. * Added copyright for packaging. * Added copyright for ppc64.c to debian/copyright * Check return value of read(), gets rid of warnings. -- Ben Collins Wed, 02 Jul 2008 09:18:36 -0400 makedumpfile (1.2.6-0ubuntu1) intrepid; urgency=low * Initial release * Use _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE instead of _FILE_OFFSET_BITS=64 for correct compilation. * Added initramfs hook to install makedumpfile into initrd -- Ben Collins Wed, 18 Jun 2008 18:15:32 -0400 debian/compat0000664000000000000000000000000212264762053010375 0ustar 7 debian/kdump-tools.install0000664000000000000000000000003612264762053013044 0ustar debian/kdump-config /usr/sbin debian/kdump-tools.init0000775000000000000000000000251512264762053012350 0ustar #! /bin/sh ### BEGIN INIT INFO # Provides: kdump-tools # Required-Start: $syslog $time $local_fs $remote_fs $network # Required-Stop: $syslog # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: kdump # Description: init script to load a kdump kernel or save vmcores ### END INIT INFO PATH=/bin:/usr/bin:/sbin:/usr/sbin NAME="kdump-tools" DESC="kdump-tools" export NAME . /lib/lsb/init-functions . /lib/init/vars.sh VMCORE_FILE=/proc/vmcore KDUMP_SCRIPT=/usr/sbin/kdump-config KDUMP_DEFAULTS=/etc/default/kdump-tools [ -r $KDUMP_DEFAULTS ] && . $KDUMP_DEFAULTS [ $USE_KDUMP -ne 0 ] || exit 0; case "$1" in start) # # If we have a /proc/vmcore, then we just kdump'ed # if [ -e $VMCORE_FILE -a -s $VMCORE_FILE ]; then echo -n "Starting $DESC: " $KDUMP_SCRIPT savecore if [ $? -ne 0 -a -n "$KDUMP_FAIL_CMD" ] ; then $KDUMP_FAIL_CMD ; else date -R ; reboot -f ; fi # # Else, we've just booted and need to load the kdump kernel # else echo -n "Starting $DESC: " $KDUMP_SCRIPT load fi ;; stop) echo -n "Stopping $DESC: " $KDUMP_SCRIPT unload ;; status) $KDUMP_SCRIPT status ;; restart|force-reload) # alias the required 'force-reload' option $KDUMP_SCRIPT unload $KDUMP_SCRIPT load ;; *) echo "Usage: $0 {start|stop|status|restart|force-reload}" exit 1 esac exit 0 debian/kdump-tools.default0000664000000000000000000000540212265713671013027 0ustar # kdump-tools configuration # --------------------------------------------------------------------------- # USE_KDUMP - controls kdump will be configured # 0 - kdump kernel will not be loaded # 1 - kdump kernel will be loaded and kdump is configured # KDUMP_SYSCTL - controls when a panic occurs, using the sysctl # interface. The contents of this variable should be the # "variable=value ..." portion of the 'sysctl -w ' command. # If not set, the default value "kernel.panic_on_oops=1" will # be used. Disable this feature by setting KDUMP_SYSCTL=" " # Example - also panic on oom: # KDUMP_SYSCTL="kernel.panic_on_oops=1 vm.panic_on_oom=1" # USE_KDUMP=0 #KDUMP_SYSCTL="kernel.panic_on_oops=1" # --------------------------------------------------------------------------- # Kdump Kernel: # KDUMP_KERNEL - A full pathname to a kdump kernel. # KDUMP_INITRD - A full pathname to the kdump initrd (if used). # If these are not set, kdump-config will try to use the current kernel # and initrd if it is relocatable. Otherwise, you will need to specify # these manually. #KDUMP_KERNEL= #KDUMP_INITRD= # --------------------------------------------------------------------------- # vmcore Handling: # KDUMP_COREDIR - local path to save the vmcore to. # KDUMP_FAIL_CMD - This variable can be used to cause a reboot or # start a shell if saving the vmcore fails. If not set, "reboot -f" # is the default. # Example - start a shell if the vmcore copy fails: # KDUMP_FAIL_CMD="echo 'makedumpfile FAILED.'; /bin/bash; reboot -f" KDUMP_COREDIR="/var/crash" #KDUMP_FAIL_CMD="reboot -f" # --------------------------------------------------------------------------- # Makedumpfile options: # MAKEDUMP_ARGS - extra arguments passed to makedumpfile (8). The default, # if unset, is to pass '-c -d 31' telling makedumpfile to use compression # and reduce the corefile to in-use kernel pages only. #MAKEDUMP_ARGS="-c -d 31" # --------------------------------------------------------------------------- # Kexec/Kdump args # KDUMP_KEXEC_ARGS - Additional arguments to the kexec command used to load # the kdump kernel # Example - Use this option on x86 systems with PAE and more than # 4 gig of memory: # KDUMP_KEXEC_ARGS="--elf64-core-headers" # KDUMP_CMDLINE - The default is to use the contents of /proc/cmdline. # Set this variable to override /proc/cmdline. # KDUMP_CMDLINE_APPEND - Additional arguments to append to the command line # for the kdump kernel. If unset, it defaults to "irqpoll maxcpus=1 nousb" #KDUMP_KEXEC_ARGS="" #KDUMP_CMDLINE="" #KDUMP_CMDLINE_APPEND="irqpoll maxcpus=1 nousb" # --------------------------------------------------------------------------- # Architecture specific Overrides: debian/rules0000775000000000000000000000053012264762053010255 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_build: dh_auto_build -- LINKTYPE=dynamic override_dh_installinit: # Start right after syslog is available, and don't bother stopping # (which just unloads the kdump kernel) so that we can catch crashes # all the way until actual shutdown. dh_installinit -pkdump-tools -- start 11 2 3 4 5 . debian/patches/0000775000000000000000000000000012264762061010625 5ustar debian/patches/0002-adapt-makefile-to-debian.patch0000664000000000000000000000351012264762061016730 0ustar Description: Adapt Makefile to debian standards --- Makefile | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) --- a/Makefile +++ b/Makefile @@ -70,24 +70,16 @@ makedumpfile: $(SRC) $(OBJ_PART) $(OBJ_ARCH) $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ_PART) $(OBJ_ARCH) -rdynamic -o $@ $< $(LIBS) - echo .TH MAKEDUMPFILE 8 \"$(DATE)\" \"makedumpfile v$(VERSION)\" \"Linux System Administrator\'s Manual\" > temp.8 - grep -v "^.TH MAKEDUMPFILE 8" makedumpfile.8 >> temp.8 - mv temp.8 makedumpfile.8 - gzip -c ./makedumpfile.8 > ./makedumpfile.8.gz - echo .TH MAKEDUMPFILE.CONF 5 \"$(DATE)\" \"makedumpfile v$(VERSION)\" \"Linux System Administrator\'s Manual\" > temp.5 - grep -v "^.TH MAKEDUMPFILE.CONF 5" makedumpfile.conf.5 >> temp.5 - mv temp.5 makedumpfile.conf.5 - 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 clean: - rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz makedumpfile.conf.5.gz + rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile install: - install -m 755 -d ${DESTDIR}/usr/sbin ${DESTDIR}/usr/share/man/man5 ${DESTDIR}/usr/share/man/man8 ${DESTDIR}/etc - install -m 755 -t ${DESTDIR}/usr/sbin makedumpfile makedumpfile-R.pl - install -m 644 -t ${DESTDIR}/usr/share/man/man8 makedumpfile.8.gz - install -m 644 -t ${DESTDIR}/usr/share/man/man5 makedumpfile.conf.5.gz + install -m 755 -d ${DESTDIR}/usr/bin ${DESTDIR}/usr/share/man/man5 ${DESTDIR}/usr/share/man/man8 ${DESTDIR}/etc + install -m 755 -t ${DESTDIR}/usr/bin makedumpfile makedumpfile-R.pl + install -m 644 -t ${DESTDIR}/usr/share/man/man8 makedumpfile.8 + install -m 644 -t ${DESTDIR}/usr/share/man/man5 makedumpfile.conf.5 install -m 644 -D makedumpfile.conf ${DESTDIR}/etc/makedumpfile.conf.sample debian/patches/0001-Remove-libebl-linkage.patch0000664000000000000000000000076112264762061016324 0ustar Description: Remove libebl from link options --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ SRC_ARCH = arch/arm.c arch/x86.c arch/x86_64.c arch/ia64.c arch/ppc64.c arch/s390x.c arch/ppc.c OBJ_ARCH = arch/arm.o arch/x86.o arch/x86_64.o arch/ia64.o arch/ppc64.o arch/s390x.o arch/ppc.o -LIBS = -ldw -lbz2 -lebl -ldl -lelf -lz +LIBS = -ldw -lbz2 -ldl -lelf -lz ifneq ($(LINKTYPE), dynamic) LIBS := -static $(LIBS) endif debian/patches/series0000664000000000000000000000010512264762061012036 0ustar 0001-Remove-libebl-linkage.patch 0002-adapt-makefile-to-debian.patch debian/kdump-config0000775000000000000000000002667412265713671011532 0ustar #!/bin/bash # kdump-config # Copyright (C) 2007-2009 Hewlett-Packard Development Company, L.P. # Written by Terry Loftin # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # kdump-config # a shell script utility to manage: # * loading a kdump kernel # * unloading a kdump kernel # * saving a vmcore kdump kernel # * determining the status of kdump PATH=/bin:/usr/bin:/sbin:/usr/sbin NAME=${NAME:="kdump-config"} . /lib/lsb/init-functions . /lib/init/vars.sh # Global Setup KDUMP_DEFAULTS=/etc/default/kdump-tools [ -r $KDUMP_DEFAULTS ] && . $KDUMP_DEFAULTS KEXEC=/sbin/kexec [ -e $KEXEC ] || exit 1; KVER=`uname -r` ARCH=`uname -m` # Set up defaults KDUMP_SYSCTL=${KDUMP_SYSCTL:="kernel.panic_on_oops=1"} KDUMP_COREDIR=${KDUMP_COREDIR:=/var/crash} MAKEDUMP_ARGS=${MAKEDUMP_ARGS:="-c -d 31"} KDUMP_CMDLINE_APPEND=${KDUMP_CMDLINE_APPEND:="irqpoll maxcpus=1 nousb"} [ -d $KDUMP_COREDIR ] || mkdir -p $KDUMP_COREDIR ; IOMEM_ADDR=`grep -i "Crash kernel" /proc/iomem | sed "s/-..*//" | sed "s/^[ 0]*/0x/"` # Constants vmcore_file=/proc/vmcore sys_kexec_crash=/sys/kernel/kexec_crash_loaded kexec_cmd_file=$KDUMP_COREDIR/kexec_cmd # Utility Functions # function kdump_help() { cat <$kexec_cmd_file else log_failure_msg "failed to load kdump kernel" logger -t $NAME "failed to load kdump kernel" [ ! $DRY_RUN ] && exit 1; fi # Last step: make sure panic_on_oops is enabled if [ -x /sbin/sysctl -a "$KDUMP_SYSCTL" != " " ] ; then sysctl -w $KDUMP_SYSCTL >/dev/null fi } # Returns: none. prints warnings or exit function kdump_unload() { $KEXEC -p -u if [ $? == 0 ]; then log_success_msg "unloaded kdump kernel" logger -t $NAME "unloaded kdump kernel" else log_failure_msg "failed to unload kdump kernel" logger -t $NAME "failed to unload kdump kernel" [ ! $DRY_RUN ] && exit 1; fi } # Saving the vmcore: # Our priorities are: # 1. If the makedumpfile config link is valid, use that # 2. else if the vmlinux link is valid, use that # 3. else fallback to using: makedumpfile -d 1 -c # 4. else use cp # # TODO: implement different transport options other than # store to local disk # # Returns: 0/1 (success/fail) # Sets: KDUMP_STAMPDIR, KDUMP_COREFILE function kdump_save_core() { KDUMP_STAMP=`date +"%Y%m%d%H%M"` KDUMP_STAMPDIR="$KDUMP_COREDIR/$KDUMP_STAMP" KDUMP_CORETEMP="$KDUMP_STAMPDIR/dump-incomplete" KDUMP_COREFILE="$KDUMP_STAMPDIR/dump.$KDUMP_STAMP" KDUMP_DMESGFILE="$KDUMP_STAMPDIR/dmesg.$KDUMP_STAMP" mkdir -p $KDUMP_STAMPDIR log_action_msg "running makedumpfile $MAKEDUMP_ARGS $vmcore_file $KDUMP_CORETEMP" makedumpfile $MAKEDUMP_ARGS $vmcore_file $KDUMP_CORETEMP if [ $? -ne 0 ] ; then log_failure_msg "$NAME: makedumpfile failed, falling back to 'cp'" logger -t $NAME "makedumpfile failed, falling back to 'cp'" KDUMP_CORETEMP="$KDUMP_STAMPDIR/vmcore-incomplete" KDUMP_COREFILE="$KDUMP_STAMPDIR/vmcore.$KDUMP_STAMP" cp $vmcore_file $KDUMP_CORETEMP fi # did we succeed? if [ $? == 0 ]; then mv $KDUMP_CORETEMP $KDUMP_COREFILE log_success_msg "$NAME: saved vmcore in $KDUMP_STAMPDIR" logger -t $NAME "saved vmcore in $KDUMP_STAMPDIR" else log_failure_msg "$NAME: failed to save vmcore in $KDUMP_STAMPDIR" logger -t $NAME "failed to save vmcore in $KDUMP_STAMPDIR" fi log_action_msg "running makedumpfile --dump-dmesg $vmcore_file $KDUMP_DMESGFILE" makedumpfile --dump-dmesg $vmcore_file $KDUMP_DMESGFILE ERROR=$? if [ $ERROR -ne 0 ] ; then log_failure_msg "$NAME: makedumpfile --dump-dmesg failed. dmesg content will be unavailable" logger -t $NAME "makedumpfile --dump-dmesg failed. dmesg content will be unavailable" fi # did we succeed? if [ $ERROR == 0 ]; then log_success_msg "$NAME: saved dmesg content in $KDUMP_STAMPDIR" logger -t $NAME "saved dmesg content in $KDUMP_STAMPDIR" return 0; else log_failure_msg "$NAME: failed to save dmesg content in $KDUMP_STAMPDIR" logger -t $NAME "failed to save dmesg content in $KDUMP_STAMPDIR" return 1; fi } case "$1" in test) DRY_RUN="true" check_kdump_support; locate_kdump_kernel; kdump_load; kdump_test ;; show) DRY_RUN="true" check_kdump_support; kdump_show ;; load) check_kdump_support; locate_kdump_kernel; kdump_load; ;; unload) kdump_unload; ;; status) check_kdump_support; if [ `cat $sys_kexec_crash` -eq 1 ] ; then echo "current state : ready to kdump"; else echo "current state : Not ready to kdump"; fi exit 0; ;; savecore) kdump_save_core exit $? ;; help|-h*|--h*) kdump_help ;; *) echo "Usage: $0 {help|test|show|status|load|unload|savecore}" exit 1 ;; esac exit 0 debian/control0000664000000000000000000000272612276173775010623 0ustar Source: makedumpfile Section: devel Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: John Wright Uploaders: Louis Bouchard Standards-Version: 3.9.4 Build-Depends: debhelper (>= 7.0.50), libelf-dev, libz-dev, libdw-dev (>= 0.141-2ubuntu1), libbz2-dev Vcs-Git: git://git.debian.org/collab-maint/makedumpfile.git Vcs-Browser: http://git.debian.org/?p=collab-maint/makedumpfile.git;a=summary Package: makedumpfile Architecture: i386 amd64 powerpc ia64 lpia x32 armel armhf ppc64el Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} Recommends: crash, kexec-tools Replaces: kdump-tools (<< 1.3.4-1~) Description: VMcore extraction tool This program is used to extract a subset of the memory available either via /dev/mem or /proc/vmcore (for crashdumps). It is used to get memory images without extra uneeded information (zero pages, userspace programs, etc). Package: kdump-tools Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends}, makedumpfile, kexec-tools Description: scripts and tools for automating kdump (Linux crash dumps) kdump-tools provides an init script and a configuration script for automating the use of kdump. It uses the makedumpfile utility to reduce the size of the /proc/vmcore file based on user preferences. . After installing, please see /usr/share/doc/kdump-tools/README.Debian for information on enabling and configuring kdump. debian/makedumpfile.install0000664000000000000000000000002312264762053013225 0ustar usr/bin/* /usr/bin debian/kdump-tools.manpages0000664000000000000000000000005312264762053013170 0ustar debian/kdump-config.8 debian/kdump-tools.5 debian/kdump-config.80000664000000000000000000001255412265713671011665 0ustar .\" .TH "kdump-config" "8" "April 2007" "kdump-tools v1.1.3" "Linux System Administrator's Manual" .\" .\" # --------------------------------------------------------------------------- .\" .SH NAME kdump-config \- configure kdump, check status, or save a vmcore file .\" .\" # --------------------------------------------------------------------------- .\" .SH SYNOPSIS .HP 6 .B kdump-config { help | test | show | status | load | unload | savecore } .\" .\" # --------------------------------------------------------------------------- .\" .SH DESCRIPTION .PP .B kdump-config manages the kdump feature of the Linux kernel. When a kdump enabled kernel panics, it immediately boots into a clean kernel called the kdump kernel. The memory image of the panicked kernel will be presented in .I /proc/vmcore while the kdump kernel (or "capture kernel") is running. .B kdump-config loads the kdump kernel into the current kernel and after a kdump, captures the vmcore image via kdump kernel. .B kdump-config can take advantage of the .B linux-image-$(uname -r)-dbg package and will try to use .B makedumpfile to capture the vmcore. The .B crash tool can then be used to analyze the vmcore at a later time. .B kdump-config exits with 0 on success and 1 on failure. .\" .\" # --------------------------------------------------------------------------- .\" .SH COMMANDS .TP .B help Print a usage summary. .TP .B test Determine the parameters that would be used to load the kdump kernel, but do not load the kdump kernel. Useful for evaluating your configuration settings. .TP .B show Show current parameters and the saved kexec command from the last .BR "kdump-config load" . .TP .B status Evaluate .I /sys/kernel/kexec_crash_loaded and print a corresponding message. .TP .B load Load the kdump kernel. .TP .B unload Unload the kdump kernel. .TP .B savecore If .I /proc/vmcore exists, save it using makedumpfile. .\" .\" # --------------------------------------------------------------------------- .\" .SH FILES .TP 15 .I /etc/init.d/kdump-tools init script to automatically load a kdump kernel, or save a vmcore and reboot. .TP 15 .I /etc/default/kdump-tools configuration file .TP 15 .I /var/crash/kernel_link a link to the current debug kernel .TP 15 .I /var/crash/kexec_cmd the last kexec_cmd executed by .B kdump-config .\" .\" # --------------------------------------------------------------------------- .\" .SH DIAGNOSTICS .TP .B USE_KDUMP is not set or zero The variable .I USE_KDUMP in the file .I /etc/default/kdump-tools is 0. To use kdump, edit the file and change the value to 1. .\" .TP .B kdump is not supported by this kernel The file .I /sys/kernel/kexec_crash_loaded does not exist. This means that the currently running kernel either was not configured to support kdump, or that a crashkernel= commandline parameter was not used when the currently running kernel booted. .\" .TP .B no crashkernel= parameter in the kernel cmdline a crashkernel= commandline parameter was not used when the currently running kernel booted. You will need to add a crashkernel= parameter to your .IR /etc/lilo.conf , .I /etc/elilo.conf or grub .I /boot/grub/menu.lst file and reboot, before kdump will work. See installed READMEs for suggestions. .\" .TP .B KDUMP_KERNEL does not exist: $KDUMP_KERNEL A KDUMP_KERNEL was specified in .IR /etc/default/kdump-tools , but it cannot be found. .\" .TP .B KDUMP_INITRD does not exist: $KDUMP_INITRD A KDUMP_INITRD was specified in .IR /etc/default/kdump-tools , but it cannot be found. .\" .RS 0 .nf .B no KDUMP_KERNEL in $KDUMP_DEFAULTS and .B can't find a kdump package directory in /usr/lib .fi .RS no kdump kernel could be found. .RE .RE .RS 0 .nf .B found a linux-kdump package in $KDUMP_PKG_DIR .B but can't find a kdump kernel in $KDUMP_PKG_DIR .fi .RS this indicates a broken linux-kdump package installation. .RE .RE .RS 0 .nf .B no kdump initrd image: $KDUMP_INITRD .B an initrd will not be used .fi .RS this indicates that although a kdump kernel was found, a corresponding initrd was not found. .RE .RE .\" .TP .B kdump kernel relocation address does not match crashkernel= parameter For non-relocatable architectures, the kdump kernel must be built with a predetermined start address. This message indicates that the start address of the kdump kernel and the start address in the crashkernel= parameter do not match. .\" .TP .B failed to load kdump kernel kexec reported that it could not load the kdump kernel. .\" .TP .B failed to unload kdump kernel kexec reported that it could not unload the kdump kernel. Run 'kexec -u' directly for more detail. .\" .TP .B makedumpfile failed, falling back to 'cp' this message is printed if the .B kdump-tools init script attempts to save a .I /proc/vmcore file using makedumpfile and the save fails. .\" .TP .B failed to save vmcore in $KDUMP_STAMPDIR this message indicates that makedumpfile and the fallback method of using cp has failed. This usually occurs if pathnames are wrong or if the disk is full. .\" .\" # --------------------------------------------------------------------------- .\" .SH SEE ALSO .PP .I /usr/share/doc/kdump-tools/README .br .I /usr/share/doc/kdump-tools/README.Debian .br .BR kdump-tools (5), .BR kexec (8), .BR crash (8), .BR gdb (1), .BR makedumpfile (8) .\" .\" # --------------------------------------------------------------------------- .\" .SH AUTHOR .PP Terry Loftin debian/copyright0000664000000000000000000000171712264762053011140 0ustar This package was debianized by Ben Collins on Thu, 19 Jun 2008 12:03:09 -0400 It was downloaded from: http://sourceforge.net/projects/makedumpfile All files in this package are licensed under the GPL, version 2 or later. Copyrights as follows: debian/kdump-config, debian/kdump-config.8, debian/kdump-tools.5: * Copyright (C) 2007-2009 Hewlett-Packard Development Company, L.P. All rights reserved. diskdump_mod: * Copyright (C) 2004, 2005 David Anderson * Copyright (C) 2004, 2005 Red Hat, Inc. All rights reserved. * Copyright (C) 2005 FUJITSU LIMITED * Copyright (C) 2005 NEC Corporation ppc64.c: * Created by: Sachin Sant (sachinp@in.ibm.com) * Copyright (C) IBM Corporation, 2006. All rights reserved Copyright on the rest: * Copyright (C) 2006, 2007, 2008, 2009 NEC Corporation On Debian GNU systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. debian/source/0000775000000000000000000000000012264762053010477 5ustar debian/source/format0000664000000000000000000000001412264762053011705 0ustar 3.0 (quilt) debian/kdump-tools.50000664000000000000000000001630412265713671011552 0ustar .\" .TH "kdump-tools.conf" "5" "April 2007" "kdump-tools v1.1.3" "Linux System Administrator's Manual" .SH NAME kdump-tools.conf \- configuration file for the kdump-tools init script .SH SYNOPSIS .TP .B /etc/default/kdump-tools .SH DESCRIPTION .PP .B kdump-tools manages the kdump feature of the Linux kernel. The .I /etc/default/kdump-tools file contains local configuration settings of kdump. .PP This file is sourced into a shell script, so it's format should be consistent with shell scripting. .\" .\" # --------------------------------------------------------------------------- .\" .SH OPTIONS .TP .B USE_KDUMP Controls whether or not .B kdump-tools will take any action. If not set or 0, the .B kdump-tools init script will not run. .TP .B KDUMP_SYSCTL Controls when a panic occurs, using the .BR sysctl (8) interface. Each time a kdump kernel is loaded, .RI \*(lq "sysctl -w $KDUMP_SYSCTL" \*(rq is also executed, thus allowing the system adiminstrator to maintain customizable conditions for a kdump. The contents of this variable should be the .RI \*(lq "variable=value ..." \*(rq portion of the .RI \*(lq "sysctl -w" \*(rq command. If not set, .RI \*(lq "kernel.panic_on_oops=1" \*(rq will be used. This feature can be disabled by setting .br .B KDUMP_SYSCTL=\*(lq \*(rq See .BR sysctl (8) for more info. .\" .\" # --------------------------------------------------------------------------- .\" .TP .B KDUMP_KERNEL A full pathname to a kdump kernel (the kernel that is kexec'd at crash time in a reserved memory area, exposing the old kernel's memory for dumping). If not set, .B kdump-config will use the boot kernel as the kdump kernel if it is relocatable; otherwise you must set .B KDUMP_KERNEL in order for .B kdump-tools to work. .TP .B KDUMP_INITRD A full pathname to the kdump initrd (if used). If .I KDUMP_KERNEL is set and .I KDUMP_INITRD is not set, a warning message will be printed, and an initrd will not be used. .\" .\" # --------------------------------------------------------------------------- .\" .TP .B KDUMP_COREDIR Full path to a directory where the vmcore will be saved. Date stamped subdirectories are created each time a vmcore file is processed. If not set, .I /var/crash will be used. .TP .B KDUMP_FAIL_CMD This variable specifies a command to run if the vmcore save fails. If not set, no special action is taken. .\" .\" .\" .TP .B MAKEDUMP_ARGS Extra arguments passed to .BR makedumpfile (8). If not set, .RI \*(lq "-c -d 31" \*(rq will be used. This tells makedumpfile to use compression, and reduce the corefile to in-use kernel pages only. See .BR makedumpfile (8) for details. .\" .\" # --------------------------------------------------------------------------- .\" .TP .B KDUMP_KEXEC_ARGS Additional arguments to the kexec command used to load the kdump kernel. .TP .B KDUMP_CMDLINE Normally, the current kernel commandline is obtained from .IR /proc/cmdline . Set this variable to override .IR /proc/cmdline . .TP .B KDUMP_CMDLINE_APPEND Additional arguments to append to the command line for the kdump kernel. If not set, .RI \*(lq "irqpoll maxcpus=1 nousb" \*(rq will be used. .\" .\" # --------------------------------------------------------------------------- .\" .SH USAGE .PP .B kdump-tools is as automated as can be at this point but there are some prerequisites to using it. Additionally, some manual configuration is still required. .SS Manual Configuration .IP 1. .B USE_KDUMP is set to 0 by default. To enable .BR kdump-tools , edit the .I /etc/default/kdump-tools configuration file and set .BR USE_KDUMP=1 . .\" .\" .IP 2. .B Kernel Command line parameters \- the kernel must be booted with a .IR crashkernel = command line parameter. Some example crashkernel parameters: .nf ia64: \fIcrashkernel=384M\fR x86: \fIcrashkernel=128M\fR x86_64: \fIcrashkernel=256M\fR .fi Some users may also want to add .I nmi_watchdog=1 on certain systems. The nmi watchdog will cause the kernel to panic (and kdump) if a system hang is detected. The kernel command line parameter is generally set in one of these files: .IR /etc/default/grub , .IR /boot/grub/menu.lst , .IR /etc/elilo.conf , or .IR /etc/lilo.conf . If the command line parameter is changed, a reboot is required in order for it to take effect. .\" .\" .IP 3. .B Architectural considerations .RS .IP A) .B x86 && PAE && memory > 4 Gigabytes \- use .I KDUMP_KEXEC_ARGS="--elf64-core-headers" .IP B) .B x86 and x86_64 \- Some systems can take advantage of the nmi watchdog. Add .I nmi_watchdog=1 to the boot commandline to turn on the watchdog. The nmi interrupt will call panic if activated. .IP C) .B ia64 \- Some systems may need .IR KDUMP_KEXEC_ARGS="--noio" . Use this if the system hangs after a panic, but before the kdump kernel begins to boot. .RE .\" .\" .SS Prerequisites .IP 1. .B Boot Kernel Configuration \- The boot kernel must be configured with .IR CONFIG_KEXEC=y and, if it is also to be used as the kdump kernel, .IR CONFIG_CRASHDUMP=y . For ia64, only makedumpfile level 1 will work if the memory model selected is .IR CONFIG_DISCONTIG . .IR CONFIG_SPARSEMEM is recommended instead. .\" .\" .IP 2. .B Kdump Kernel Configuration \- The kdump kernel must be relocated or relocatable. ia64 is relocatable by default, but x86, x86_64, and powerpc must be built with .IR CONFIG_RELOCATABLE=y . Other architectures may require a predermined start location via .IR CONFIG_PHYSICAL_START . If the boot kernel is relocatable, .B kdump-tools will automatically use that kernel. Otherwise, a relocatable or relocated kernel will need to be provided. The kdump kernel can be specified in the .I /etc/default/kdump-tools file. Set the .B KDUMP_KERNEL variable and if necessary the .B KDUMP_INITRD variable to point to the provided kernel and its initrd. The kdump kernel must be configured with: .B CONFIG_CRASH_DUMP=y .\" .\" # --------------------------------------------------------------------------- .\" .SH EXAMPLES .PP Also panic and kdump on oom: .RS KDUMP_SYSCTL="kernel.panic_on_oops=1 vm.panic_on_oom=1" .RE .PP Use this option on x86 systems with PAE and more than 4 gig of memory: .RS KDUMP_KEXEC_ARGS="--elf64-core-headers" .RE .PP This option starts a shell if .B kdump-tools cannot save the vmcore file: .RS KDUMP_FAIL_CMD="/bin/bash; reboot -f" .RE .\" .\" # --------------------------------------------------------------------------- .\" .SH FILES .TP 25 .I /etc/init.d/kdump-tools an init script to automatically load a kdump kernel, or save a vmcore and reboot. .TP 25 .I /etc/default/kdump-tools the .B kdump-tools configuration file .TP 25 .I /var/crash/kernel_link a link to the current debug kernel .TP 25 .I /var/crash/kexec_cmd the last kexec_cmd executed by .B kdump-config .\" .\" # --------------------------------------------------------------------------- .\" .SH DIAGNOSTICS .PP See .BR kdump-config (8) for explanations of various error messages. .\" .\" # --------------------------------------------------------------------------- .\" .SH SEE ALSO .PP .I /usr/share/doc/kdump-tools/README .br .I /usr/share/doc/kdump-tools/README.Debian .br .BR kdump-config (8), .BR kexec (8), .BR sysctl (8), .BR makedumpfile (8), .BR crash (8), .BR gdb (1), .SH AUTHOR .PP Terry Loftin debian/kdump-tools.README.Debian0000664000000000000000000000472212265713671013525 0ustar The kdump-tools package provides init scripts and configuration files to use kdump. It is as automated as can be at this point, but some manual configuration may still be required. Specifically: 1. Kernel Configuration You must boot a kernel that was configured with: CONFIG_KEXEC=y CONFIG_CRASH_DUMP=y For ia64, you also need: CONFIG_SPARSEMEM=y For the resulting dump to be useful, you probably also want: CONFIG_DEBUG_INFO=y If you use CONFIG_DISCONTIG, then you can only use makedumpfile level 1 (omit zero pages). 2. Kdump Kernel You must have a kdump kernel, which is either relocatable or built to start at a non-default address (which you must also set in the kernel command-line parameter, see below). Linux on ia64 is always relocatable; recent x86, x86_64, and powerpc kernels have an option for this: CONFIG_RELOCATABLE=y If your architecture does not support this option, you must build it with a non-default CONFIG_PHYSICAL_START option. If your boot kernel is relocatable, kdump-config will use it as the kdump kernel. Otherwise, you will have to provide one. Once you have a relocatable crash kernel, set KDUMP_KERNEL and if necessary KDUMP_INITRD in the /etc/default/kdump-tools file. The kdump kernel needs to be configured with: CONFIG_CRASH_DUMP=y 3. Kernel Command line parameter You must boot your kernel with a 'crashkernel=' command line parameter, for example: crashkernel=128M That will reserve 128 MB of memory for the kdump kernel to use in case of a crash. See Documentation/kdump/kdump.txt in the Linux source for more advanced crashkernel parameter syntax. You may also want to add 'nmi_watchdog=1' on certain systems. 4. Local Configuration The /etc/default/kdump-tools file can be modified to reflect your setup, if automatic detection fails, or if you need specific architectural settings. 5. Architectural considerations A) x86 && PAE && memory > 4 Gigabytes will need to use KDUMP_KEXEC_ARGS="--elf64-core-headers" B) x86 and x86_64 Some systems can take advantage of the nmi watchdog. Add nmi_watchdog=1 to the boot commandline to turn on the watchdog. The nmi interrupt will call panic if activated. C) ia64 some systems may need KDUMP_KEXEC_ARGS="--noio". Use this if the system hangs after a panic, but before the kdump kernel begins to boot. debian/makedumpfile.manpages0000664000000000000000000000004312264762053013354 0ustar makedumpfile.8 makedumpfile.conf.5