To begin with, you need to change the kernel options at the boot time. If you are using GRUB as the bootloader, it will by default boot the kernel with the quiet splash option. However, you don't want that to happen, so you need to change the kernel options:
- First, create a backup of /etc/default/grub:
- Now, open any editor of your choice to edit /etc/default/grub:
Find the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash and replace it with GRUB_CMDLINE_LINUX_DEFAULT="debug ignore_loglevel":

- Now run the command to update GRUB accordingly:
- Once you are done with these commands, you need to initialize Netconsole at boot time. For this, we first need to know the IP address and the interface of the sender system. This can be done by using the following command:
You also need the IP address and MAC address of the receiver system, which we have already got in the Getting ready section.
- Now let's start initializing Netconsole. First, let's get Netconsole to load on boot by adding the module to /etc/modules:
Next, make sure that it has the proper options configured as well. For this, add the module options to the /etc/modprobe.d/netconsole.conf file and run the following command:

In the previous command, the part that starts with netconsole has the following syntax:
netconsole=<LOCAL_PORT>@<SENDER_IP_ADDRESS>/<SENDER_INTERFACE>,<REMOTE_PORT>@<RECEIVER_IP_ADDRESS>/<STEP_1_MAC_ADDRESS>
We have used 6666 for both the <LOCAL_PORT> and <REMOTE_PORT>.
- Next, we need to set up the receiver.
Depending on which version of Linux is being used as receiver, the command to set up the receiver may vary:
netcat -l -u 192.168.1.4 6666 | tee ~/netconsole.log
Or try it without the IP address, if the previous command doesn't work:
netcat -l -u 6666 | tee ~/netconsole.log
- If you are using a different variant of Linux that has a different version of Netcat, the following error message will be printed when you try the previous commands:
If you get the error message, you can try this command:

- Now let the previous command keep running.
- Next, you need to check whether everything is working properly. Reboot the sender system and then execute the following command:
- Now you need to check the receiver system to see whether the kernel messages have been received or not.
- Once everything is done, press Ctrl + C. Then you can check for the messages in ~/netconsole.log.