Difference between revisions of "KNOPPIX Terminal Server"


From Knoppix Documentation Wiki
Jump to: navigation, search
(TFTP Server Setup)
(Configure Client Machines' PXE Booting)
Line 96: Line 96:
 
   APPEND secure nfsdir=//192.168.12.253/knoppix_share-5.1.1 nodhcp lang=en ramdisk_size=100000 init=/etc/init apm=poweroff nomce vga=791 initrd=miniroot-5.1.1.gz quiet 2 BOOT_IMAGE=knoppix
 
   APPEND secure nfsdir=//192.168.12.253/knoppix_share-5.1.1 nodhcp lang=en ramdisk_size=100000 init=/etc/init apm=poweroff nomce vga=791 initrd=miniroot-5.1.1.gz quiet 2 BOOT_IMAGE=knoppix
  
== Configure Client Machines' PXE Booting ==
+
== Configure Client Machines to boot from PXE ==
 
This is a crucial step. Unless your machines can actually boot from the network,
 
This is a crucial step. Unless your machines can actually boot from the network,
 
none of the above is going to be of any use!
 
none of the above is going to be of any use!

Revision as of 15:20, 21 April 2008

Preamble

  • This page describes how to boot KNOPPIX 5.1.1 (outdated) from the network using Samba (as opposed to NFS).
  • The original author of this document, Rjent, moved his efforts to working on http://live.debian.net/ .
  • You are still welcome to contact him about the model however (please bare with him since he has a busy day job).

Model

The methodology for the hybrid environment uses a Common Internet File System (CIFS) to boot up KNOPPIX. The base work for this model utilizes existing resources and information from http://knoppix.manty.net

TFTP Server Setup

We start by configuring a TFTP server. It will serve the bootloader (PXELINUX) files which our client machines will load from the network and run even before starting the Linux/KNOPPIX kernel.

For this guide, we want our TFTP server to use /var/lib/tftpboot/ as the root directory. How you configure that depends on which tftp server you use (tftp-hpa, atftp, or other) and how you run it (inetd, xinetd, init daemon, ...).

For example, tftp-hpa can be started from inetd with this line in /etc/inetd.conf:

tftp           dgram   udp     wait    root  /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot

Samba Share Setup

Next we need to setup a Samba share which will host the KNOPPIX CD filesystem. The network client machines will access this share as if they were accessing the files from a regular KNOPPIX Live CD.

Samba provides the CIFS services out of the box. All we have to do is configure a share. An example smb.conf is listed below:

[global]
 netbios name = HYBRIDSERVER
 security = share
 guest account = nobody
[knoppix_share-5.1.1]
 comment = Knoppix 5.1.1 Boot Data
 path = /shares/knoppix-term-5.1.1
 read only = Yes
 guest ok = Yes

Note1: you need 'security = share' for (passwordless) guest access to work

Note2: you need to make sure that there exists a Unix user 'guest' on the server (in /etc/passwd)

Note3: After changes to smb.conf you will need to restart samba services.

DHCP Server Setup

After that, we setup a DHCP server. It will provide required values that allow the client to configure its network interface, and to download a bootfile.

Note: This guide will assume that your server machine has an IP of 192.168.12.253

Example entry in the dhcpd.conf file:

subnet 192.168.12.0 netmask 255.255.255.0 {
 range 192.168.12.251 192.168.12.252;
 option broadcast-address 192.168.12.255;
 filename "/pxelinux.0";
}

Note2: Make sure to use the subnet, netmask, broadcast-address and the IP range of your test network.

Note2: After changes to dhcpd.conf restart or reload dhcp services.

Setting Up Knoppix Boot files

Now it's time to populate the Samba and TFTP server shares with relevant files.

Start by downloading a KNOPPIX 4.0.2 (or newer) iso

Temporarily mount it (or burn it on a CD)

mount -o loop /iso/KNOPPIX_V5.1.1CD-2007-01-04-EN.iso /mnt/iso

Setup a Knoppix terminal pxeboot subdirectory

mkdir /var/lib/tftpboot/knoppix

Download miniroot.gz from http://knoppix.manty.net and put it in the just created directory

wget http://knoppix.manty.net/files/511/miniroot.gz -O /var/lib/tftpboot/knoppix/miniroot-5.1.1.gz

Copy the kernel from the Knoppix CD to the pxeboot subdirectory

cp /mnt/iso/boot/isolinux/linux /var/lib/tftpboot/knoppix/kernel-5.1.1

Copy the KNOPPIX folder from the KNOPPIX CD to a shared directory on the server

rsync -a --delete /mnt/iso/KNOPPIX/ /shares/knoppix-term-5.1.1/KNOPPIX

Cleanup the temporarily mounted directory

umount /mnt/iso

Configure PXELINUX

PXELINUX is a boot loader which actually loads the Linux/KNOPPIX kernel on the client machines and tell them where to find the root filesystem. Thus we configure PXELINUX with relevant information.

Add the following lines to your /var/lib/tftpboot/pxelinux.cfg/default file:

 LABEL Knoppix 5.1.1 CIFS
 KERNEL knoppix/kernel-5.1.1
 APPEND secure nfsdir=//192.168.12.253/knoppix_share-5.1.1 nodhcp lang=en ramdisk_size=100000 init=/etc/init apm=poweroff nomce vga=791 initrd=miniroot-5.1.1.gz quiet BOOT_IMAGE=knoppix

Note: the above APPEND line must appear as a single line in your pxelinux.cfg/default file

If you would like to have a text-only client terminal, then you can make a copy of the above text in the /var/lib/tftpboot/pxelinux.cfg/default file and just add "2" to the knoppix options:

 LABEL Knoppix 5.1.1 CIFS
 KERNEL knoppix/kernel-5.1.1
 APPEND secure nfsdir=//192.168.12.253/knoppix_share-5.1.1 nodhcp lang=en ramdisk_size=100000 init=/etc/init apm=poweroff nomce vga=791 initrd=miniroot-5.1.1.gz quiet 2 BOOT_IMAGE=knoppix

Configure Client Machines to boot from PXE

This is a crucial step. Unless your machines can actually boot from the network, none of the above is going to be of any use! Unfortunately, each and every BIOS has its own way of being configured for PXE booting and it's not feasible to document any of that here. If you do not have this working, a good start would be to read Dan Kegel's Remote Network Boot via PXE page.

Testing

After all the hard work, it is time to enjoy the fruits of your labor.

  • Connect a PXE enabled test machine to the 192.168.12.0 network
  • power it on
  • wait...
  • enjoy!

Updating

Updating the Knoppix Terminal server to newer versions of Knoppix is doable. You only have to re-do the following steps:

  • repeat the #Samba Share Setup to create a share for storing the new Knoppix disk image
  • re-do the #Setting Up Knoppix Boot files step in new directories
    • this actually might not work since the miniroot hasn't been updated to the latest Knoppix version, yet
  • finally #Configure PXELINUX to add a new menu entry to point to the new boot files

References