Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/proc/vmcore not found
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Lok
n00b
n00b


Joined: 23 Mar 2006
Posts: 34

PostPosted: Thu Sep 14, 2017 5:23 pm    Post subject: /proc/vmcore not found Reply with quote

How to dump kernel log?

# cat /proc/vmcore
cat: /proc/vmcore: No such file or directory

# cat /proc/cmdline
BOOT_IMAGE=/boot/kernel-genkernel-x86_64-4.12.5-gentoo root=UUID=b5d861b7-8985-40c4-953d-3eefd34624b6 ro crashkernel=64M

# zcat /proc/config.gz |grep -i kexec
CONFIG_KEXEC_CORE=y
CONFIG_KEXEC=y
# CONFIG_KEXEC_JUMP is not set
# zcat /proc/config.gz |grep -i vmcore
CONFIG_PROC_VMCORE=y
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9895
Location: almost Mile High in the USA

PostPosted: Thu Sep 14, 2017 6:38 pm    Post subject: Reply with quote

I'm not sure I understand what you're asking...

vmcore is the crash dump of the last kernel that you used, as recovered by kexec'ed recovery kernel. This is for fairly advanced users, but I can't tell if this is what you want by your question. I wouldn't call it a "log", more of a crash memory dump.

If you mean old kernel-generated text warning/error logs, it depends on what you've or what the kernel could have saved. If you have syslogd installed, usually what's emitted from the kernel is logged in /var/log/messages. For systemd, the command journalctl has everything saved.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Lok
n00b
n00b


Joined: 23 Mar 2006
Posts: 34

PostPosted: Thu Sep 14, 2017 8:13 pm    Post subject: Reply with quote

Ok,
how to dump kernel by kexec?

# cat /proc/cmdline
BOOT_IMAGE=/boot/kernel-genkernel-x86_64-4.12.5-gentoo root=UUID=b5d861b7-8985-40c4-953d-3eefd34624b6 ro crashkernel=64M


# kexec -p /boot/kernel-genkernel-x86_64-4.12.5-gentoo --initrd=/boot/initramfs-genkernel-x86_64-4.12.5-gentoo --append="root=/dev/sda3 single irqpoll maxcpus=1 reset_devices dolvm softlevel=kdump"
Unknown type (Reserved) while parsing /sys/firmware/memmap/17/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/7/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/5/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/3/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/21/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/1/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/18/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/16/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/14/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/20/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/10/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/19/type. Please report this as bug. Using RANGE_RESERVED now.
ELF core (kcore) parse failed
Cannot load /boot/kernel-genkernel-x86_64-4.12.5-gentoo
#
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9895
Location: almost Mile High in the USA

PostPosted: Thu Sep 14, 2017 9:00 pm    Post subject: Reply with quote

The kexec is done by the kernel itself when it detects a crash. If everything is setup properly, just cause a kernel crash (could sysrq-c) and it should kexec the recovery kernel and the vmdump will show up.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Lok
n00b
n00b


Joined: 23 Mar 2006
Posts: 34

PostPosted: Thu Sep 14, 2017 9:45 pm    Post subject: Reply with quote

Not work

kernel config https://pastebin.com/GrGKiaEW

# cat /etc/conf.d/kexec|grep -vE "^#"
ROOTPART="/dev/sda3"
KNAME="kernel-4"
INITRD="initramfs-4"
DONT_MOUNT_BOOT="yes"

# cat /etc/kexec.conf|grep -vE "^#"
KNAME="kernel-4"
KEXEC_OPT_ARGS="--initrd=initramfs-4"

# cat /proc/cmdline
BOOT_IMAGE=/boot/kernel-genkernel-x86_64-4.12.5-gentoo root=UUID=b5d861b7-8985-40c4-953d-3eefd34624b6 ro crashkernel=64M

But after reboot start new kernel
rc.log: kexec | * Using kernel image /boot/kernel-4 (with /boot/initramfs-4) for kexec ...

# cat /sys/kernel/kexec_loaded
0

# /etc/init.d/kexec restart
kexec | * WARNING: you are stopping a boot service
kexec | * Not rebooting; disabling kexec ... [ ok ]

sysrq-c -- system freeze, and kernel not start.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9895
Location: almost Mile High in the USA

PostPosted: Thu Sep 14, 2017 10:29 pm    Post subject: Reply with quote

Okay I can't explain things better than https://wiki.gentoo.org/wiki/Kernel_Crash_Dumps
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Lok
n00b
n00b


Joined: 23 Mar 2006
Posts: 34

PostPosted: Fri Sep 15, 2017 10:13 am    Post subject: Reply with quote

Thank you,
Apparently something with kexec, because I can load and start the kernel fine with the -l and -e options, but -p doesn’t seem to trigger.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum