Welcome! Log In Create A New Profile

Advanced

[How To] Use netconsole to troubleshoot Debian kernel booting

Posted by bodhi 
[How To] Use netconsole to troubleshoot Debian kernel booting
September 05, 2012 04:59PM
Use netconsole to troubleshoot Debian kernel booting

For instruction about setting up netconsole to troubleshoot uBoot, see instruction on Use netconsole to troubleshoot uBoot without a serial cable.This post continues where Jeff's instruction ended: Using netconsole to troubleshoot problem in starting kernel. There are also a couple other approaches (adding uBoot custom boot parameters as uBoot environment variable, and starting netconsole in /etc/rc.local). However, this approach will enable netconsole to work at an earliest possible time when the kernel starting, to observe the same kernel messages in dmesg outputs.


Assuming the kernel version is 3.2.28-kirkwood, this machine IP address is 192.168.0.220, and netconsole server IP address is 192.168.0.223.

1. Verify the current kernel is using initramfs image and uInitrd

cd /boot
ls initrd.img-* uInitrd
Expected output:
initrd.img-3.2.28-kirkwood  uInitrd


Note: make a backup of these 2 files in case something goes wrong and they need to be restored to allow booting again.

2. Edit /etc/initramfs-tools/modules to add netconsole module

cat /etc/initramfs-tools/modules
Expected output:
# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax:  module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod

#
# load netconsole to log kernel messages on this machine 192.168.0.220 to the server 192.168.0.223
#
netconsole netconsole=6666@192.168.0.220/eth0,6666@192.168.0.223/


3. Generate new initramfs image

update-initramfs -u
Expected output:
update-initramfs: Generating /boot/initrd.img-3.2.28-kirkwood



4. Generate new uInitrd (reminder: replace the 3.2.28 below with your current kernel version):

mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.2.28  -d /boot/initrd.img-3.2.28-kirkwood /boot/uInitrd
Expected output:
Image Name:   initramfs-3.2.28-kirkwood
Created:      Wed Sep  5 14:11:38 2012
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    6686266 Bytes = 6529.56 kB = 6.38 MB
Load Address: 0x00000000
Entry Point:  0x00000000


5. Reboot

Before rebooting this box, start netconsole listening on server 192.168.0.223. Observe kernel messages sent from this box, they should be the same as dmesg outputs.



Edited 2 time(s). Last edit at 02/27/2017 02:09PM by bodhi.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
September 11, 2012 02:43AM
Thanks. Do you think this could also be possible with wlan0 and rtl8192cu?
Could I just edit /etc/initramfs-tools/modules like this?
8192cu
netconsole netconsole=6666@192.168.0.155/wlan0,6666@192.168.0.189/
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
September 11, 2012 04:08AM
Sure, it should work. Have you got connected to the router by wireless with this module 8192cu before? You might need to try it on an unsecure network!



Edited 1 time(s). Last edit at 09/11/2012 04:21AM by bodhi.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
September 11, 2012 05:58PM
Then I hope this is only valid for Mele:
Quote
gnexus
[...]netconsole can't be used with wlan[...]
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
September 11, 2012 06:14PM
I hope so too! netconsole documentation did not mention that it will only work for eth (nothing specific about wlan). You could give it a try on an unsecure Wifi network and see if it works.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
September 22, 2012 04:08PM
Just to clear things up I'm using an Allwinner A10 tablet and trying this with gnexus' Debian Sid v0.1 with multi-boot u-boot and kernel.
There was nothing in /boot so I used this tut to create an initrd.img: http://www.j1nx.nl/initramfs-support-for-the-allwinner-a10/
I copied initrd.img-3.0.39+ and uInitrd to /boot and the boot partition just to be sure. I tried both your and j1nx' mkimage lines. Tried nc -klu -p 6666 and socat STDIO UDP-LISTEN:6666 in parallel but no output. Also unsecure WiFi.

Is this even possible with this setup? How do I know the initrd is loaded? Are there any logs for this and u-boot?

------------------------------------------------------------
My A10 tablet (Point Of View [NL] ProTab2XXL 10" ICS)



Edited 1 time(s). Last edit at 09/22/2012 04:09PM by äxl.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
September 22, 2012 04:39PM
äxl Wrote:
-------------------------------------------------------
> Just to clear things up I'm using an Allwinner A10
> tablet and trying this with gnexus' Debian Sid
> v0.1 with multi-boot u-boot and kernel.
> There was nothing in /boot so I used this tut to
> create an initrd.img:
> http://www.j1nx.nl/initramfs-support-for-the-allwi
> nner-a10/
> I copied initrd.img-3.0.39+ and uInitrd to /boot
> and the boot partition just to be sure. I tried
> both your and j1nx' mkimage lines. Tried nc -klu
> -p 6666 and socat STDIO UDP-LISTEN:6666 in
> parallel but no output. Also unsecure WiFi.
>
> Is this even possible with this setup? How do I
> know the initrd is loaded? Are there any logs for
> this and u-boot?

Do you have netconsole activated in UBoot? you should see the image loading progress outputs there. I don't have an Allwiner A10 yet so don't know what's in the multi-boot uBoot.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
September 22, 2012 05:37PM
https://github.com/a10linux/uboot-multi-allwinner
I can't reach u-boot. The tablet has no eth0.

I've only read that you might need a WiFi driver with polling.

On another note I found this in the kernel config: :D
# CONFIG_NETCONSOLE is not set

This seems to be a good source: http://wiki.openvz.org/Remote_console_setup

------------------------------------------------------------
My A10 tablet (Point Of View [NL] ProTab2XXL 10" ICS)



Edited 1 time(s). Last edit at 09/22/2012 05:38PM by äxl.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
September 22, 2012 06:51PM
CONFIG_NETCONSOLE is there only to tell the kernel build to include the module when you build it. So you're right, that might be the biggest problem :-)

If you can run modprobe netconsole after the system boot then it's already there. So the update-initramfs is just to force it to run early in the booting process during system init using the parameter in the initrd image.



Edited 1 time(s). Last edit at 09/22/2012 06:52PM by bodhi.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
September 23, 2012 04:57PM
Do I need dynamic or trapping?
  Network console logging support (NETCONSOLE) [M/n/y/?] m
    Dynamic reconfiguration of logging targets (NETCONSOLE_DYNAMIC) [N/y/?] (NEW) N
  Netpoll traffic trapping (NETPOLL_TRAP) [N/y] (NEW) N

WEMAC unfortunately doesn't support poll controlling ...
  CC      drivers/net/sun4i/sun4i_wemac.o
drivers/net/sun4i/sun4i_wemac.c: In function ‘emacrx_WaitDmaFinish’:
drivers/net/sun4i/sun4i_wemac.c:290: warning: unused variable ‘i’
drivers/net/sun4i/sun4i_wemac.c: In function ‘wemac_probe’:
drivers/net/sun4i/sun4i_wemac.c:1880: error: ‘struct net_device’ has no member named ‘poll_controller’
make[3]: *** [drivers/net/sun4i/sun4i_wemac.o] Error 1
make[2]: *** [drivers/net/sun4i] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

So I disabled WEMAC completely:
  wemac support(A1x) (WEMAC_SUN4I) [N/m/y/?] (NEW) N

But modprobe gets me "Unknown error 524" which might be due to dmesg's "netconsole: wlan0 doesn't support polling, aborting."

------------------------------------------------------------
My A10 tablet (Point Of View [NL] ProTab2XXL 10" ICS)
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
September 23, 2012 05:42PM
@axl,

I set CONFIG_NETCONSOLE=m, and CONFIG_NETCONSOLE_DYNAMIC=y when I build . But all my Kirwood plugs have eth0, so I've never tried and not sure about Netpoll (my .config has # CONFIG_NETPOLL_TRAP is not set)



Edited 1 time(s). Last edit at 09/23/2012 05:46PM by bodhi.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
September 24, 2012 03:08AM
Well, I think the polling disability is a deal breaker.
http://askubuntu.com/questions/6090/netconsole-wont-start-says-wlan0-doesnt-exist-aborting
I could try building the driver from Realtek ... but wouldn't know where to activate polling anyway.
A microSD sniffer is on the way!

------------------------------------------------------------
My A10 tablet (Point Of View [NL] ProTab2XXL 10" ICS)
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
January 02, 2013 11:21AM
I followed the instructions but when I reboot I get nothing and the machine hangs at some point. If I take my usb stick and revert the uInitrd and uImage to the backups then everything boots again.
Therefore I suspect there is a problem with one of these two commands:

# update-initramfs -u
# mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.2.28 -d /boot/initrd.img-3.2.28-kirkwood /boot/uInitrd

I changed the second one to match the 3.3.2 kernel like so:
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.3.2-kirkwood -d /boot/initrd.img-3.3.2-kirkwood-wide /boot/uInitrd

I noticed that the original working uInitrd is a tiny bit larger than the one that is created when I run that command.
I'd REALLY like to get this working because I've had too many failure to boot probelms once Uboot hands things off and this is the only way to troubleshoot that type of problem :(
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
January 02, 2013 01:03PM
Looks like you're booting with Davy's NSA320 image now? you can take a look at his config file and see if netconsole and netconsole dynamic flags are on. The kernel must be compiled with those 2 flags for the update-initramfs command to work properly.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
January 02, 2013 02:22PM
interesting point. If I use Jeff's scripts will it work?
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
January 02, 2013 02:27PM
CONFIG_NETCONSOLE=m
CONFIG_NETCONSOLE_DYNAMIC=y

what does 'm' mean?
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
January 03, 2013 01:49AM
floodo1 Wrote:
-------------------------------------------------------
> CONFIG_NETCONSOLE=m
> CONFIG_NETCONSOLE_DYNAMIC=y
>
> what does 'm' mean?


'm' means module. That indicates netconsole was turned on in Davy's image. Which plug are you booting this image with?
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
November 01, 2013 06:07AM
What are different approaches you mentioned starting netconsole in rc.local and adding custom uboot variables can you elaborate more on it
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
November 01, 2013 10:43PM
I did all the steps required and was able to view the messages but not all of dmesg shows up , as you can see it does not shows anything before udev is started.

6518766 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.11.1-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2218744 Bytes = 2.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.11.1-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6518702 Bytes = 6.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

[   34.526674] udevd[248]: starting version 175
[   35.036832] alg: hash: Test 1 failed for mv-hmac-sha1
[   35.041952] 00000000: 0c aa 9f d5 37 c3 79 3a 91 d9 21 5f 42 2b 2c 24
[   35.054377] 00000010: b7 c3 16 0c
[   35.062303] orion_wdt: Initial timeout 21 sec
[   37.002267] EXT3-fs (sda1): using internal journal
[   41.864490] NET: Registered protocol family 10
[   55.561905] kjournald starting.  Commit interval 5 seconds
[   55.567722] EXT3-fs (sda2): using internal journal
[   55.572554] EXT3-fs (sda2): mounted filesystem with ordered data mode
[   61.790849] Adding 524284k swap on /media/Data/swapfile.  Priority:-1 extents:134 across:642636k
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
November 02, 2013 12:19AM
Please post your dmesg output.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
November 02, 2013 01:32AM
Could it be because I have not done make on uImage ? But i guess it was part of your rootfs , should i do all of steps below ?


apt-get remove flash-kernel 
dpkg -i linux-image-3.11.1-kirkwood-tld-1_1.0_armel.deb 

mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.11.1-kirkwood-tld-2 -d /boot/vmlinuz-3.11.1-kirkwood-tld-1 /boot/uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.11.1-kirkwood-tld-2 -d /boot/initrd.img-3.11.1-kirkwood-tld-1 /boot/uInitrd



root@debian:/etc/init.d# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.11.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 PREEMPT Fri Sep 27 01:50:15 PDT 2013
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Seagate GoFlex Net
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat c05f0c74, node_mem_map c065d000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10 rootfstype=ext3 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 117020K/131072K available (4192K kernel code, 309K rwdata, 1368K rodata, 187K init, 420K bss, 14052K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05761a0   (5561 kB)
[    0.000000]       .init : 0xc0577000 - 0xc05a5cdc   ( 188 kB)
[    0.000000]       .data : 0xc05a6000 - 0xc05f3538   ( 310 kB)
[    0.000000]        .bss : 0xc05f3538 - 0xc065c5cc   ( 421 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:114
[    0.000000] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474ms
[    0.000000] Console: colour dummy device 80x30
[   14.003795] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[   14.093588] pid_max: default: 32768 minimum: 301
[   14.093689] Security Framework initialized
[   14.093760] Mount-cache hash table entries: 512
[   14.094379] Initializing cgroup subsys devices
[   14.094401] Initializing cgroup subsys freezer
[   14.094414] Initializing cgroup subsys net_cls
[   14.094425] Initializing cgroup subsys blkio
[   14.094499] CPU: Testing write buffer coherency: ok
[   14.094885] Setting up static identity map for 0xc03f6900 - 0xc03f693c
[   14.096717] devtmpfs: initialized
[   14.098962] pinctrl core: initialized pinctrl subsystem
[   14.099292] regulator-dummy: no parameters
[   14.099610] NET: Registered protocol family 16
[   14.100033] DMA: preallocated 256 KiB pool for atomic coherent allocations
[   14.100804] Kirkwood: MV88F6281-A1, TCLK=200000000.
[   14.100826] Feroceon L2: Enabling L2
[   14.100865] Feroceon L2: Cache support initialised.
[   14.101192] initial MPP regs: 01111111 11113322 00001111 00100000 00000000 00000000 00000000
[   14.101220]   final MPP regs: 01111111 11113322 00001111 00000000 00000000 00000000 00000000
[   14.104706] bio: create slab <bio-0> at 0
[   14.105135] vgaarb: loaded
[   14.105272] usbcore: registered new interface driver usbfs
[   14.105325] usbcore: registered new interface driver hub
[   14.105423] usbcore: registered new device driver usb
[   14.106037] Switched to clocksource orion_clocksource
[   14.120492] NET: Registered protocol family 2
[   14.121133] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[   14.121170] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[   14.121191] TCP: Hash tables configured (established 1024 bind 1024)
[   14.121258] TCP: reno registered
[   14.121271] UDP hash table entries: 256 (order: 0, 4096 bytes)
[   14.121295] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[   14.121493] NET: Registered protocol family 1
[   14.121802] RPC: Registered named UNIX socket transport module.
[   14.121813] RPC: Registered udp transport module.
[   14.121821] RPC: Registered tcp transport module.
[   14.121828] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   14.121839] PCI: CLS 0 bytes, default 32
[   14.122042] Unpacking initramfs...
[   14.666881] Freeing initrd memory: 6360K (c1101000 - c1737000)
[   14.666983] NetWinder Floating Point Emulator V0.97 (double precision)
[   14.667581] audit: initializing netlink socket (disabled)
[   14.667626] type=2000 audit(0.660:1): initialized
[   14.668452] VFS: Disk quotas dquot_6.5.2
[   14.668502] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[   14.668861] NFS: Registering the id_resolver key type
[   14.668920] Key type id_resolver registered
[   14.668931] Key type id_legacy registered
[   14.668949] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   14.669113] jffs2: version 2.2. (NAND) (SUMMARY)  \xffffffc2\xffffffa9 2001-2006 Red Hat, Inc.
[   14.669322] msgmni has been set to 240
[   14.671190] alg: No test for stdrng (krng)
[   14.671283] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[   14.671294] io scheduler noop registered
[   14.671302] io scheduler deadline registered
[   14.671323] io scheduler cfq registered (default)
[   14.671518] mv_xor mv_xor.0: Marvell shared XOR driver
[   14.706115] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[   14.746097] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[   14.746202] mv_xor mv_xor.1: Marvell shared XOR driver
[   14.786097] mv_xor mv_xor.1: Marvell XOR: ( xor cpy )
[   14.826096] mv_xor mv_xor.1: Marvell XOR: ( xor cpy )
[   14.826348] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   14.846905] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[   15.343501] console [ttyS0] enabled
[   15.348009] ONFI param page 0 valid
[   15.351510] ONFI flash detected
[   15.354664] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08AAD), 256MiB, page size: 2048, OOB size: 64
[   15.365780] Scanning device for bad blocks
[   15.416237] Bad eraseblock 440 at 0x000003700000
[   15.589876] 4 cmdlinepart partitions found on MTD device orion_nand
[   15.596183] Creating 4 MTD partitions on "orion_nand":
[   15.601352] 0x000000000000-0x000000100000 : "u-boot"
[   15.606579] 0x000000100000-0x000000500000 : "uImage"
[   15.611774] 0x000000500000-0x000002500000 : "rootfs"
[   15.617032] 0x000002500000-0x000010000000 : "data"
[   15.622316] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   15.628889] ehci-pci: EHCI PCI platform driver
[   15.633393] ehci-orion: EHCI orion driver
[   15.637491] orion-ehci orion-ehci.0: EHCI Host Controller
[   15.642936] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[   15.651121] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[   15.676070] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[   15.682088] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   15.688929] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   15.696203] usb usb1: Product: EHCI Host Controller
[   15.701107] usb usb1: Manufacturer: Linux 3.11.1-kirkwood-tld-1 ehci_hcd
[   15.707853] usb usb1: SerialNumber: orion-ehci.0
[   15.712908] hub 1-0:1.0: USB hub found
[   15.716721] hub 1-0:1.0: 1 port detected
[   15.721071] mousedev: PS/2 mouse device common for all mice
[   16.736145] rtc-mv rtc-mv: internal RTC not ticking
[   16.741135] i2c /dev entries driver
[   16.744702] cpuidle: using governor ladder
[   16.748835] cpuidle: using governor menu
[   16.753617] drop_monitor: Initializing network drop monitor service
[   16.760217] TCP: cubic registered
[   16.763551] NET: Registered protocol family 17
[   16.768134] Key type dns_resolver registered
[   16.772857] registered taskstats version 1
[   16.777815] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[   16.784909] Freeing unused kernel memory: 184K (c0577000 - c05a5000)
[   16.856765] udevd[52]: starting version 175
[   16.959558] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   17.034274] libphy: orion_mdio_bus: probed
[   17.093796] SCSI subsystem initialized
[   17.167833] libata version 3.00 loaded.
[   18.225946] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:10:75:26:7f:a8
[   18.234802] sata_mv sata_mv.0: version 1.28
[   18.234874] sata_mv sata_mv.0: cannot get optional clkdev
[   18.245325] sata_mv sata_mv.0: slots 32 ports 2
[   18.253155] scsi0 : sata_mv
[   18.256623] scsi1 : sata_mv
[   18.259923] ata1: SATA max UDMA/133 irq 21
[   18.264036] ata2: SATA max UDMA/133 irq 21
[   18.776082] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl F300)
[   18.856107] ata1.00: ATA-8: ST9500325AS, 0002BSM1, max UDMA/133
[   18.862057] ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
[   18.926113] ata1.00: configured for UDMA/133
[   18.946432] scsi 0:0:0:0: Direct-Access     ATA      ST9500325AS      0002 PQ: 0 ANSI: 5
[   19.296079] ata2: SATA link down (SStatus 0 SControl F300)
[   19.338563] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
[   19.347346] sd 0:0:0:0: [sda] Write Protect is off
[   19.352166] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[   19.352283] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   19.429309]  sda: sda1 sda2
[   19.434001] sd 0:0:0:0: [sda] Attached SCSI disk
[   19.449126] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   29.938524] netpoll: netconsole: local port 6666
[   29.943170] netpoll: netconsole: local IPv4 address 192.168.1.110
[   29.949359] netpoll: netconsole: interface 'eth0'
[   29.954084] netpoll: netconsole: remote port 6666
[   29.958914] netpoll: netconsole: remote IPv4 address 192.168.1.104
[   29.965124] netpoll: netconsole: remote ethernet address ff:ff:ff:ff:ff:ff
[   29.972070] netpoll: netconsole: device eth0 not up yet, forcing it
[   29.980132] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[   32.262564] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control disabled
[   32.275222] console [netcon0] enabled
[   32.278950] netconsole: network logging started
[   32.683580] EXT3-fs (sda1): mounted filesystem with ordered data mode
[   32.690133] kjournald starting.  Commit interval 5 seconds
[   34.526674] udevd[248]: starting version 175
[   35.036832] alg: hash: Test 1 failed for mv-hmac-sha1
[   35.041952] 00000000: 0c aa 9f d5 37 c3 79 3a 91 d9 21 5f 42 2b 2c 24
[   35.054377] 00000010: b7 c3 16 0c
[   35.062303] orion_wdt: Initial timeout 21 sec
[   37.002267] EXT3-fs (sda1): using internal journal
[   41.864490] NET: Registered protocol family 10
[   55.561905] kjournald starting.  Commit interval 5 seconds
[   55.567722] EXT3-fs (sda2): using internal journal
[   55.572554] EXT3-fs (sda2): mounted filesystem with ordered data mode
[   61.790849] Adding 524284k swap on /media/Data/swapfile.  Priority:-1 extents:134 across:642636k



Edited 1 time(s). Last edit at 11/02/2013 01:37AM by dinjo.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
November 02, 2013 03:19AM
You only need to do this step:

mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.11.1-kirkwood-tld-1 -d /boot/initrd.img-3.11.1-kirkwood-tld-1 /boot/uInitrd


Note that you should do that after apt-get upgrade if the apt-get upgrade log shows that the initrd.img-3.11.1-kirkwood-tld-1 (or what ever kernel version is) was regenerated. When in doubt, regenerate it anyway.

Your dmesg showed that netconsole loading forced eth0 to be up, which is the correct behavior.

It might be beause your local network. Netconsole broadcasts UDPs, so they might not be reliable in your network condition (I'm guessing).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 11/02/2013 03:28AM by bodhi.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
November 02, 2013 07:50AM
Yes i did that and also regenerated , I tried with socat too but nothing shows up not sure why , since its able to pass the messages prior to it
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
November 02, 2013 04:01PM
dinjo Wrote:
-------------------------------------------------------
> Yes i did that and also regenerated , I tried with
> socat too but nothing shows up not sure why ,
> since its able to pass the messages prior to it

It is strange. Try connecting the GoFlexNet and the netconsole server on the same Ethernet switch, see if it helps. If it still does not show all messages, then try the following.

In the modules file, add the MAC address of the server (if 192.168.0.223 is the server):
netconsole netconsole=6666@192.168.0.220/eth0,6666@192.168.0.223/xx:xx:xx:xx:xx

Update the initrd and regenerate.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
November 02, 2013 09:29PM
I'm using a router , tried adding mac address too didn't worked.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
November 03, 2013 03:02PM
dinjo Wrote:
-------------------------------------------------------
> I'm using a router , tried adding mac address too
> didn't worked.

Are the GoFlex Net and the netconsole server plugged directly in to the router LAN ports?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
November 03, 2013 07:25PM
Yes
I was having the same issue as dinjo, but then i changed my netconsole ipaddr to be different then the ip address it gets after it boots and i see the full dmesg until it registers the nic.
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
August 14, 2014 09:23AM
jman Wrote:
-------------------------------------------------------
> I was having the same issue as dinjo, but then i
> changed my netconsole ipaddr to be different then
> the ip address it gets after it boots and i see
> the full dmesg until it registers the nic.

If the U-Boot ethaddr env is the same as the static IP in your rootfs /etc/network/interfaces, then all log should go to the same netconsole server.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [How To] Use netconsole to troubleshoot Debian kernel booting
March 20, 2021 03:28PM
Hey, glad to see you're still active in this forum and putting out new releases! Have been using an old release for many years now and still working great. However, needing to update and I don't have the same device I did years ago that had netconsole as a executable. I would like to make sure I have uboot access through it using netconsole. Is there a compatible android app or plugin for the termux emulator for android that can be used?
I have all of my pcs and laptops in storage and can't access a Debian or ubuntu machine. Thanks!
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: