1

I can't seem to figure out how to enable or disable kernel crash dump.

enter image description here

Edit:

root@virtual-VirtualBox:~# sudo apt install linux-crashdump
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  crash kdump-tools kexec-tools libdw1 libelf1 makedumpfile
The following NEW packages will be installed:
  crash kdump-tools kexec-tools libdw1 linux-crashdump
  makedumpfile
The following packages will be upgraded:
  libelf1
1 upgraded, 6 newly installed, 0 to remove and 378 not upgraded.
Need to get 3,175 kB of archives.
After this operation, 9,731 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libelf1 amd64 0.165-3ubuntu1.2 [43.5 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 crash amd64 7.2.3+real-1~16.04.1 [2,680 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 kexec-tools amd64 1:2.0.16-1ubuntu1~16.04.1 [77.4 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdw1 amd64 0.165-3ubuntu1.2 [192 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 makedumpfile amd64 1:1.6.3-2~16.04.3 [156 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 kdump-tools amd64 1:1.6.3-2~16.04.3 [23.3 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-crashdump amd64 4.4.0.184.190 [2,606 B]
Fetched 3,175 kB in 1s (2,116 kB/s)   
Preconfiguring packages ...
(Reading database ... 183573 files and directories currently installed.)
Preparing to unpack .../libelf1_0.165-3ubuntu1.2_amd64.deb ...
Unpacking libelf1:amd64 (0.165-3ubuntu1.2) over (0.165-3ubuntu1.1) ...
Selecting previously unselected package crash.
Preparing to unpack .../crash_7.2.3+real-1~16.04.1_amd64.deb ...
Unpacking crash (7.2.3+real-1~16.04.1) ...
Selecting previously unselected package kexec-tools.
Preparing to unpack .../kexec-tools_1%3a2.0.16-1ubuntu1~16.04.1_amd64.deb ...
Unpacking kexec-tools (1:2.0.16-1ubuntu1~16.04.1) ...
Selecting previously unselected package libdw1:amd64.
Preparing to unpack .../libdw1_0.165-3ubuntu1.2_amd64.deb ...
Unpacking libdw1:amd64 (0.165-3ubuntu1.2) ...
Selecting previously unselected package makedumpfile.
Preparing to unpack .../makedumpfile_1%3a1.6.3-2~16.04.3_amd64.deb ...
Unpacking makedumpfile (1:1.6.3-2~16.04.3) ...
Selecting previously unselected package kdump-tools.
Preparing to unpack .../kdump-tools_1%3a1.6.3-2~16.04.3_amd64.deb ...
Unpacking kdump-tools (1:1.6.3-2~16.04.3) ...
Selecting previously unselected package linux-crashdump.
Preparing to unpack .../linux-crashdump_4.4.0.184.190_amd64.deb ...
Unpacking linux-crashdump (4.4.0.184.190) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.16) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up libelf1:amd64 (0.165-3ubuntu1.2) ...
Setting up crash (7.2.3+real-1~16.04.1) ...
Setting up kexec-tools (1:2.0.16-1ubuntu1~16.04.1) ...
Generating /etc/default/kexec...
Setting up libdw1:amd64 (0.165-3ubuntu1.2) ...
Setting up makedumpfile (1:1.6.3-2~16.04.3) ...
Setting up kdump-tools (1:1.6.3-2~16.04.3) ...

Creating config file /etc/default/kdump-tools with new version
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.15.0-45-generic
Found initrd image: /boot/initrd.img-4.15.0-45-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
kdump-tools-dump.service is a disabled or a static unit, not starting it.
Setting up linux-crashdump (4.4.0.184.190) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Processing triggers for systemd (229-4ubuntu21.16) ...
Processing triggers for ureadahead (0.100.0-19) ...
root@virtual-VirtualBox:~# dpkg-reconfigure kexec-tools
root@virtual-VirtualBox:~# dpkg-reconfigure kdump-tools
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.15.0-45-generic
Found initrd image: /boot/initrd.img-4.15.0-45-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
kdump-tools-dump.service is a disabled or a static unit, not starting it.

5
  • ubuntu.com/server/docs/kernel-crash-dump mentions: "The kernel crash dump utility is installed with the following command: sudo apt install linux-crashdump" -- have you done that?
    – Jeff Schaller
    Jul 1, 2020 at 0:25
  • Yes. I followed that documentation.
    – Nathan
    Jul 1, 2020 at 0:48
  • Yes. I followed the documentation. When I got to the testing part, echo c > /proc/sysrq-trigger, it freezes my system.
    – Nathan
    Jul 1, 2020 at 0:55
  • 1
    So where in the Ubuntu doco does it say that you have a kdump.service?
    – JdeBP
    Jul 1, 2020 at 1:18
  • Nathan, it'd be best to edit your question with the steps you've taken to this point.
    – Jeff Schaller
    Jul 1, 2020 at 1:39

1 Answer 1

1

Actual service name is 'kdump-tools':

#> service kdump-tools status

● kdump-tools.service - Kernel crash dump capture service
   Loaded: loaded (/lib/systemd/system/kdump-tools.service; disabled; vendor preset: enabled)
   Active: inactive (dead)


#> systemctl enable kdump-tools

Synchronizing state of kdump-tools.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable kdump-tools

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .