How to retrieve a vmcore from a raw partition?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 3
    • kdump
    • diskdump
    • netdump

Issue

  • How to retrieve a vmcore from a raw partition?

Resolution

  • The dd command can be used to retrieve a vmcore from a raw device. In the output below "X" indicates the block size of the backing storage.
[root@<hostname> ~]# dd if=/dev/<partition> of=/tmp/vmcore bs=X count=<size of ram>/X
  • To determin the block size of the backing storage in bytes, the blockdev utility can be used as shown below:
[root@<hostname> ~]# blockdev --getbsz /dev/<device>
4096
  • Alternatively, for kdump users on RHEL5 or above, it is possible to retrieve a vmcore saved on a raw partition with command below:
[root@<hostname> ~]# makedumpfile -R /path/to/vmcore/ < /dev/raw_partition

Diagnostic Steps

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments