Difference between revisions of "KNOPPIX Terminal Server"


From Knoppix Documentation Wiki
Jump to: navigation, search
(spam bullshit removal)
Line 2: Line 2:
  
 
*This page describes how to boot KNOPPIX off the network using Samba (as opposed to NFS).
 
*This page describes how to boot KNOPPIX off the network using Samba (as opposed to NFS).
**This page needs to be categorized.
 
 
*The original author of this document, [[User:Rjent|Rjent]], moved his efforts to working on http://live.debian.net/ .
 
*The original author of this document, [[User:Rjent|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 day job).
 
*You are still welcome to contact him about the model however (please bare with him since he has a day job).
Line 112: Line 111:
 
* [http://dhcpcd.berlios.de/ dhcpcd]
 
* [http://dhcpcd.berlios.de/ dhcpcd]
 
* [http://us3.samba.org/samba/ samba]
 
* [http://us3.samba.org/samba/ samba]
 +
 +
[[Category:Guide]]
 +
[[Category:Booting]]
 +
[[Category:Networking]]

Revision as of 14:41, 18 April 2008

Preamble

  • This page describes how to boot KNOPPIX off 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 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:

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]
 comment = Knoppix Boot Data
 path = /shares/knoppix-term
 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

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

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

Copy the kernel from the Knoppix CD to the pxeboot subdirectory

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

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

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

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 CIFS
 KERNEL knoppix/linux
 APPEND secure nfsdir=//192.168.12.253/knoppix_share nodhcp lang=en ramdisk_size=100000 init=/etc/init apm=poweroff nomce vga=791 initrd=miniroot.gz quiet BOOT_IMAGE=knoppix

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

Configure Client Machines' PXE Booting

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!

References