Author Topic: Shuttle X27D diskless MD up and running - RTL8111/8168B  (Read 8153 times)

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Shuttle X27D diskless MD up and running - RTL8111/8168B
« on: April 12, 2009, 12:00:59 am »
Hi folks,

Trying to set up a Shuttle X27D as a diskless MD.
The core is running 0710, and has this one as a second NIC, working out of the box
Code: [Select]
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
        Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
        Flags: bus master, fast devsel, latency 0, IRQ 21
        I/O ports at e800 [size=256]
        Memory at febff000 (64-bit, non-prefetchable) [size=4K]
        Expansion ROM at febc0000 [disabled] [size=128K]
        Capabilities: <access denied>

When I try to PXE boot my MD, it boots off the core allright, up to a point where it says to first see the NIC as a RTL8168b/8111b, and later on drops the link as r8169....
See picture attached.

During boot of the MD it clearly shows 8111B/8111C

I've also booted the MD from Kubuntu 0710 live cd.
Strange enough the system recognizes the NIC, but fails to configure with dhcp. Whenever I try to manually set the IP, mask and gateway the system responds with something like wrong gateway...
It defaults back to 192.169....

I've also tried adding a USB NIC (Linksys 200M), this gets recognised and receives IP from dhcp without any problem at all, unfortunately it doesn't seem to support PXE booting... (tested with Kubuntu 710 live cd)

I found the wiki article on how to add support for unrecognized NIC, but am not sure how to proceed...

In case I would temporarily add an hd to the MD, is there any way to install LinuxMCE from DVD, disable the core and have it act as an MD only - and then make an image or move the install to the core...???

Any help appreciated!

Erwin
« Last Edit: April 12, 2009, 08:25:37 pm by Lexje »

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Help with diskless MD - RTL8111/8168B
« Reply #1 on: April 12, 2009, 03:53:58 am »
Its simple, you have the 8168/8169 driver bug. The Realtek 8169 driver claims it can drive the 8168 NIC you have, but it can't. You need to modify the 8169 driver source so that it does not claim this, then recompile it. Then add both this driver and the correct 8168 driver to the Default initramfs boot image (used for the first time you boot a new MD) AND the MD-specific initramfs boot image used for all subsequent boots of the MD. This will then allow your MD to boot correctly, using the correct 8168 driver for your hardware.

You can find the intructions on how to do this mod on the wiki in these articles:
http://wiki.linuxmce.org/index.php/R8168
http://wiki.linuxmce.org/index.php/Unrecognized_NIC

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Help with diskless MD - RTL8111/8168B
« Reply #2 on: April 12, 2009, 12:33:39 pm »
Collin, thanks a lot for your quick input.
I'm not too familiar with patching (yet :-))
I've followed the steps in the wiki, but am stuck at:
Code: [Select]
    *  Prepare the kernel so you can build modules:

make scripts prepare

Code: [Select]
linuxmce@dcerouter:/usr/src/linux-source-2.6.22$ sudo make scripts prepare
[sudo] password for linuxmce:
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
linuxmce@dcerouter:/usr/src/linux-source-2.6.22$

I've tried adding sudo, etc, but it seems the system will not recognize the following command:
Code: [Select]
    *  Apply this patch:

patch < r8168.diff

gives:
Code: [Select]
linuxmce@dcerouter:/usr/src/linux-source-2.6.22$ sudo patch < r8168.diff
bash: r8168.diff: No such file or directory

Am trying to read up on applying a patch, but as far as I understand at the mo the r8168.diff file should be present somewhere shouldn't it?
... and it seems not to be...

Thanks for any input & Happy Easter!!
« Last Edit: April 12, 2009, 01:07:32 pm by Lexje »

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Help with diskless MD - RTL8111/8168B
« Reply #3 on: April 12, 2009, 03:13:39 pm »
Okay, found this:
Will try to complete following this thread:
http://forum.linuxmce.org/index.php?topic=6365.msg41472#msg41472

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Help with diskless MD - RTL8111/8168B
« Reply #4 on: April 12, 2009, 04:05:39 pm »
Following the thread above I was able to manually exclude the line using sudo nano, so in this case this was a lot easier... :-)
Checking that the new r8169 module doesn't have the "pci:v000010ECd00008168sv" alias: works out fine!
So at the mo my X27D MD is building its image...
I wonder how I can see that it's finished / or stuck... as it's sitting a long time at the same line now....
Having a look at pluto-admin, I can see it has (wrongly) chosen AMD architecture....

Regards,

Erwin

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Help with diskless MD - RTL8111/8168B
« Reply #5 on: April 12, 2009, 04:35:56 pm »
AMD64 doesn't mean AMD chip, it is the industry standard way of saying it is in 64 bit mode (either Intel or AMD, doesn't matter). i386 means 32 bit mode (Again Intel or AMD, doesn't matter). You really should switch it to i386 and rebuild... in fact you shouldn't have been able to run any commands after the chroot if the core is not the same architecture.... Mine did the same thing, I think I just switched it to i386 and rebuilt the image before following the process...

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Help with diskless MD - RTL8111/8168B
« Reply #6 on: April 12, 2009, 05:03:38 pm »
Okay, stumbling forward...  ;)
Deleted the MD(s)
I thought something was wrong, not all too sure, think I was doing several things at the same time with consequences...-
but, apparently the MD was booting allright, but then the r8169 problem reoccurred on the diskless image:
Indeed the wiki explains how to adjust this too, nice...

But...
Code: [Select]
dcerouter_111112:/usr/pluto/diskless# chroot 75
chroot: cannot run command `/bin/bash': Exec format error
From what I find this may have to do with architecture???

How to proceed...?
If I can't chroot, I can't do
Code: [Select]
cd /usr/pluto/diskless/
chroot <mediadirector-id>
depmod
cd /boot
mkinitramfs -o initrd.img-`uname -r` `uname -r`
exit

Or should I once more remove this MD, and try to set it up manually using i386 architecture...?

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Help with diskless MD - RTL8111/8168B
« Reply #7 on: April 12, 2009, 05:12:41 pm »
Yes, its the architecture thing.

Allow it to discover the MD and build the image. Then from the web admin, change the architecture to i386 (same as the core), hit save, then rebuild the image. Now you have an image with the same architecture as the core so you will be able to run chroot and the other commands, so you can now follow the instructions in the wiki.

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Help with diskless MD - RTL8111/8168B
« Reply #8 on: April 12, 2009, 05:20:08 pm »
Collin thanks, rebuilding as I write :-)
Looking forward as this is finally looking like getting somewhere...
Where are you based? Down under?
If I could support the community with server space and bandwith for Europe, I'd be glad to look into it :-)

Regards,

Erwin

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Help with diskless MD - RTL8111/8168B
« Reply #9 on: April 12, 2009, 05:42:27 pm »
Hmmmm,
I've ran over all the steps, and my MD is booting allright up to the point that it says: r8169: eth0: link down..
So I guess the image of my MD has not been modified properly here..?
Code: [Select]
  Modify the media director initial ramdisk

To boot this diskless MD later on, the configuration for this new device has to be modified to include the above line as well. Look in the directory structure under /usr/pluto/diskless. Each media director has a directory named with the ID of the director in here. Go into the /usr/pluto/diskless/<mediadirector-id>/etc and edit the file modules to also contain

atl1

Also, go into /usr/pluto/diskless/<mediadirector-id>/etc/initramfs-tools and put the line into a file called modules. After this, chroot into the directory of the media directory, and re-create the initial ramdisk.

To create a new initial ram disk the command is

cd /usr/pluto/diskless/
chroot <mediadirector-id>
depmod
cd /boot
mkinitramfs -o initrd.img-`uname -r` `uname -r`
exit

Now reboot your media director. Everything should come up, the way it is meant to.

How can I check this?

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Help with diskless MD - RTL8111/8168B
« Reply #10 on: April 12, 2009, 06:05:21 pm »
Damn, I must be missing something...
I forgot to copy over the r8168.ko module to /usr/pluto/diskless/75/lib/modules/2.6.22-14-generic/kernel/drivers/net$ - corrected that.
Upon rebooting still the r8169 down error, so that is still playing tricks on me..
Okay, got it, have to also copy the modified r8169.ko to my diskless MD - off course - stupid *$/(!!!

So now upon rebooting the MD, it says: r8169: eth0: link up...
But then just sits there...

hmmmm, what next?

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Shuttle X27D diskless MD up and running - RTL8111/8168B
« Reply #11 on: April 12, 2009, 08:34:16 pm »
Okay, folks, for those following this thread - here's an update:
I have the X27D successfully running as a diskless MD. Thanks to the great help of Colin Jones! Thumbs up!!

I had a look at Andrew's comparable EEE box setup;
It seems the Intel GMA950 drivers are loaded properly default - Very good!
I'm still looking into sound, as this box should support 5.1, only how and where to connect...
Alsamixer reports HDA Intel, Realtek ALC662 rev1 chip... I don't see any multi channel support there, but that is not so important, yet.

Now I still have some questions:
I'd like to get the AVwizard back on after booting (I've changded the monitor...)
So I tried firing up KDE, no problem there, set to change the video resolution... LMCE asks me if I want to reboot now?
Yes... But then nothing happens....

How can I reboot an MD? It seems reboot from ssh moonXX is not accepted either...

I'll report back when more news.

Regards,

Erwin

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Shuttle X27D diskless MD up and running - RTL8111/8168B
« Reply #12 on: April 12, 2009, 10:45:17 pm »
Press the power button or turn the MD off from the Power menu in the UI. Either way, when the Kubuntu loader screen comes up and you hear the decending beeps, press and hold the shift key, this will trigger the AV Wizard... don't try to change any settings like this from KDE, it has nothing to do with it and could easily screen things up!

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Shuttle X27D diskless MD up and running - RTL8111/8168B
« Reply #13 on: April 12, 2009, 10:58:57 pm »
Thanks for sticking with me!
Found that already too - although it seems I froze (or nearly?) my core.
I'm trying not to force things.

I assigned the MD to a new room, this way I could grab hold of it through the XP orbiter after changing room...
So this way I can reboot.

Trying video res now;
Problem with AVwizard is also that this system has no speaker.... Will look for a connection though...

I have somehow managed to get into the AVwizard (via KDE & Launchmanager), and set it to 720 or 1080... Also changed UII to UIII, looks quite okay, BUT system does not react to buttons anymore (overlay)

Also my monitor loses connection and I have to switch it on/off to reconnect...

I'll try to put Andrews xorg.conf in place and see what that does...

I'll report back.
Regards,

Erwin

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Shuttle X27D diskless MD up and running - RTL8111/8168B
« Reply #14 on: April 12, 2009, 11:09:27 pm »
Quick question:
I'd like to do some more testing using Kubuntu 8.10 live CD.
Will this interfere with the diskless MD setup as this is linked with the MAC adress of this box?