Support for kernel parameter NIC= in LTSP5 on Ubuntu?

Veli-Matti Lintu <veli-matti.lintu-Wdv/[email protected]>
Newsgroups gmane.linux.terminal-server.devel
Organization Opinsys Oy
Message-ID <1235648398.9939.33.camel@localhost>
Hi,

LTSP 4.2 used to support kernel parameter NIC= to load specified module
for a nic as specified here:

http://wiki.ltsp.org/twiki/bin/view/Ltsp/KernelOptions

This is really useful feature in cases when using older pc hardware with
multiple nics that cannot be disabled from bios.

Without this setting this can happen:

* Thin client has two NICs: A and B (A is connected and B is not)
* NIC A initiates PXE and loads kernel and initrd
* kernel and initrd load first driver for NIC B and make it eth0
* initrd tries to run dhclient on eth0 using NIC B (this fails as NIC B
is not connected)

The old NIC= parameter made sure that module for NIC A was loaded first
in initrd.

I could not find any information about this feature for LTSP5 and none
of the source packages for Ubuntu Hardy seem to have it. I've been using
the patch below to add support for this in chroot's initrd scripts, but
if there's a better way to do it, I'd be glad to hear about it.


------------------------> patch <-------------------------------------

--- usr/share/initramfs-tools/init.orig 2009-02-26 13:00:20.000000000
+0200
+++ usr/share/initramfs-tools/init      2009-02-26 13:11:33.000000000
+0200
@@ -125,6 +125,9 @@
                debug=y
                set -x
                ;;
+       NIC=*)
+               NIC=${x#NIC=}
+               ;;
        break=*)
                break=${x#break=}
                ;;
@@ -145,6 +148,12 @@
 run_scripts /scripts/init-top

 maybe_break modules
+
+if [ -n "${NIC}" ]; then
+       log_begin_msg "Loading NIC driver..."
+       modprobe ${NIC}
+fi
+
 log_begin_msg "Loading essential drivers..."
 load_modules
 log_end_msg

------------------------> patch <-------------------------------------

Veli-Matti Lintu


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_____________________________________________________________________
Ltsp-developer mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-developer
For additional LTSP help,   try #ltsp channel on irc.freenode.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.