*Linux Diskless Client - Linux Net PC An easy way to create and maintain all needed files for diskless linux clients. August Hörandl # Copyright (C) 1996-98 August Hoerandl # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # If you modify and redistribute this program with your # changes you may add your own copyright IN ADDITION to this one, but it # MUST NOT restrict distribution any more than this one does. -------------------------------------------------------------------------- $Id: INSTALL,v 1.1 2001/11/19 22:59:33 hoerandl Exp $ -------------------------------------------------------------------------- I would appreciate (but do NOT REQUIRE) that any changes (bugs, new features or spelling errors) be sent to me for inspection, discussion and possible inclusion into the next version. This setup and the scripts arent very good. Maybe some ideas are wrong and wont work with your configuration. But they work for me and some others. -------------------------------------------------------------------------- This setup was tested with S.u.S.E. Linux for i386 Version 4.3 - 6.0 (see http://www.suse.de). It should work with other distributions and other cpus, but minor (?) corrections may be necessary - please mail any needed changes Starting with April 1999 a glibc based server is assummed - this may break things on older servers -------------------------------------------------------------------------- see README for a list of features -------------------------------------------------------------------------- Background - please read the Howtos; Many ideas are from the this documents: Diskless Linux Mini Howto by Robert Nemkin NFS HOWTO by Nicolai Langfeldt NFS-Root-Client Mini-Howto by Ofer Maor NFS-Root Mini-Howto by Andreas Kostyrka Linux NET-3-HOWTO, Linux Networking. Terry Dawson, VK2KTJ, terry@perf.no.itg.telstra.com.au Linux Remote-Boot mini-HOWTO Configuring Remote-Boot Workstations with Red-Hat Linux, DOS, Windows 3.1 and Windows 95 http://cuiwww.unige.ch/~mvuilleu/configsc1/config.html Etherboot http://www.slug.org.au/etherboot/ for a X Terminal (no local apps) see http://people.delphi.com/sjc/linux/index.html --------------------- Quick install: !! asumes same type of CPU on server and all clients !! copy archive to a nice place ( /tftpboot ) and untar (use option p to preserve permissions!) check scripts: may need some adjustment config seldom changes needed: clean-cache update-cache create-ramdisk check/create setup (see below): nfs server bootpd create other files with the provided scripts update-cache to copy/link files needed at boot time ( ~ 5 MB) if you get "cannot create link .. Cross-device link" change config: LINK="" check output or try a second run: nothing should be copied and there should be no errors shown create-ramdisk create ramdisk image for clients needs ramdisk support on server (or an empty floppy) clean-cache remove all files created by update-cache and create-ramdisk build kernel (or use supplied zImage) and copy to floppy cp zImage /dev/fd0 the kernel which comes with this package supports: ne1000, ne2000, 3com59x/3com90x try to boot client with floppy read below for other boot options ATTENTION: there is copy of the passwords in cache/etc and ramdisk/etc and ramdisk.gz. These are only used if the orignal cannt be copied from the server - but they maybe out of date ! NIS should be used >>> Password must be changed on server ! <<< ---------------------- Kernel config needed: Floppy, IDE, and other block devices <*> RAM disk support Filesystems: <*> Minix fs support <*> NFS filesystem support [*] Root file system on NFS [*] BOOTP support Networking options [*] TCP/IP networking Network device support add support for the used network card add support for other hardware (local cdrom, ...) Filecache patch see Linux Remote-Boot mini-HOWTO dont forget to change the boot device for nfs: (copyied from the NFS-Root Howto) If the workstation will be booted without kernel parameters, you need also to set the root device to 0:255. Do this by creating a dummy device file with mknod /dev/nfsroot b 0 255 After having created such a device file, you can set root device of the kernel image with rdev /dev/nfsroot. ---------------------- bootp Server: create /etc/bootptab see "Diskless Linux Mini Howto" read manpages: man 8 bootpd man 5 bootptab You can use the following ip adresses for a internal networks: see the NET-3-HOWTO: ----------------------------------------------------------- | Network | Netmask | Network Addresses | | Class | | | ----------------------------------------------------------- | A | 255.0.0.0 | 10.0.0.0 - 10.255.255.255 | | B | 255.255.0.0 | 172.16.0.0 - 172.31.255.255 | | C | 255.255.255.0 | 192.168.0.0 - 192.168.255.255 | ----------------------------------------------------------- The easiest way is to use a template for all clients and one entry with the ip adress for each client: sample /etc/bootptab with 4 workstations with similar config .s409:\ :ds=10.1.1.1:\ :dn=elina.htlw1.ac.at:\ :sm=255.255.255.0:\ :gw=10.4.1.1:\ :hn:vm=auto:\ :ht=ether:\ :rp=/opt/mnt:sa=10.1.1.1:\ :bf=zImage: pc409a:ha=00403396617b:ip=10.4.1.100:tc=.s409: pc409b:ha=004033966265:ip=10.4.1.101:tc=.s409: pc409c:ha=004033329ed0:ip=10.4.1.102:tc=.s409: pc409d:ha=00403396625b:ip=10.4.1.103:tc=.s409: add servers to /etc/inetd.conf tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd /tftpboot bootps dgram udp wait root /usr/sbin/bootpd bootpd -c /tftpboot -------------------- NFS Server needed: / (everything) readonly /home, /tmp, /var read & write no_root_squash is needed for root access sample /etc/exports / 10.4.0.0/255.255.0.0 (ro,map_identity,no_root_squash) /home 10.4.0.0/255.255.0.0 (rw,map_identity,no_root_squash) /tmp 10.4.0.0/255.255.0.0 (rw,map_identity,no_root_squash) /var 10.4.0.0/255.255.0.0 (rw,map_identity,no_root_squash) --------------------- oher services: time used to get all client clocks synchronized add this lines to /etc/inetd.conf time stream tcp nowait root internal time dgram udp wait root internal ---------------------- Filecache see Linux Remote-Boot mini-HOWTO not tested since 2.0.18 -- waiting for coda ;-) ----------------------- Files to change ramdisk/etc filecache.conf see Linux Remote-Boot mini-HOWTO inetd.conf servers to start on client issue pre-login message and identification file syslog.conf syslogd(8) configuration file default: print everything on tty10 (ALT-F10) boot/ fstab.full mounts at boot time just add an entry for additional mounts ---------------------- config X install needed X Server /usr/X11R6/bin/XF86* do X configuration (XF86Setup, xf86config) on client; be carefull - dont overwrite any existing config files ! copy or create links 1) we need a file X.hostname cd /usr/X11R6/bin/ ln -s X.hostname e.g. ln -s XF86_S3 X.firstpc This uses the following system X is /usr/X11R6/bin/X which is a link to /var/X11R6/bin/X which is linked during boot to /usr/X11R6/bin/X.hostname 2) we need a file XF86Config.hostname cd /usr/X11R6/lib/X11/ cp XF86Config XF86Config.hostname You can use one file for many clients with the same video hardware e.g. cp XF86Config XF86Config.vga ln -s XF86Config.vga XF86Config.firstpc ln -s XF86Config.vga XF86Config.anotherpc ---------------- adding a new pc add entry to /etc/bootptab /etc/exports /etc/hosts run create-ramdisk create new X config (if needed) ---------------- software update 1) keep local copies in /cache up to date run update-cache 2) just install software on server 3) new config file in /etc needed 3a) same config for server and clients: create a link in ramdisk/etc to /cache/etc (which is server:/etc) e.g. cd ramdisk/etc ln -s /cache/etc/mtools.conf . run create-ramdisk if ramdisk gets full: increment size/inode in create-ramdisk 3b) differnt config for server and clients: copy config to ramdisk/etc run create-ramdisk if ramdisk gets full: increment size/inode in create-ramdisk -------------- Additional Services at Startup use scripts in ramdisk/etc/rc.d add to start programms - name must start with number (0..9) - scripts are called in the same order as shown with ls -1 ramdisk/etc/rc.d/[0-9]* - scripts a called with one parameter: start or stop - a script ramdisk/etc/rc.d/rc.$HOSTNAME see ramdisk/etc/rc.d for examples -------------- boot options - how to boot the client dont forget to set boot device rdev /dev/nfsroot floppy disk just copy kernel to floppy client with msdos/mswindows on hardisk partition or via network (novell) run from dos prompt (or via menu in config.sys) c:\> loadlin zimage this may fail if himem.sys and emm386 is used - see loadlin documentation for help using bootprom on network card: get kernel via bootp (needs a bootprom that with bootp support): add bf=zImage to bootptab get kernel from netware server (untested !): use zImage as bootimage in bootconf.sys ----------------- support for local harddisk on client 1) swap partition create swap partition (fdisk and mkswap) swap space is always used if found 2) ext2 partion used for filecache 3) special files boot/nohd.hostname dont use harddisk for filecache boot/clear start filecache with option clear - all clients boot/clear.hostname start filecache with option clear - one client ------------------ Swap swap via nfs: patch needed: see http://www.linuxhq.com could use swap file in /tmp very slow - but better than crashing apps