I’ve tried the howto on kernel.org, tried adding netconsole.ko to dracut, recreated the initrd file, but I’m getting nowhere. The module is not loaded. I need log messages as early in the boot process as possible. There is no serial port.
On my 15.1, netconsole.ko exists already on a default install and
From what I read, I’ve found nothing that suggests that it’s not already distributed as part of the mainline kernel.
Therefor,
There is no point to re-compiling the module.
Also,
after skimming a few articles how to instantiate and configure,
It looks like practically all articles are copied word for word from each other (further suggesting and supporting its part in the mainline kernel).
The nuts and bolts look fairly clear to me…
You can either load it during boot (ie most likely as a grub command and should also be supported in YaST > Bootloader module)
or
After the system loads. “After” has a few meanings, it can mean by a console from a logged in User or it can mean not part of but late in the boot process.
If you’re having problems setting up during the regular boot process,
The alternative is incredibly easy to do…
- Logon as a User and execute the command to instantiate your remote console service. You can do whatever is necessary to test your connection to determine exactly what your command should be.
- After you’ve figured out your correct command, then the remaining issue is how to set up “loading” your kernel module, the only requirement is that it has to happen after your networking is working and you have two options… This would probably be my preferred method since it allows User interaction to test interactively…
a. Configure a systemd Unit file that invokes your command and has a dependency (ie “requires=”) pointing to your requirement (likely NetworkManager.service).
or
b. Write your command into /etc/sysctl.conf
If what you are reading isn’t helpful,
I found the ArchWiki as usual is easy to understand…
https://wiki.archlinux.org/index.php/Netconsole
And the following should be the documentation included in the kernel
https://www.kernel.org/doc/Documentation/networking/netconsole.txt
Both of the above are pretty much the same text and is likely what you’ve already read,
If something is still not clear, post again.
TSU
You provided zero information to start troubleshooting. How did you add it to dracut (exact steps)? What is your kernel command line or netconsole module configuration? Is NIC driver available that early to start with?
man dracut.conf:
force_drivers+=" <list of kernel modules> "
See add_drivers above. But in this case it is ensured that the
drivers are tried to be loaded early.
Yes, I’ve been to that kernel.org page.
The module exists, yes. Modprobe works fine once the system is up, adding it to the kernel boot parameters does nowt. It shows up in proc/cmdline alright though.
Maybe I need more sleep…
Then you’re 99% of the way there.
Since you can invoke your command manually, then it should take minutes or about a minute to complete by invoking that command automatically “late” in your boot process instead of trying to invoke “early” – The diff between early and late is probably seconds and shouldn’t make any diff to you.
As I described,
Either
Create a systemd Unit file that invokes your command with “requires=” to ensure you load after your networking is running
or
Write your command into /etc/sysctl.conf.
And, you’re done.
If you want to see another example of using /etc/sysctl.conf, take a look at the bottom of the following link to something I wrote long ago for how someone can re-allocate resources to networking without having to re-compile the kernel. To understand what those settings are, go back a couple pages and start reading. You’re doing something similar invoking a kernel module to run an application.
TSU