Re: [gentoo-user] Dmesg for Previous Boot?
Jerry McBride wrote: Yes that would be possible. But since the OP's kernel doesn't even boot up, it's not an option. He was asking how to see the previous dmesg output this would do it on future boot ups... He was trying to update the kernel. Since it didn't boot up, he was looking for a way to get the kernel messages from the non-booting kernel. Christoph -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Dmesg for Previous Boot?
Ian Brandt wrote: Is it possible to get the dmesg for the boot prior to the current one? No it isn't. dmesg shows the ring buffer contents of the running kernel. I'm trying to remotely upgrade from the 2.4 to 2.6 kernel. I followed the migration guide, but I got something wrong because my server didn't come back up after reboot. Fortunately I used lilo -R to boot to the 2.6 kernel, so using remote power cycle I was able to get back to my working 2.4. The problem is now I have no idea how to tell what went wrong? Perhaps your kernel failed to mount the root filesystem. Where should it write the messages to in this case? ;-) You could add a serial console to the host, which lets you catch the output generated by the kernel during boot. Christoph -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Dmesg for Previous Boot?
On Sunday 16 October 2005 18:25, Ian Brandt wrote: Hi, Is it possible to get the dmesg for the boot prior to the current one? No. Once the kernel reboots, the dmesg data is lost. Unless ofcourse you put this in /etc/conf.d/local.start: #!/bin/bash # /etc/conf.d/local.start /bin/dmesg /var/log/dmesg Then you will at the least have a log of the current dmesg, which could be rotated. -- ** Registered Linux User Number 185956 FSF Associate Member number 2340 since 05/20/2004 Join me in chat at #linux-users on irc.freenode.net Buy an Xbox for $149.00, run linux on it and Microsoft loses $150.00! 7:21am up 28 days, 21:46, 1 user, load average: 0.05, 0.07, 0.08 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Dmesg for Previous Boot?
Jerry McBride wrote: No. Once the kernel reboots, the dmesg data is lost. Unless ofcourse you put this in /etc/conf.d/local.start: #!/bin/bash # /etc/conf.d/local.start /bin/dmesg /var/log/dmesg Then you will at the least have a log of the current dmesg, which could be rotated. Yes that would be possible. But since the OP's kernel doesn't even boot up, it's not an option. With baselayout 1.12.0 there will be an option in /etc/rc.conf called RC_BOOTLOG=yes to enable saving kernel output to /var/log *after* a successful boot. Christoph -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Dmesg for Previous Boot?
Jerry McBride wrote: No. Once the kernel reboots, the dmesg data is lost. Unless ofcourse you put this in /etc/conf.d/local.start: #!/bin/bash # /etc/conf.d/local.start /bin/dmesg /var/log/dmesg FYI, the bootmisc init script already does this for you, or at least it does with the ~x86 baselayout. Just rc-update -a bootmisc boot if it isn't already turned on. Also, syslog-ng will dump the kernel log to /var/log/messages when it starts up. I don't know about other loggers, but they should do something similar. Of course, none of that helps you if your root filesystem doesn't mount! -Richard -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Dmesg for Previous Boot?
Richard Fish wrote: Jerry McBride wrote: FYI, the bootmisc init script already does this for you, or at least it does with the ~x86 baselayout. Just rc-update -a bootmisc boot if it isn't already turned on. Also, syslog-ng will dump the kernel log to /var/log/messages when it starts up. I don't know about other loggers, but they should do something similar. Of course, none of that helps you if your root filesystem doesn't mount! -Richard Thanks to all for the replies. It seems my filesystem isn't coming up as there is no evidence of the boot anywhere under /var/log. Guess I'll need to have the NOC console in. I did find an old thread on the Linux Kernel list that discusses the subject: http://www.linuxhq.com/lnxlists/linux-kernel/lk_9905_01/index.html#00404 The only implementation I found was: http://w.ods.org/tools/kmsgdump/ But that requires a floppy, which my server doesn't have. ~Ian -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Dmesg for Previous Boot?
On Monday 17 October 2005 13:18, Christoph Gysin wrote: Jerry McBride wrote: No. Once the kernel reboots, the dmesg data is lost. Unless ofcourse you put this in /etc/conf.d/local.start: #!/bin/bash # /etc/conf.d/local.start /bin/dmesg /var/log/dmesg Then you will at the least have a log of the current dmesg, which could be rotated. Yes that would be possible. But since the OP's kernel doesn't even boot up, it's not an option. He was asking how to see the previous dmesg output this would do it on future boot ups... With baselayout 1.12.0 there will be an option in /etc/rc.conf called RC_BOOTLOG=yes to enable saving kernel output to /var/log *after* a successful boot. Christoph -- echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED] -- ** Registered Linux User Number 185956 FSF Associate Member number 2340 since 05/20/2004 Join me in chat at #linux-users on irc.freenode.net Buy an Xbox for $149.00, run linux on it and Microsoft loses $150.00! 8:15pm up 29 days, 10:40, 1 user, load average: 0.05, 0.07, 0.08 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Dmesg for Previous Boot?
On Monday 17 October 2005 14:18, Richard Fish wrote: Jerry McBride wrote: No. Once the kernel reboots, the dmesg data is lost. Unless ofcourse you put this in /etc/conf.d/local.start: #!/bin/bash # /etc/conf.d/local.start /bin/dmesg /var/log/dmesg FYI, the bootmisc init script already does this for you, or at least it does with the ~x86 baselayout. Just rc-update -a bootmisc boot if it isn't already turned on. Richard, where is this documented? I've missed it entirely -- ** Registered Linux User Number 185956 FSF Associate Member number 2340 since 05/20/2004 Join me in chat at #linux-users on irc.freenode.net Buy an Xbox for $149.00, run linux on it and Microsoft loses $150.00! 8:17pm up 29 days, 10:42, 1 user, load average: 0.06, 0.08, 0.09 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Dmesg for Previous Boot?
Jerry McBride wrote: On Monday 17 October 2005 14:18, Richard Fish wrote: Jerry McBride wrote: No. Once the kernel reboots, the dmesg data is lost. Unless ofcourse you put this in /etc/conf.d/local.start: #!/bin/bash # /etc/conf.d/local.start /bin/dmesg /var/log/dmesg FYI, the bootmisc init script already does this for you, or at least it does with the ~x86 baselayout. Just rc-update -a bootmisc boot if it isn't already turned on. Richard, where is this documented? I've missed it entirely Well, the authoritative document is less /etc/init.d/bootmisc. ;- I don't know if it is documented somewhere else. You should find: # Create an 'after-boot' dmesg log # touch /var/log/dmesg chmod 640 /var/log/dmesg dmesg /var/log/dmesg I just checked the stable baselayout (1.11.13-r1), and it seems to be there. -Richard -- gentoo-user@gentoo.org mailing list