When I try to use a raid as root, my system panics.

I want to read the kernel output right before the panic, but can't scroll up. After Googling a bit, I wanted to try netconsole. but I get no output at all on the 2nd machine

relevant parts of my current grub.conf

title Gentoo Linux 3.0.6
root (hd0,0)
kernel /boot/linux-3.0.6-gentoo root=/dev/md3

title Gentoo Linux 3.0.6 (debug netconsole)                                                                                                    
root (hd0,0)                                                                                                                                   
kernel /boot/linux-3.0.6-gentoo-debug root=/dev/md3 netconsole=@/,[email protected]/00:18:f3:a8:09:61                                          
#kernel /boot/linux-3.0.6-gentoo-debug root=/dev/md3 [email protected]/eth0,[email protected]/00:18:f3:a8:09:61

title Gentoo Linux 3.0.6 (no root/auto root)
root (hd0,0)
kernel /boot/linux-3.0.6-gentoo
  • the 1st fails with a kernel panic
  • the 2nd is the one i try to use netconsole
  • the 3th starts but use the wrong/old root

The other computer is running a Kubuntu LiveCD where I started nc -u -l 6666.
And if I start the (first) computer with 3th grub option, I can run nc -u 6666 to communicate with the 2nd computer.

The difference between /boot/linux-3.0.6-gentoo and /boot/linux-3.0.6-gentoo-debug is that I enabled:

  • Kernel hacking -> Kernel debugging
  • Kernel hacking -> Delay each boot printk message by N milliseconds
  • Device Drivers -> Network device support -> Network console logging support


  1. Is my (2nd) grub config correctly defined?
  2. Are there more kernel config options I should be enabling?
  3. Is there more information about the specific machine hardware I should provide detail for?
  4. Is there some way to just enable me to scroll back up after a panic?
  • 1
    The netconsole looks fine to me, but I take it that it doesn't work for you. Not sure why. Are you sure that the driver for your NIC is compiled into the kernel, not loaded as a module? I have the experience that serial console might be more robust to set up. So if your computers are old enough to have serial ports and if you have a nullmodem cable, or feel like building one, then that might be an alternative.
    – MvG
    Jul 11, 2012 at 19:13

1 Answer 1


I just had the same problem on gentoo with a 3.5.0 kernel. No matter what online example I tried no output got to the client until I ran the following command:

 dmesg -n 7

I originally tried

dmesg -n 8

which was suggested in the kernel documentation but that returned

localhost ~ # dmesg -n 8
dmesg: unknown level '8'

where dmesg -n 7 worked

localhost ~ # dmesg -n 7
localhost ~ # echo check > /sys/block/md0/md/sync_action

Here is what I got on the client

datastore1 ~ # nc -l -p 30000 -u
[ 9698.913098] md: data-check of RAID array md0
[ 9698.913112] md: minimum _guaranteed_  speed: 1000 KB/sec/disk.
[ 9698.913124] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for data-check.
[ 9698.913150] md: using 128k window, over a total of 1048512k.
[ 9718.197555] md: md0: data-check done.

BTW, Here is how I setup the netconsole:

modprobe netconsole netconsole="@/eth0,[email protected]/"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .