Author Topic: Driver  (Read 493 times)

nue2

  • Newbie
  • *
  • Posts: 8
    • View Profile
Driver
« on: June 05, 2009, 08:07:58 pm »
greetings,
I have a ethernet driver for what is going to be an MD that i need to install because I get a kernel panic.  My question is whether or not I need to just simply create a MD in the admin web and put the module in:

/lib/modules/<KERNEL VERSION>/kernel/drivers/net/

or if it is necessary to do all or any of these steps listed in the "unrecognized Lan/rt8168" listed below which i'm trying to adapt to my lan.

sudo su
cd /usr/src
unzip -qq /path/to/LinuxDrivers.zip
cd /usr/src/LinuxDrivers/LAN/r8168-8.003.00/r8168-8.003.00
make
cp src/r8168.ko /lib/modules/2.6.22-14-generic/kernel/drivers/net/
mv /lib/modules/2.6.22-14-generic/kernel/drivers/net/r8169.ko /lib/modules/2.6.22-14-generic/kernel/drivers/net/r8169.ko.not
depmod -a
/usr/pluto/bin/Diskless_BuildDefaultImage.sh
cp /lib/modules/2.6.22-14-generic/kernel/drivers/net/r8168.ko /usr/pluto/diskless/<moon #>/lib/modules/2.6.22-14-generic/kernel/drivers/net
vi /usr/pluto/diskless/<moon #>/etc/initramfs-tools/modules
added r8168 and saved
cd /usr/pluto/diskless
chroot <moon #>
mv /lib/modules/2.6.22-14-generic/kernel/drivers/net/r8169.ko /lib/modules/2.6.22-14-generic/kernel/drivers/net/r8169.ko.not
depmod -a /lib/modules/2.6.22-14-generic/kernel/drivers/net/r8168.ko
cd /boot
update-initramfs -uv
(scrolled up to verify the new module was added it was at the top of the output)
for S and G's ran depmod -a again
exit out of the chroot

« Last Edit: June 05, 2009, 10:50:06 pm by nue2 »

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Driver
« Reply #1 on: June 05, 2009, 11:46:22 pm »
You need need to follow the unrecognised NIC article (and if it is an R8168 that article as well, first). Being an MD it needs to boot the OS from network, having the driver in the OS is all well and good, but not much use if your OS isn't loaded! When you are booting your OS isn't loaded, and you need network to do so... catch 22!

The purpose of that article is to modify your MD's initramfs (initial RAM disk) which is bootstrapped by your BIOS PXE software. The BIOS PXE software knows how to use the NIC, so getting the initramfs into memory and running is easy. The code in initramfs is a very basic kernel including all the basic drivers needed then to load the real kernel... so is that file doesn't have a driver for your NIC and the only way to continue the boot is to use the NIC, then the boot process reaches a dead end and thus the kernel panics.

hth

nue2

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Driver
« Reply #2 on: June 05, 2009, 11:50:00 pm »
ok collinjones thanks for taking the time to reply, wanted to make sure. cheers  :)