How to Fix “netconsole module not loaded” Error When Running service –status-all in Linux


11 views

When working with Linux servers, particularly newer builds, you might encounter the following output when running service --status-all:

netconsole module not loaded
Configured devices:
lo eno16777736
Currently active devices
lo eno16777736

This isn't actually an error that prevents system operation, but rather a status message indicating that the netconsole kernel module isn't active. However, it can be confusing when you're simply trying to check service statuses.

Netconsole is a kernel module that logs kernel printk messages over UDP to a syslog server. While useful for remote debugging in enterprise environments, most single-server deployments don't need this functionality.

The module appears in service checks because it's treated as a network service, despite being kernel-level functionality. Here's what's happening in technical terms:

# Kernel module status check
lsmod | grep netconsole
# No output means module isn't loaded

# Service configuration check
chkconfig --list netconsole

Here are three approaches to handle this situation:

1. Permanent Disable via chkconfig

# Disable netconsole at all runlevels
sudo chkconfig netconsole off

# Verify changes
chkconfig --list netconsole
# Should show: 0:off 1:off 2:off 3:off 4:off 5:off 6:off

# For systemd systems:
sudo systemctl disable netconsole

2. Kernel Module Management

To prevent the module from loading at all:

# Blacklist the module
echo "blacklist netconsole" | sudo tee /etc/modprobe.d/netconsole.conf

# Update initramfs (Debian/Ubuntu)
sudo update-initramfs -u

# For RHEL/CentOS:
sudo dracut -f

3. Service Status Workaround

If you prefer to keep netconsole available but want cleaner service checks:

# Create a custom service check script
sudo tee /usr/local/bin/service-status <<'EOF'
#!/bin/bash
service --status-all | grep -v "netconsole module not loaded"
EOF

sudo chmod +x /usr/local/bin/service-status

If you're still seeing the message after applying these fixes:

  • Check for multiple netconsole configurations: grep -r netconsole /etc
  • Verify no manual loading in rc.local: grep netconsole /etc/rc.local
  • For modern systems, check systemd units: systemctl list-unit-files | grep netconsole

Remember that this message doesn't indicate a system error, but rather reflects the kernel module's state. The solutions above provide ways to either properly configure netconsole or remove its status messages from service checks.


When running service --status-all on a fresh Linux server build, many administrators encounter the puzzling message:

netconsole module not loaded
Configured devices:
lo eno16777736
Currently active devices
lo eno16777736

This occurs despite successfully checking individual services. The error stems from the system attempting to verify netconsole status during the comprehensive service check.

Netconsole is a kernel module that logs kernel messages over UDP to a syslog server. While useful for remote debugging, it's rarely needed in production environments. Key characteristics:

  • Loadable kernel module (LKM)
  • Requires specific NIC configuration
  • Typically inactive by default on modern distributions

Method 1: Complete Netconsole Disable

For most servers, completely disabling netconsole is the cleanest solution:

# Disable at all runlevels
sudo chkconfig netconsole off

# Verify disabled status
chkconfig --list netconsole
# Expected output: 0:off 1:off 2:off 3:off 4:off 5:off 6:off

# Remove module if loaded
sudo modprobe -r netconsole 2>/dev/null || true

Method 2: Module Blacklisting

Prevent automatic loading of the netconsole module:

# Create blacklist configuration
echo "blacklist netconsole" | sudo tee /etc/modprobe.d/netconsole.conf

# Update initramfs (for Debian/Ubuntu)
sudo update-initramfs -u

# For RHEL/CentOS:
sudo dracut --force

Method 3: Service Status Bypass

If you prefer keeping netconsole available but want clean service checks:

# Create a dummy init script
sudo tee /etc/init.d/netconsole <<'EOF'
#!/bin/sh
case "$1" in
    status)
        echo "netconsole not configured"
        exit 0
        ;;
    *)
        exit 0
        ;;
esac
EOF

# Make executable
sudo chmod +x /etc/init.d/netconsole

Instead of service --status-all, consider these alternatives:

# Systemd systems
systemctl list-units --type=service --state=running

# Older systems using sysvinit
ls /etc/rc*.d/ | grep -v netconsole

For cases where netconsole might actually be needed:

# Check loaded modules
lsmod | grep netconsole

# View module parameters
modinfo netconsole

# Temporary test load
sudo modprobe netconsole netconsole=@/eth0,@192.168.1.1/

For production environments, implement this complete fix:

# Stop service if running
sudo service netconsole stop 2>/dev/null

# Disable on boot
sudo chkconfig netconsole off

# Remove module
sudo modprobe -r netconsole

# Prevent future loading
echo "install netconsole /bin/true" | sudo tee /etc/modprobe.d/netconsole.conf

# Clean service cache (systemd)
sudo systemctl daemon-reload

After applying these changes, service --status-all should execute without netconsole-related warnings, while maintaining all other service monitoring functionality.