I do not understand the purpose of the
mount_root_run_init action in kdump.conf:
# default <reboot | halt | poweroff | shell | mount_root_run_init> # - Action to preform in case dumping to intended target # fails. If no default action is specified, "reboot" # is assumed default. # # reboot: If the default action is reboot simply reboot # the system and loose the core that you are # trying to retrieve. # halt: If the default action is halt, then simply # halt the system after attempting to capture # a vmcore, regardless of success or failure. # poweroff: The system will be powered down # shell: If the default action is shell, then drop to # an hush session inside the initramfs from # where you can try to record the core manually. # Exiting this shell reboots the system. # mount_root_run_init: Mount root filesystem and run init. Kdump # initscript will try to save dump to root # filesystem in /var/crash dir. This will # likely require a lot more memory to # be reserved for kdump kernel.
What I undestood is that when current kernel is crashed, kdump boots into second kernel which was already reserved in memory and then it collects the kernel core dump to a specified target.
So, it does the default action if it fails to collect to a specified target.
Why does it mount root filesystem and run init? To make the / filesystem available to the second kernel and to load required services/modules for the collecting process?
If it's the case, how was the following supposed to work (as / filesystem is not mounted in second kernel by that time)
action to preform in case dumping to intended target fails.
Say, I mentioned /var/custom-crash to be my target path, will it work?