CULT classic custom: usage

From Codtech



  Download the latest CULT classic custom image from SourceForge mirrors.



Contents

Booting using a CDROM image

This represents a CULT classic custom live image. Can be tested with no risks in any computer or virtual machine. It will not use the local hard disk or any other local storage.

ISOLINUX boot loader

Normally, images have the ISOLINUX boot loader to avoid problems that were reported using rather old and buggy BIOS where GRUB fails to boot.

After booting from the CDROM this ISOLINUX menu is presented

Usage of the different client sessions are described in the following sections.

If  Enter  is pressed the system boots straight to the selected session or you can edit an ISOLINUX menu entry to modify the CULT: Kernel command line parameters used to boot.

GRUB boot loader

Image:Note.pngNote:
GRUB is not in the default ISO image because some errors were reported when using old BIOSes

After booting from the CDROM this GRUB menu is presented Image:CULT classic custom-cdrom boot.png

Usage of the different client sessions are described in the following sections.

If <Enter> is pressed the system boots straight to the selected session or you can edit a GRUB menu entry to modify the CULT: Kernel command line parameters used to boot.

Menu entries

CODTECH Universal Linux Thinclient 3.0 (rdp)

This is perhaps the most used entry.

The CDROM image is read-only and some values were decided at build time, so it's likely that you need to change them.

Among these values, the server name or IP address to be connected to through RDP is the most crucial.

This is explained in detail in CULT classic custom: Editing boot loader options and the available options in CULT:_Kernel_command_line_parameters#rdp.

In a nutshell you can configure RDP parameters. For example, to change the preconfigured Windows Terminal Server, that could be

... rdp=wts

this parameter can be edited to contain your Windows Terminal Server hostname or IP address

... rdp=192.168.100.1

Alternatively, adding wts.your.company.domain to your DNS avoids changing the command line.


Other parameters can also be passed to rdesktop the RDP client. These are exactly the same as parameters accepted by rdesktop with the only modification that command line withespaces must be replaced by +

... rdp=-a+16+-k+es+192.168.107.228:6789 ...

As mentioned above, any parameter accepted by rdesktop can be added here.

CODTECH Universal Linux Thinclient 3.0 (rdp verbose)

This adds verbose boot messages (as marked in the picture with the red dotted line). Boot parameters can be modified as explained in Editing a GRUB menu entry.

The IP address or hostname of the RDP server might have to be set.

These messages are a valuable tool to identify some problems during the boot process.

CODTECH Universal Linux Thinclient 3.0 (xdm)

The CDROM image is read-only and some values were decided at build time, so it's likely that you need to change them.

Among these values, the XDM connection method and possibly server name or IP address to be connected to through XDMCP.

This is explained in detail in CULT:_Kernel_command_line_parameters#xdm.

The image is pre-configured without an xdm parameter and this means that the default -broadcast is used (see initrd/scripts/startx).

In a nutshell you can configure XDM parameters as in

... xdm=-query+192.168.1.100 ...

CODTECH Universal Linux Thinclient 3.0 (xdm verbose)

This adds verbose boot messages (as marked in the image with the red dotted line). Boot parameters can be modified as explained in Editing a GRUB menu entry.

The XDM method and possibly the IP address or hostname of the XDM server might have to be set.

CODTECH Universal Linux Thinclient 3.0 (ask)

Image:Warning.pngWARNING:
This session is not yet fully implemented

CODTECH Universal Linux Thinclient 3.0 (DEBUG)

This entry presents all off the boot messages with no splash.

Then, a terminal is launched.

CODTECH Universal Linux Thinclient 3.0 HELP

Image:Warning.pngWARNING:
This session is not yet fully implemented

Etherboot network boot

This starts a network boot process using Etherboot.

Local boot

Boot from the local device specified in BIOS.

Specifying IP address

If you are not using a DHCP server, or if by other reason you prefer to assign the IP address and other parameters manually, how to edit the boot loader and set the ip is explained in detail in CULT classic custom: Editing boot loader options and the available options in CULT:_Kernel_command_line_parameters#ip.

Using the VMware virtual thin client

A virtual thin client definition is provided to ease cult tests.

Download the virtual thin client definition from http://sourceforge.net/project/showfiles.php?group_id=207157&package_id=249907.

This can be used with VMware Workstation and VMware Player (free).

vmplayer

$ vmplayer "CULT (vmware 6).vmx"

Booting using a network bootable image

Image:Tip.pngTIP:

The content of the CDROM is compatible with the content of the TFTP server to provide network boot, so the only steps needed to achieve this are

  • copy the content of the CDROM to the TFTP server root
  • configure the DHCP server to specify the boot loader (/cutl/pxelinux.0) in the boot filename

The DHCP and TFTP server must be configured to boot the CULT classic custom kernel and image using the preferred boot loader.

The main advantage of this method agaist booting from the live CDROM is that you can permanently change CULT: Kernel command line parameters in the boot loader configuration file. This objective can also be reached by altering CDROM contents and generating the image again using the right tools.

Setting up TFTP server

TFTP is needed to serve the required files to boot diskless thin clients.

In most setups, the TFTP is chrooted to some directory for security reasons, a common place is /var/lib/tftpboot or /tftpboot. As the service runs inside this directory it must be stripped out from file's path.

In your filesystem, the real location for the configuration files will be inside /var/lib/tftpboot/cult directory.

Linux

Installation

Install TFTP server according to your distribution instructions. Usually the package is tftpd-hpa or tftp-server.

Ubuntu, Debian or derived distributions

For example, in Ubuntu or Debian

$ sudo apt-get install tftpd-hpa
RedHat, Fedora, RPM based
$ yum install tftp-server

Activate the service

Activate the TFTP server. Also be sure that no firewall is blocking the access to this service.

Configuration

This configuration uses /var/lib/tftpboot as the TFTP root and xinetd.

# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{
        disable = no
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /var/lib/tftpboot -v
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

Microsoft Windows

In Microsft Windows there are different alternatives on selecting the TFTP and DHCP server. The simplest choice is to use tftpd32 available from its home page.

tftpd32 installation

Download from http://tftpd32.jounin.net/tftpd32_download.html and install tftpd32 as described in its documentation.

Image:Warning.pngWARNING:

Latest tftpd32 versions have some problems. Our tests succeeded using tftpd32-3.03. Your mileage may vary.

tftpd32 settings

This screenshot shows the normal settings. In this case C:\var\lib\tftpboot is used as the TFTP root directory to keep consistency with other platforms.

Also notice that DHCP has been disabled in this example which may or may not be your case.

PXE Compatibility and Allow '\' as virtual root are other settings that should be checked.

Verification and troubleshooting

To an earlier detection of any problem that may appear during the network boot process is advisable to verify the TFTP installation and functionality.

Using another computer, ideally on the same network that you intend to network boot clients, run a TFTP client to simulate the transfer that occurs during booting, and get the following list of files from the TFTP server.

  • /cult/pxelinux.0
  • /cult/vesamenu.c32
  • /cult/pxelinux.cfg/codtech.png
  • /cult/pxelinux.cfg/default
  • /cult/vmlinuz
  • /cult/cult.img

Setting up DHCP server

Linux

ISC DHCP Server

This server supports conditional configuration and you can do something like this

... 
log(debug, substring(option vendor-class-identifier, 0, 9));
if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
   filename "/cult/pxelinux.0";
}
...
standard configuration
ddns-updates off;

option nbgrub-menu code 150 = text;
option option-128 code 128 = string;
option option-129 code 129 = text;

deny client-updates;
one-lease-per-client false;
allow bootp;


subnet 10.1.1.0 netmask 255.255.255.0 {
	option routers			10.1.1.1;
	option subnet-mask		255.255.255.0;
	option broadcast-address 10.1.1.255;

	option nis-domain		"codtech.com";
	option domain-name-servers	192.168.1.1;

	option time-offset		3600;	# CET

	default-lease-time 		21600;
	max-lease-time 			43200;
	# not specifying next-server should use the same address as the DHCP
	# server
	#next-server 			192.168.1.150;
	# seems to work


	pool {
		range 10.1.1.221 10.1.1.229;
	}

	#
	# generic options
	#
	log(debug, substring(option vendor-class-identifier, 0, 9));
	if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
		#filename "/pxes/grub/pxegrub";
		filename "/codtech/pxelinux.0";
	}
	elsif substring (option vendor-class-identifier, 0, 9) = "Etherboot" {
		filename "/pxes/grub/nbgrub";
	}

	option nbgrub-menu "(nd)/pxes/grub/menu.lst";
	option option-128 43:55:4C:54:4f:50:54:00;
	option option-129 "cult_conf_url=http://10.1.1.1/cult/default.conf";
}
advanced configuration

Extra options can be set to have more control of the PXE boot process. The definition and use of these options is discussed in PXE#PXE DHCP options.

Microsoft Windows

Microsoft DHCP Server

Command line tool

Run

dhcpmgmt.msc
Using GUI

Highlight the Scope Options for the subnet in which you like to use CULT or PXES. Now choose configure options from the Action menu. Find 066 Boot Server Host Name and enter a String Value of the name of your MS DHCP server.

It's recommended that you use your DHCP server as the TFTP server because some faulty PXE implementations ignore the TFTP server option and blindly try to use the DHCP server to download the boot loader.

But to inform PXE clients that the DHCP server also serves TFTP requests you need to enter the following Binary Value for 043 Vendor Specific Info: 01 04 00 00 00 00 ff.

Now find 067 Bootfile Name and enter a String Value of /cult/pxelinux.0. Additionally, you must add Option 060 ClassID. Because Option 060 is not standard on Windows 2000 and Windows 2003, you may need to add it from the command line. To do so, start Command Prompt and enter the following commands:

     C:\WINDOWS\system32>netsh
     netsh>dhcp
     netsh dhcp>server \\<server name> *OR* <server IP address>
     netsh dhcp server>add optiondef 60 PXEClient String 0 comment=PXE support
     netsh dhcp server>set optionvalue 60 STRING PXEClient

To verify that the Option 060 was added successfully enter the command:

     netsh dhcp server>show optionvalue

Exit issuing command exit and restart your DHCP server. In the right pane you should see Scope Options as in the image above.

Image:Microsoft DHCP server- Server options.gif


tftpd32 settings

In this case tftpd32 is used as the DHCP server. Microsoft Windows DHCP server can also be used.

The most important setting is the boot file name in this case /cult/pxelinux.0 which is the name of the boot loader.

cult folder

Copy the content of the CDROM into the TFTP root folder, in our examples this is /var/lib/tftpboot.

$ sudo cp -a /media/cdrom/cult /var/lib/tftpboot/


Image:tftp_cult_folder_contents.png

This includes all the necesary files to network boot cult clients.

file or folder description
isolinux these are the needed files to boot the CDROM
pxelinux.cfg this contains the files to use PXELINUX
cult.img the cult ramdisk image
cult-3.0-classc-custom.initrd symbolic link to cult.img
pxelinux.0 PXELINUX boot loader
vesamenu.c32 menu for ISOLINUX and PXELINUX
vmlinuz the cult kernel
vmlinuz-2.6.20-15-generic symbolic link to vmlinuz

Boot loader

PXELINUX

PXELINUX can be used to boot the image and using vesamenu.c32 the needed entry should be something like this

label CODTECH Universal Linux Thinclient 3.0 (rdp verbose)
   MENU LABEL CODTECH Universal Linux Thinclient 3.0 (rdp verbose)
   kernel vmlinuz
   append boot=initrd vga=0x314 splash initrd=cult.img session=rdp rdp=wts

Use pxelinux.cfg/default from CDROM as the template for these files. Detailed information on configuration files can be found in PXELINUX

DEMO image

The CULT classic custom DEMO image timeouts the RDP session in 5 minutes, then this screen is presented indicating that this timeout has expired.

The session can be recovered at the same point that was left just pressing Enter or clicking the mouse.

XDM session has no timeout and can be used with this same DEMO image indefinitely.

To eliminate this timeout edit <INITRD>/conf/cult.conf and set

RDESKTOP_TIMEOUT=0

and rebuild the image.

Rebuilding the image

  1. In your Linux box mount the ISO usng a loop in any directry, for example /tmp/cdrom
  2. Extract the contents of /tmp/cdrom/cult/cult.img using gunzip and cpio
    gunzip -c < /tmp/cdrom/cult/cult.img | cpio -ivdum
  3. Edit conf/cult.conf and set RDESKTOP_TIMEOUT=0
  4. Save
  5. Rebuild the initramfs
  6. Rebuild the ISO image

Errors

If there's any problem starting the session, connecting the session to the server or something else an error screen is presenting indicating the cause of the error so it can be fixed.

In this screen you can take several actions:

  • pressing  Esc ,  Enter  or clicking the mouse will continue
  • pressing  H  will halt the machine
  • pressing  R  to reboot