Difference between revisions of "KNOPPIX Terminal Server"


From Knoppix Documentation Wiki
Jump to: navigation, search
(corrections and some formatting fixes)
(major renovation)
Line 2: Line 2:
  
 
*This page will be used to document and describe how to boot KNOPPIX off the network using Samba as opposed to NFS.
 
*This page will be used to document and describe how to boot KNOPPIX off the network using Samba as opposed to NFS.
**The page will pull from several resources to provide an official reference at the KNOPPIX site for all to use.
+
**This page needs to be catagorized.
**Just starting so page will be in progress for a bit and will need to be catagorized.
+
*The original author of this document, [[User:Rjent|Rjent]], moved his efforts to working on http://live.debian.net/ .
*You are welcome to contact me on model (I have a day job, so please bare with me see [[User:Rjent|Rjent]]).
+
*You are still welcome to contact him about the model however (please bare with him since he has a day job).
  
 
==Model==
 
==Model==
Line 11: Line 11:
 
The methodology for the hybrid environment uses a Common Internet File System (CIFS)
 
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
 
to boot up KNOPPIX. The base work for this model utilizes existing resources and information
from http://knoppix.manty.net . The setup information provided here
+
from http://knoppix.manty.net
assumes you have PXE booting via TFTP already setup on the boot
+
server. The rest is as follows:
+
* KNOPPIX:
+
Download KNOPPIX 4.0.2 (or newer) and burn to a CD.
+
  
Download the miniroot.gz and integrate for the pxe bootup.
+
== TFTP Server Setup ==
To do this, place the miniroot.gz in the /tftpboot/hybrid/pxeboot/ directory.
+
For this guide, we want our TFTP server to use /var/lib/tftpboot/ as the root directory.
Make a directory under /tftpboot/hybrid/pxeboot/
+
How you configure that depends on which tftp server you use (tftp-hpa, atftp, or other)
called knoppix and copy the /boot/isolinux/linux file from the
+
and how you run it (inetd, xinetd, init daemon, ...).
KNOPPIX CD to /tftpboot/hybrid/pxeboot/knoppix/
+
  
Copy the KNOPPIX folder from the KNOPPIX CD to a location on server of
+
tftp-hpa can be started from inetd with this line:
  /hybrid/knoppixshare
+
  tftp          dgram  udp    wait    root  /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot
  
Modify the pxe boot menu located at /tftpboot/hybrid/pxeboot/pxelinux.cfg
+
== Samba Share Setup ==
with the below addition:
+
Samba provides the CIFS services out of the box. All we have to do is configure a share.
  LABEL Knoppix CIFS
+
  KERNEL knoppix/linux
+
  APPEND secure nfsdir=//xxx.xxx.xxx.xxx/knoppix_share nodhcp lang=en ramdisk_size=100000 init=/etc/init apm=poweroff nomce vga=791 initrd=miniroot.gz quiet BOOT_IMAGE=knoppix
+
 
+
Note1: the above APPEND line must appear as a single line in your pxelinux.cfg/default file
+
 
+
Note2: xxx.xxx.xxx.xxx is the IP address of the server running the samba share.
+
 
+
* Samba
+
Samba provides the CIFS services, so we setup a share on server xxx.xxx.xxx.xxx.
+
 
An example smb.conf is listed below:
 
An example smb.conf is listed below:
 
  [global]
 
  [global]
  workgroup = HYBRIDGROUP
 
 
   netbios name = HYBRIDSERVER
 
   netbios name = HYBRIDSERVER
 
   security = share
 
   security = share
Line 46: Line 30:
 
  [knoppix_share]
 
  [knoppix_share]
 
   comment = Knoppix Boot Data
 
   comment = Knoppix Boot Data
   path = /hybrid/knoppix_share
+
   path = /shares/knoppix-term
 
   read only = Yes
 
   read only = Yes
 
   guest ok = Yes
 
   guest ok = Yes
Note: After changes to smb.conf you will need to restart samba services.
+
'''Note1:''' you need 'security = share' for (passwordless) guest access to work
  
* DHCP Services
+
'''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 ==
 +
'''Note:''' This guide will assume that your server machine has an IP of 192.168.12.253
 
Example entry for dhcpd.conf below
 
Example entry for dhcpd.conf below
  group {
+
  subnet 192.168.12.0 netmask 255.255.255.0 {
   filename "hybrid/pxeboot/pxelinux.0";
+
   range 192.168.12.251 192.168.12.252;
   host hybrid51 {
+
   option broadcast-address 192.168.12.255;
    hardware ethernet MA:CA:DD:RE:SS:ED; fixedaddress xxx.xxx.xxx.xxx;
+
   filename "/pxelinux.0";
   }
+
 
  }
 
  }
Note: After changes to dhcpd.conf restart or reload dhcp services.
+
'''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 ==
 +
Download a [http://www.knopper.net/knoppix-mirrors/index-en.html 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
 +
 
 +
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 ==
 +
Making sure that your client machines actually boot from the network is an important step.
 +
However, it is out of the scope of this document.
 +
Consider reading [http://www.kegel.com/linux/pxe.html Dan Kegel's page] about this.
  
At this point, you should be ready to test boot your KNOPPIX
+
== Testing ==
session.
+
At this point, you should be able to boot Knoppix over the network no your test machines connected to the 192.168.12.0 network. Go ahead, try it!
  
 
==References==
 
==References==
 
* [http://knoppix.manty.net/ The KNOPPIX® terminal server over SMB/CIFS page] - The place where all the starting work was derived.
 
* [http://knoppix.manty.net/ The KNOPPIX® terminal server over SMB/CIFS page] - The place where all the starting work was derived.
 +
* [http://live.debian.net/ Debian Live]
 +
* [http://www.mgr3.k12.mo.us/~rjn103s/HybridNotes-20060504-1.pdf Hybrid Booting Model]
 +
* [http://www.kegel.com/linux/pxe.html Remote Network Boot via PXE]

Revision as of 17:34, 30 March 2007

Preamble

  • This page will be used to document and describe how to boot KNOPPIX off the network using Samba as opposed to NFS.
    • This page needs to be catagorized.
  • 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

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

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

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

Note: This guide will assume that your server machine has an IP of 192.168.12.253 Example entry for dhcpd.conf below

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

Download 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

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

Making sure that your client machines actually boot from the network is an important step. However, it is out of the scope of this document. Consider reading Dan Kegel's page about this.

Testing

At this point, you should be able to boot Knoppix over the network no your test machines connected to the 192.168.12.0 network. Go ahead, try it!

References