r6 - 01 Nov 2005 - 17:42:43 - MichaelMazzaYou are here: TWiki >  Ltsp Web  > KernelOptions

Kernel cmdline options

There are times when you might need to pass special parameters to the Linux kernel, to configure some special feature, or to tell it of a certain network card to use. This is easy to do with the LTSP kernels. The method you use depends on how you are loading the kernel into memory.

Etherboot

To pass an option via the kernel command-line with Etherboot, you need to specify a couple of options in dhcpd.conf.

The general form is like this:

  option   option-128    e4:45:74:68:00:00;   * (See box below for info about this value)
  option   option-129    "KEYWORD=VALUE";

Where KEYWORD is the option you are trying to pass, and VALUE is obviously the value you are trying to give to the keyword.

For instance, to tell the kernel to use a certain network card driver, you would do this:

  option   option-128    e4:45:74:68:00:00;
  option   option-129    "NIC=3c509";

You can specify multiple kernel parameters by separating them with a space. For instance, if you wanted to pass the NIC driver and use the framebuffer console mode, you could do it like this:

  option   option-128    e4:45:74:68:00:00;
  option   option-129    "NIC=3c509 vga=773";

With ISC DHCP v3.0 and newer, you need to declare the types for option-128 and option-129. This is done near the top of the dhcpd.conf file like this:

  option option-128 code 128 = string;
  option option-129 code 129 = text;

You can append NIC module options using option-129 as well. Note: Each driver has its own set of kernel passable parameters and options, check the documentation for your NIC Driver for more information.

  option   option-128    e4:45:74:68:00:00;
  option   option-129    "NICOPT=options=5"; * Sets Tulip Module Media-Type to 100baseTx-FD

Take a look at this page for more information on Tulip Driver Module Options

IMPORTANT!

In the examples above, The value of option-128 is shown as: e4:45:74:68:00:00
That value is NOT a MAC address!
When using Etherboot, if you want it to pass the contents of option-129 to the kernel, you MUST set option-128 to e4:45:74:68:00:00. That is a special signature that etherboot is looking for, before it will pay attention to option-129.

PXE

Passing a kernel cmdline argument when using PXE is a bit simpler than Etherboot. You need to find the pxelinux configuration file, and if you only want to pass a parameter for some, but not all workstations, you'll need to create a separate config file for each workstation.

Start by finding the config file. If you are using the standard 2.4.26-ltsp-2 LTSP kernel, then the config file will be: /tftpboot/lts/2.4.26-ltsp-2/pxelinux.cfg/default

The file, as supplied by LTSP.org looks like this:

prompt 0
label linux
  kernel bzImage-2.4.26-ltsp-2
  append init=/linuxrc rw root=/dev/ram0 initrd=initrd-2.4.26-ltsp-2.gz

Adding a parameter to the kernel command line is simply a matter of adding it to the end of the append line. For example, you could do this:

prompt 0
label linux
  kernel bzImage-2.4.26-ltsp-2
  append init=/linuxrc rw root=/dev/ram0 initrd=initrd-2.4.26-ltsp-2.gz NIC=3c509 vga=773

Notice the underlined values at the end of the append line.

The problem with editing the default file is that ALL workstations will get the new value passed to the kernel. That may not be what you want. So, you need to make a separate config file for the workstation that you want to get the value.

Take a look at this page for information about how to name a custom PXE configuration file.

-- JimMcQuillan - 18 Mar 2005

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r6 < r5 < r4 < r3 < r2 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback