Hello! 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 rebuilt initrd. It's ok? On Wed, Jun 18, 2014 at 1:59 PM, Bjørn Mork <bj...@mork.no> wrote: > Ritesh Raj Sarraf <r...@debian.org> 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: >>> https://github.com/FastVPSEestiOu/debian_netconsole >>> >>> 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 >> running. > > 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 > parameters? > > > > Bjørn > > > -- > To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org > Archive: https://lists.debian.org/87ppi6sfma....@nemi.mork.no > -- Sincerely yours, Pavel Odintsov -- To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/CALgsdbfxY5GDO8rKvMf0k40UqD+34NHFe8=kuo7cmtl-jjk...@mail.gmail.com