Author Topic: Net boot - Jetway JNC62K mobo - Kernel panic  (Read 3733 times)

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Net boot - Jetway JNC62K mobo - Kernel panic
« on: December 26, 2008, 04:07:40 pm »
I'm trying to get this mobo to work as a diskless media director, and I followed the Unrecognized NIC page (and the Realtek 8168 page) and it now starts to boot, then goes to:
Code: [Select]
ipconfig: no devices to configure
/init: .: 1: Can't open /tmp/net-eth0.conf
Kernel panic - not syncing: Attempted to kill init!
Then it blinks the caps lock and scroll lock.  Before I did the 8168/8169 patch it didn't panic at least!

I wanted to add that I have to use the Realtek RTL 8111B/8111C bootrom, because the other NIC has a NVIDIA Boot Agent that doesn't seem to work.  I mean it just times out at the DHCP boot screen.
« Last Edit: December 26, 2008, 04:13:34 pm by nosebreaker »

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #1 on: December 26, 2008, 08:11:14 pm »
I plugged in a cdrom and put in a Ubuntu 8.04 CD, and it does work with it.  It says it is using the r8169 driver, so I must be close!  Any ideas where to go?

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #2 on: December 29, 2008, 04:23:10 pm »
I got past the kernel panic, the problem was that this board doesn't need the Realtek 8168 patch that is in the wiki.  I replaced the driver with the original and it doesn't kernel panic anymore.

Now it says:
Code: [Select]
IP-Config: eth0 hardware address 00:30:18:a3:xx:xx mtu 1500 DHCP RARP
r8169: eth0: link down

The 2nd NIC is already disabled in the bios, any ideas?

b4rney

  • Guru
  • ****
  • Posts: 454
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #3 on: January 13, 2009, 10:39:28 pm »
Hi nosebreaker,

I have a j9f2 extreme from jetway which requires the 2nd pci-e device (2nd NIC) to be disabled in the bios as well as disabling the pxe-boot option. I found without this the 2nd NIC is still active and the NICs keep swapping during the boot process.
http://wiki.linuxmce.org/index.php/Jetway_J9F2-Extreme_Core_Duo_Mainboard#Bios
Hope this helps.

Barney

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #4 on: January 22, 2009, 10:20:16 pm »
Hi B4rney,

I was only able to get it to start to netboot by disabling the 2nd NIC in the BIOS as well as PXE, and enabling "legacy LAN" as the first boot option.  I think it has to do with the r8169 driver, I've been trying to use:
http://rom-o-matic.net/gpxe/gpxe-0.9.6/contrib/rom-o-matic/
to create a bootable image but I don't know the PCI ID, and I haven't had much free time to find out.  Any tips are appreciatted.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #5 on: January 22, 2009, 10:49:16 pm »
The chipset 8111C uses the r8168 driver not r8169, which is your problem. It is incorrectly loading the r8169 driver to run an r8168 ethernet port, thus it fails and says link down.

That is what the patch is all about in that article. You have to remove r8168 as a valid code for the r8169 driver (because r8169 cannot drive r8168) and recompile. This effectively stops the kernel from loading that drivers as it no longer thinks that the driver is valid for that ethernet port (which it isn't! bug!). Then install the actual r8168 driver, and depmod it. That will then allow the kernel to see the r8168 driver as valid for the r8168 port.

Don't forget, when you are doing this, you are mod'ing, depmoding, compiling and installing the drivers on your core. You then have to do the equivalent steps to copy these changes into the diskless image for your MD otherwise it won't make any difference. It can be complex, and easy to get confused as to what you are doing, but following the articles very carfully will get you there. Bottom line is, just having the drivers in the diskless image isn't enough, afterall the machine has to at least boot far enough on LAN before it can even access the diskless image (a catch 22!).

This is what the initramfs and vmlinuz images are about. They get loaded via tftp during the PXE boot using the BIOS's NIC driver. vmlinuz coordinates to create a ramfs and expands initramfs into it, then boots from it. This is like a linux microkernel that is used for mounting the boot share over the network and downloading all the files needed to boot the real kernel. Thus the updated drivers and configuration not only have to be in the diskless image (ready for the "real" kernel to use), but also have to be embedded in the initramfs image so that the "microkernel" used for booting can still drive the NIC once it takes over from the BIOS's NIC drivers. If it doesn't, or isn't configured correctly, the kernel will panic at exactly the spot you indicate ... simply because it has lost control of the NIC and therefore the boot process can't continue... deadend.

What this means is, your PXE appears to be configured correctly, as does your core and network - the MD is successfully loading the images and booting the initramfs image, but either the patch isn't done and both drivers embedded in the image, or the depmod isn't done subsequently to "activate" those changes. The initramfs commands in the article are taking drivers and config from the diskless image and recreating a new initramfs image for you...

Thus, patch the drivers, recompile and depmod them on the core.
Then use the rebuild image button to create the diskless image, which will draw upon the files on the core (including the ones you have modified)
Confirm that the diskless image now has the modified drivers
Then use the article to create a new initramfs image from the diskless image's files
Then you should be able to boot and get past that point.

(PS, Tip: make sure you understand what is happening when you do the CHROOT bit, and keep clearly in mind when you are performing tasks on the core vs when you are actually performing tasks on the MD via the core (because you can't actually do them on the MD yet cos its not running!))
« Last Edit: January 22, 2009, 10:51:06 pm by colinjones »

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #6 on: January 23, 2009, 06:00:38 pm »
I am pretty sure the newer r8169 driver covers the r8168, let me explain what I did earlier below.

Ok, I tried this in the mean time:
  • Installed Kubuntu 7.10
  • Downloaded r8169-6.009.00 code from realtek.com.tw
  • Compiled, and copied into kernel
  • reboot, nic sort of works.  LOTS of errors on interface. After manual config it worked fine, aside from errors logged on interface
  • Tried to install LMCE, it hung on the "insert kubuntu cd" bit, so I removed the CD as a source from apt sources and ran it again
  • It took a long time, but it did finish and rebooted, couldn't start X so I changed driver to vesa and rebooted
  • Lots of errors about being unable to talk to 192.168.80.1, this is because eth0 vanished.  Ran AVwizard and then rebooted.
  • Strange, KDE came up!  Logged in and attempted to recompile NIC driver again, but got permission denied errors.  Did it as root and it worked, but get "YPBINDPROC_DOMAIN" errors 3x on every command.
  • -- get permission denied on folders I created earlier, is this due to renaming system from jetway to moon42?
  • Copied r8169.ko to drivers path (from r8168 wiki page), ran depmod, modprobe r8169, and rebooted since that didn't do anything.
  • No ethernet...
So I need a little assistance, I found that rom-o-matic site to help create pxe images, but I don't know the PCI id of my NIC, so I don't know which image to use.  How can I tell?  I see 10DE:xxxx when it boots from the bios screen.

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #7 on: January 23, 2009, 06:23:46 pm »
Oh I got it, it was 10DE 0760 0200 and 10EC 8168 0200, so the r8169 10EC,8168 option appears to be what I need.

b4rney

  • Guru
  • ****
  • Posts: 454
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #8 on: January 24, 2009, 01:07:01 am »
Hi nosebreaker,

The only time I've seen both kernel panic and eth0: link down is with the r8168 issue.

Might be worth following the wiki guide in detail again. I'm pretty sure this is your problem. Colinjones detailed explanation in post 5 covers everything you need to know.
Hope this helps
Barney

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #9 on: January 24, 2009, 01:14:41 am »
I'm certain it is, but I believe I am expending breath here! One last attempt, then I move on from this thread. The r8169 drivers believes that it can handle a r8168 chip and it says so in its config. That is the problem, it can't handle it, but the kernel can only go on what the driver tells it. So it loads that driver and thus fails. The instructions you were given detail how to recompile the driver after taking out that incorrect piece of information. And to add the real r8168 driver that correctly tells the kernel it can drive that chip. Thus the correct driver then gets selected. In your boot messages, if it says r8169 it is still selecting the wrong driver. bye

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #10 on: January 24, 2009, 01:20:29 am »
I don't doubt you, I'm going to try to do that tonight.

Some info:
The Kernel panic only happened after I did the r8168 modification, without it, it doesn't happen.
Ubuntu 8.04 works fine, and claims it is using the r8169 driver.
I compiled the latest r8169 driver (before installing LMCE), and it worked (but had interface errors).

I am currently trying to figure out how to get this PXE image to be chosen when the box PXE boots, but /usr/pluto/diskless doesn't exist!  I will compile r8168 again, but how do I get it into the PXE image?

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #11 on: January 27, 2009, 05:17:26 am »
Yay progress!

Ok so the r8168 modification worked, my core seems to use a different nic entirely so no problems.

It starts to netboot, and then it said: Diskless setup failed in red

I noticed it said amd64 and my core is i386, so I changed the Architecture on the Media Directors page to i386 and clicked save.  Then I reboot the MD and it sits at that screen forever, and then it reboots itself.  I haven't seen what it says but when it comes back it seems to think it has the r8169 driver, not r8168.  I then followed the same instructions as the Asus M3A78-EM bit on the Realtek 8168 page, and then rebooted the MD and...

Success!  It is net booting successfully.  No video yet, but I bet its just the nvidia problem as before.  So far so good!

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #12 on: January 27, 2009, 06:24:27 am »
So I got this motherboard working now.  The nvidia driver it came with didn't work, but it is working now, although it is giving an abysmal glxgears number (60fps), this might be fixed with a newer nvidia driver though.  However UI2 with alpha blending is working, I used nvidia driver 177.80.

b4rney

  • Guru
  • ****
  • Posts: 454
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #13 on: January 27, 2009, 10:50:49 am »
Glad you got it sorted! :)

I'm tempted by the Jetway JNC62K myself.
Barney

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Net boot - Jetway JNC62K mobo - Kernel panic
« Reply #14 on: January 27, 2009, 04:50:08 pm »
I'm buying another right now, now that I know it works :)