Re: Netconsole scripts for Debian
At now I configure netconsole dynamically and got network
configuration from ip route command. For getting netconsole server MAC
address I use arping to it.
But I can generate modprobe configuration file with current
configuration and integrate it to initrd.
You can check my approach here:
1) On first netconsole script start I can get netconsole collector IP
and MAC address (of destination server or gateway for current server)
2) I create /etc/modprobe.d/netconsole.conf configuration with fixed
MAC, PORT and IP of netconsole server
3) I add netconsole to initramfs configuration file
(/etc/initramfs-tools/modules) with fixed IP/MAC configuration
4) I rebuild initramfs for current kernel: update-initramfs -v -u -k
`uname -r` -t
5) On every system run I will check if MAC/IP of destination server
was changes I will reconfigure netconsole modprobe.conf file and
On Wed, Jun 18, 2014 at 1:59 PM, Bjørn Mork <firstname.lastname@example.org> wrote:
> Ritesh Raj Sarraf <email@example.com> writes:
>> On 06/17/2014 03:00 PM, Pavel Odintsov wrote:
>>> Hello, folks!
>>> I'm prepared and thoroughly tested scripts for managing netconsole
>>> kernel facility in Debian 6/7. Netconsole facility is very useful for
>>> debugging kernel bugs.
>>> These scripts are inspired by CentOS 6 netconsole scripts in some
>>> cases and work in same way. Scripts are written in clean bash.
>>> All scripts and configuration you can find here:
>>> Yes, it's possible to configure netconsole statically (i.e. as
>>> /etc/modprobe.d/netconsole.conf) but it's a bad way because it relies
>>> on network configuration (i.e. gateway address, server address) which
>>> may be changed and netconsole will not work.
>>> I tested both startup option:
>>> 1) As /etc/init.d/netconsole
>>> 2) As /etc/network/if-up.d/netconsole script
>>> IMHO, the first variant is more reliable and convenient for this task.
>>> But both variants have some troubles because some network cards (like
>>> e1000) call /etc/network/if-up.d and /etc/init.d scripts on network
>>> level BEFORE real network initialization.
>>> I fixed this issue only by adding fixed timeout in my
>>> /etc/init.d/netconsole script. In the same way this issue was fixed in
>>> RH. Maybe you can provide more convenient solution?
>>> Thank you for any feedback!
>> You should add support for it in initrd. netconsole is more useful at
>> that stage. In real boot, why would one want netconsole if syslog is
> To debug a driver/kernel crash.
> netconsole is generally a very useful feature for oops debugging on
> laptops and other devices with no serial ports. Having some scripts
> making it simpler to configure sounds like a great idea. Will these
> depend on configfs being mounted? Or are they only using module
> To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org
> Archive: [🔎] email@example.com">https://lists.debian.org/[🔎] firstname.lastname@example.org
Sincerely yours, Pavel Odintsov