Comment 16 for bug 785425

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 785425] Re: 0_kdump uses dynamic makedumpfile(8) binary, which fails horribly

On Thu, Nov 24, 2011 at 02:34:56PM -0000, Louis Bouchard wrote:

> As a final note, if choosen, the LD_LIBRARY_PATH option needs to be
> adapter to serve each architecture for which this can be used
> (i386,x86_64, arm & powerpc).

Yes, this is another reason that it would be simpler to mount /proc from the
script and chroot instead of passing LD_LIBRARY_PATH.

INFO="/boot/vmcoreinfo-$KVER"
CRASHFILE="/var/crash/vmcore"
MAKEDUMPFILE="/usr/bin/makedumpfile"
LOG="/var/crash/vmcore.log"

[...]

mount $rootmnt -o remount,rw
mount -n -o move /proc ${rootmnt}/proc
chroot $rootmnt $MAKEDUMPFILE -E -d 31 -i $INFO $VMCORE $CRASHFILE > $LOG 2>&1 || \
        rm -f $rootmnt/$CRASHFILE

chmod 400 $rootmnt/$CRASHFILE

mount $rootmnt -o remount,ro
reboot

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>