Re: Support for kernel parameter NIC= in LTSP5 on Ubuntu?

Gideon Romm <[email protected]>
Newsgroups gmane.linux.terminal-server.devel
Message-ID <[email protected]>
Veli-Matti,

Your proposed fix will not work in most cases, because in most cases
where the client has two onboard NICs, they will be controlled by a chip
(or chips) with the same driver, so you still could get the problem you
are seeing.

One workaround, for now, would be to add the following to your PXE
kernel command line:

IPOPTS=:::::eth0

Then, simply by trial, figure out which of the two NICs comes up as eth0
(while this is not always 100% consistent, it should work most of the
time).

I have code written for Ubuntu NBD connection that tests with
mii-tool/ethtool for the presence of a link and uses the NIC whose link
is active.

Unfortunately, this code is Ubuntu NBD specific at the moment, so
finding a way to introduce such code in a cross-distro compatible way
would be best before pushing it upstream in LTSP.  In fact, it may be
something more suitable to be pushed to a different upstream project.

HTH,

-Gadi


On Thu, 2009-02-26 at 13:39 +0200, Veli-Matti Lintu wrote:
> 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
-- 
--------------------------------------------------------
Gideon Romm | Proud LTSP Developer
[email protected]

Support LTSP!  Buy your hardware at:

        www.DisklessWorkstations.com
        www.DisklessThinClients.com 
 
(use coupon code: LTSP5P for 5% off thin clients from DisklessThinClients.com)


------------------------------------------------------------------------------
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.