Project

General

Profile

Actions

Bug #14767

closed

Kernel textdumps are not recovered properly on systems with multiple swap partitions

Added by Vladimir Suhhanov 8 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
FreeBSD
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.09
Release Notes:
Default
Affected Version:
2.8.0
Affected Architecture:
All

Description

ZFS guided auto-install, selected zfs-mirror, two disks.
As a result we have two swap partitions in fstab

@
  1. Device Mountpoint FStype Options Dump Pass#
    /dev/gpt/efiboot0 /boot/efi msdosfs rw 2 2
    /dev/ada0p3 none swap sw 0 0
    /dev/ada1p3 none swap sw 0 0

@

Original rc.dumpon consists function

@
dumpon_try() {
if /sbin/dumpon "${1}" ; then # Create a symlink in devfs for savecore
echo "Using ${1} for dump device."
ln -fs "${1}" /dev/dumpdev
return 0
fi
echo "Unable to specify $1 as a dump device."
return 1
}

@

This function overwrites the symlink for dump device with last one tried device.
As a result we have symlink, but no dump for the savecore, because the dump is saved on the first partition, not the last one.
You can test it by entering command in console.

sysctl debug.kdb.enter=1

As a workaround, I've modified code

@
dumpon_try() {
local dump_device="$1"

if /sbin/dumpon "$dump_device" ; then
    # Create a symlink in devfs for savecore only if it doesn't exist
if [ ! -e "/dev/dumpdev" ]; then
ln -s "$dump_device" /dev/dumpdev
fi # Print a message for each dump device found
echo "Using $dump_device for dump device."
return 0
fi
echo "Unable to specify $dump_device as a dump device." 
return 1
}

@

Actions

Also available in: Atom PDF