SAVECORE(8) SAVECORE(8) NAME savecore - save a core image of the operating system SYNOPSIS /etc/savecore target dump DESCRIPTION Savecore copies the core image saved after an operating sys- tem crash to an ordinary file. This is worth doing so that the crash image will not be overwritten immediately by another crash, or sometimes because the crash image was written in a place where normal system operation will over- write it (e.g. in the swap area). The crash image is taken from dump and written to target. If target exists and is a directory, the image is copied to a file in that directory with the first nonexistent name in the sequence z.0 z.1 z.2 ...; otherwise target is created or overwritten. The crash image to be copied is checked for a magic number in a known location. If the magic number is correct, it is followed by the size of the image, and the time it was writ- ten; these numbers are printed before the dump is copied. If the magic number is wrong, the image is not copied. Savecore overwrites the magic number in dump after a suc- cessful copy. The program runs faster if dump is the raw device. For compatibility with an older program of the same name, the dump argument may be omitted; savecore will noisily examine each device specified for swapping in fstab(5) and each of several popular default swap devices for a valid magic number. The first device that looks right is taken to be the crash image. Savecore is usually called when the system is booted, from rc(8). EXAMPLE /etc/savecore /tmp/dump /dev/rra11 SEE ALSO reboot(8) BUGS The argument convention (the file to be written comes first) is unfortunate; it stems from compatibility.