From 57268bbe9cd38d4990cf539787ee93c7ac9ed4bc Mon Sep 17 00:00:00 2001 From: Nico Dietrich Date: Thu, 2 Feb 2006 21:07:17 +0000 Subject: und noch der eigentliche commit... git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@56 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/default_files/dhcpd.conf | 195 +++++++++++++++++++++++++++++++ installer/distro-specs/exclude-suse | 7 ++ installer/ld4-inst | 124 ++++++++++++++++++++ installer/tftpboot/ethersel.c32 | Bin 0 -> 5412 bytes installer/tftpboot/mboot.c32 | Bin 0 -> 44776 bytes installer/tftpboot/menu.c32 | Bin 0 -> 28164 bytes installer/tftpboot/pxelinux.0 | Bin 0 -> 13148 bytes installer/tftpboot/pxelinux.cfg/84E6045D | 67 +++++++++++ installer/tftpboot/pxelinux.cfg/default | 67 +++++++++++ 9 files changed, 460 insertions(+) create mode 100644 installer/default_files/dhcpd.conf create mode 100644 installer/distro-specs/exclude-suse create mode 100755 installer/ld4-inst create mode 100755 installer/tftpboot/ethersel.c32 create mode 100755 installer/tftpboot/mboot.c32 create mode 100755 installer/tftpboot/menu.c32 create mode 100644 installer/tftpboot/pxelinux.0 create mode 100644 installer/tftpboot/pxelinux.cfg/84E6045D create mode 100644 installer/tftpboot/pxelinux.cfg/default (limited to 'installer') diff --git a/installer/default_files/dhcpd.conf b/installer/default_files/dhcpd.conf new file mode 100644 index 00000000..210a9c8d --- /dev/null +++ b/installer/default_files/dhcpd.conf @@ -0,0 +1,195 @@ +################################################################### +##### /etc/dhcpd.conf ##### +##### ##### +##### Configuration file for ISC dhcpd ##### +##### ##### +##### LAST MODIFIED ON 2004/10/19 ##### +##### BY mj0 ##### +##### ##### +##### (c) Dirk von Suchodoletz , 2002 ##### +################################################################### + +################################################################### +##### ##### +##### !!! user defined vendor options !!! ##### +##### ##### +################################################################### + +option o128 code 128 = string; +option o129 code 129 = string; +option menudflts code 160 = string; +option motdline1 code 184 = string; +option menuline1 code 192 = string; +option menuline2 code 193 = string; +option menuline3 code 194 = string; +option bootlocal-script code 221 = string; +option language code 222 = string; +option start-x code 223 = string; +option start-snmp code 224 = string; +option start-sshd code 225 = string; +option start-xdmcp code 226 = string; +option start-cron code 227 = string; +option crontab-entries code 228 = string; +option start-rwhod code 229 = string; +option start-printdaemon code 230 = string; +option desktop-session code 231 = string; +option tex-enable code 232 = string; +option netbios-workgroup code 233 = string; +option vmware code 234 = string; +option hw-mouse code 252 = string; +option hw-graphic code 253 = string; +option hw-monitor code 254 = string; + +################################################################### +##### ##### +##### !!! vendor identifier dependend settings !!! ##### +##### ##### +################################################################### + +class "Etherboot" { + match if substring (option vendor-class-identifier, 0, 9) = "Etherboot"; + option motdline1 = "Welcome to Guru Labs classroom"; + option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff; +} + +################################################################### +##### ##### +##### !!! server specific options !!! ##### +##### ##### +################################################################### + +server-identifier @@@server@@@; + +################################################################### +##### ##### +##### !!! global options !!! ##### +##### ##### +################################################################### +# description for several options: +# A. x-server-defs "de PS/2 psaux 96 100 1280x1024 nv 16" +# - Sets several values for XFree86 V 4.0.X +# +# 1. keyboard de/us +# 2. mouse typ PS/2/MouseMan/MicroSoft/... +# 3. mouse device psaux/ttyS0X +# 4. horiz. freq. monitor 40 - 96 (depending on monitor) +# 5. vert. freq. monitor 56 -120 (depending on monitor) +# 6. max. resolution +# 7. graphic server module mga/i810/nv/ati/... (depends on hardware) +# 8. display color depth 8/16/24 +# +# you will need the x-display-manager because +# it is required by dhclient.conf. +# change "require" within this file +# +# option x-display-manager server01,server02,server03; +# option netbios-name-servers 13.30.19.254; +# option ntp-servers ntps1,ntps2,ntps3; +# +# type of graphical login/operation - indirect for +# chooser, query for login kde,gnome,... for direct +# graphical session (managed by startgui script) +# +# type of displaymanager to use (it should be installed +# correctly on the server: XDMCP must be enabled then!) + +option o128 E4:45:74:68:00:00; +#deny unknown-clients; +allow bootp; +#allow booting; +default-lease-time 160000; +max-lease-time 200000; +use-host-decl-names on; +option dhcp-max-message-size 1024; +ddns-update-style none; + +################################################################### +##### ##### +##### !!! net specific options !!! ##### +##### ##### +################################################################### + +subnet @@@netname@@@ @@@netmask@@@ { + option broadcast-address @@@broadcast@@@; + option routers @@@server@@@; +} + + +################################################################### +##### ##### +##### GLOBAL-GROUP: ##### +##### Group for global options ##### +##### ##### +################################################################### + +group { + + if substring(option vendor-class-identifier,0,3) = "PXE" { + allow booting; + filename "/tftpboot/pxelinux.0"; } + elsif substring(option vendor-class-identifier,0,3) = "DXS" { + allow booting; } + elsif substring(option vendor-class-identifier,0,4) = "MSFT" { + allow booting; } +# elsif substring(option vendor-class-identifier,0,3) = "FLA" { +# allow booting; +# option start-x "windowmaker"; +# option start-xdmcp "no"; +# option start-rwhod "no"; +# option start-cron "no"; +# option start-snmp "no"; } +# elsif substring(option vendor-class-identifier,0,9) = "Etherboot" { +# allow booting; +# filename "/nfsroot/dxs2/boot/bootimg"; } + else { ignore booting; } + +# option root-path "/nfsroot/dxs2"; + option domain-name-servers 132.230.200.200,132.230.200.201; + option domain-name "lp.ruf.uni-freiburg.de ruf.uni-freiburg.de uni-freiburg.de dxs.local"; + option ntp-servers 132.230.1.9; + option crontab-entries "59 21 * * * root shutdown -h now"; +# option lpr-servers 10.22.9.254; +# option nis-servers 10.16.10.11; +# option nis-domain "linuxpc"; +# option font-servers 10.16.10.61; + option start-x "direct"; + option start-xdmcp "kdm"; + option start-rwhod "yes"; + option start-cron "yes"; + option start-snmp "no"; + option netbios-workgroup "tux-net"; + option tex-enable "yes"; + option vmware "yes"; + option desktop-session "kde,gnome,windowsxp"; # VMWARE-IMAGE-ADMINISTER + option language "de_DE de-latin1-nodeadkeys"; +# option hw-mouse "ps/2 psaux"; + option hw-monitor "30-65kHz 58-76Hz 1280x1024"; +# option hw-graphic "nv 15"; + option bootlocal-script ""; + option o129 "vga=0x0317 apic"; + +################################################################### +##### ##### +##### GROUP 1: ##### +##### Lehrstuhl (lsfks), Beratung ##### +##### ##### +################################################################### + + group { + option crontab-entries ""; +# group specific options: + +# group ip management: +################################################################### +# Grafikstation + host example1 { + hardware ethernet 00:02:B3:8D:83:12; + fixed-address @@@example1@@@; + } + host example2 { + hardware ethernet 00:50:56:0D:83:12; + fixed-address @@@example2@@@; + } + + } +} diff --git a/installer/distro-specs/exclude-suse b/installer/distro-specs/exclude-suse new file mode 100644 index 00000000..940e556b --- /dev/null +++ b/installer/distro-specs/exclude-suse @@ -0,0 +1,7 @@ +exclude="+ /bin\n+ /boot\n+ /etc\n+ /home\n+ /lib\n\ + + /media\n+ /mnt\n+ /opt\n+ /root\n+ /sbin\n+ /tmp\n+ /usr\n\ + + /var\n\ + - *~\n- *.rpmsave\n- *.rpmnew\n- *.YaST2save\n- *.old\n- *.bak\n\ + - /boot/initrd*\n- /boot/grub\n- /tmp/*\n- /root/*\n- /home/*\n\ + - /var/lib/YaST2/you/mnt/*\n- .svn\n- /var/tmp/*\n\ + - /usr/share/vmware/*\n- *lost+found*\n- /mnt/*\n- /media/*\n- /*" diff --git a/installer/ld4-inst b/installer/ld4-inst new file mode 100755 index 00000000..c7a79f94 --- /dev/null +++ b/installer/ld4-inst @@ -0,0 +1,124 @@ +#! /bin/bash +# +# Description: Script for generating dxs filesystem by +# cloning from rsync source for Diskless X Stations (v4.0) +# +# Author(s): Dirk von Suchodoletz , 02-11-2005 +# Copyright: (c) 2003, 2005 - RZ Universitaet Freiburg +# + + +header() { + echo + echo "Welcome to the LD4 installation" + echo +} + +# check needed things for installation +precheck() { + # check if running as root + + # check for existing programs: + # rsync (server-side) -> which + # ssh, rsync (referenz-system-side) -> not possible in precheck + + # nfs-kernel-server, atftpd + # -> not needed for installation +} + + +# ask question variable_name default_value +ask() { + echo + echo "$1" + echo -n "* [ $3 ] " + read userinput + if [ -z $userinput ] ; then + local back=$3 + else + local back=$userinput + fi + echo "$2=\"$back\"" >> .config +} + + +configure() { + export LANG="c" + + if [ -f .config ] ; then + echo -n "Use values from last installation? [Y/n] " + read userinput + if [ "x$userinput" = "xn" ] ; then + cp .config.default .config + fi + else + cp .config.default .config + fi + . .config + + if ! [ -z $netmask -a -z $broadcast -a -z $netname -a -z $server ] ; then + ipcfg=( `ifconfig eth0 | grep "inet addr" | sed -e "s,[a-zA-Z]*:,,g"` ) + netmask=${ipcfg[3]} + broadcast=${ipcfg[2]} + # quickhack (more intelligent solution needed ...) + netname=`route -n | grep -m 1 eth0 | grep -v "UG" | awk '{ print $1 }'` + server=${ipcfg[1]} + fi + + + # missing: try to detect server architecture + + # missing: ask for client & server distro + + + # das grosse frage-antwort-spiel: + ask "Path for client system: " rootdir $rootdir + ask "Path for tftpboot: " tftpbootdir $tftpbootdir + ask "Which network do you want to use for DXS? (A.B.C.0) " netname $netname + ask "Which netmask should be used? (255.B.C.0): " netmask $netmask + ask "What is your servers IP for NFS, DHCP and TFTP? " server $server + # noetig?? + ask "Broadcast Address: " broadcast $broadcast + + # evtl. optional? + ask "Where automount home directories from? (A.B.C.D:/home-dir)" amt $server":/home" + + ask "Which debug level should be used? " debuglevel $debuglevel + + # wo ist das referenzsystem? + + # hier auch dns-server etc abfragen?? + + # nfs / nbd / squash-fs? +} + + +copy_system() { + . exclude-${client_distro} + + # sync / mksquashfs + +} + +# setting up server site configuration files etc. +setup_server () { + # rewrite and copy / cat default files (may be distro-dependant): + # dhcpd.conf, atftpd, exports + # make services start +} + + +create_initrd() { + +} + + +## ------ MAIN ------ ## + +header +precheck #(run as root, rsync etc.) +configure +copy_system +setup_server +create_initrd + diff --git a/installer/tftpboot/ethersel.c32 b/installer/tftpboot/ethersel.c32 new file mode 100755 index 00000000..97cf555b Binary files /dev/null and b/installer/tftpboot/ethersel.c32 differ diff --git a/installer/tftpboot/mboot.c32 b/installer/tftpboot/mboot.c32 new file mode 100755 index 00000000..ccdd3ef3 Binary files /dev/null and b/installer/tftpboot/mboot.c32 differ diff --git a/installer/tftpboot/menu.c32 b/installer/tftpboot/menu.c32 new file mode 100755 index 00000000..f670fdb1 Binary files /dev/null and b/installer/tftpboot/menu.c32 differ diff --git a/installer/tftpboot/pxelinux.0 b/installer/tftpboot/pxelinux.0 new file mode 100644 index 00000000..5b38bd50 Binary files /dev/null and b/installer/tftpboot/pxelinux.0 differ diff --git a/installer/tftpboot/pxelinux.cfg/84E6045D b/installer/tftpboot/pxelinux.cfg/84E6045D new file mode 100644 index 00000000..f318cf81 --- /dev/null +++ b/installer/tftpboot/pxelinux.cfg/84E6045D @@ -0,0 +1,67 @@ +# ~/pxelinux.cfg/default (main-menu) +# +# Description: Boot selection with the new Syslinux/PXElinux by Peter Anwin +# selection is done by cursor up and down keys +# Modification: Alexander Heinz +# Dirk von Suchodoletz , 23-09-2005 +# +DEFAULT @@@server@@@::@@@tftpbootdir@@@/menu.c32 + +PROMPT 0 +NOESCAPE 1 +TIMEOUT 600 +#IMPLICIT 1 +#ALLOWOPTIONS 1 +#ONERROR menu + +MENU MASTER PASSWD geheim + +MENU TITLE Linux Diskless Clients - Main Menu + + +##### +LABEL Bitte waehlen Sie mit den Pfeil-Tasten aus: + KERNEL @@@server@@@::@@@tftpbootdir@@@/menu.c32 + APPEND @@@server@@@::@@@tftpbootdir@@@/pxelinux.cfg/default +LABEL + KERNEL @@@server@@@::@@@tftpbootdir@@@/menu.c32 + APPEND @@@server@@@::@@@tftpbootdir@@@/pxelinux.cfg/default +##### + + +LABEL kursraum + MENU LABEL 1. ^Kursraumumgebung Linux SuSe 9.3 (VMWare 5.0) starten + MENU DEFAULT + KERNEL @@@server@@@::@@@tftpbootdir@@@/9.3 + APPEND nfsroot=@@@server@@@:/nfsroot/9.3 vga=0x317 splash=silent initrd=@@@server@@@::@@@tftpbootdir@@@/initrd-9.3 apic dhcp + ipappend 1 + +LABEL suse93 + MENU LABEL 2. Neue Kursraumumgebung ^SuSE 9.3 mit VMplayer starten + KERNEL @@@server@@@::@@@tftpbootdir@@@/9.3-new + APPEND vga=0x317 nfsroot=@@@server@@@:/nfsroot/9.3-new vga=0x317 splash=silent initrd=@@@server@@@::@@@tftpbootdir@@@/initrd-9.3-new apic dhcp + ipappend 1 + + +LABEL local + MENU LABEL 4. ^Lokal booten + MENU PASSWD lokal + localboot 0 + + +##### +LABEL + KERNEL @@@server@@@::@@@tftpbootdir@@@/menu.c32 + APPEND @@@server@@@::@@@tftpbootdir@@@/pxelinux.cfg/default +##### + + +LABEL halt + MENU LABEL c. ^Computer ausschalten + KERNEL @@@server@@@::@@@tftpbootdir@@@/atxoff.com + +LABEL help + MENU LABEL d. ^Hilfe + KERNEL @@@server@@@::@@@tftpbootdir@@@/menu.c32 + APPEND @@@server@@@::@@@tftpbootdir@@@/pxelinux.cfg/help + diff --git a/installer/tftpboot/pxelinux.cfg/default b/installer/tftpboot/pxelinux.cfg/default new file mode 100644 index 00000000..24e44e42 --- /dev/null +++ b/installer/tftpboot/pxelinux.cfg/default @@ -0,0 +1,67 @@ +# ~/pxelinux.cfg/default (main-menu) +# +# Description: Boot selection with the new Syslinux/PXElinux by Peter Anwin +# selection is done by cursor up and down keys +# Modification: Alexander Heinz +# Dirk von Suchodoletz , 23-09-2005 +# +DEFAULT @@@server@@@::@@@tftpbootdir@@@/menu.c32 + +PROMPT 0 +NOESCAPE 1 +TIMEOUT 600 +#IMPLICIT 1 +#ALLOWOPTIONS 1 +#ONERROR menu + +MENU MASTER PASSWD ganzgeheim + +MENU TITLE Linux Diskless Clients - Main Menu + + +##### +LABEL Bitte waehlen Sie mit den Pfeil-Tasten aus: + KERNEL @@@server@@@::@@@tftpbootdir@@@/menu.c32 + APPEND @@@server@@@::@@@tftpbootdir@@@/pxelinux.cfg/default +LABEL + KERNEL @@@server@@@::@@@tftpbootdir@@@/menu.c32 + APPEND @@@server@@@::@@@tftpbootdir@@@/pxelinux.cfg/default +##### + + +LABEL kursraum + MENU LABEL 1. ^Kursraumumgebung Linux SuSe 9.3 (VMWare 5.0) starten + MENU DEFAULT + KERNEL @@@server@@@::@@@tftpbootdir@@@/9.3 + APPEND nfsroot=@@@server@@@:/nfsroot/9.3 vga=0x317 splash=silent initrd=@@@server@@@::@@@tftpbootdir@@@/initrd-9.3 apic dhcp + ipappend 1 + +LABEL suse93 + MENU LABEL 2. Neue Kursraumumgebung ^SuSE 9.3 mit VMplayer starten + KERNEL @@@server@@@::@@@tftpbootdir@@@/9.3-new + APPEND vga=0x317 nfsroot=@@@server@@@:/nfsroot/9.3-new vga=0x317 splash=silent initrd=@@@server@@@::@@@tftpbootdir@@@/initrd-9.3-new apic dhcp + ipappend 1 + + +LABEL local + MENU LABEL 4. ^Lokal booten + MENU PASSWD lokal + localboot 0 + + +##### +LABEL + KERNEL @@@server@@@::@@@tftpbootdir@@@/menu.c32 + APPEND @@@server@@@::@@@tftpbootdir@@@/pxelinux.cfg/default +##### + + +LABEL halt + MENU LABEL c. ^Computer ausschalten + KERNEL @@@server@@@::@@@tftpbootdir@@@/atxoff.com + +LABEL help + MENU LABEL d. ^Hilfe + KERNEL @@@server@@@::@@@tftpbootdir@@@/menu.c32 + APPEND @@@server@@@::@@@tftpbootdir@@@/pxelinux.cfg/help + -- cgit v1.2.3-55-g7522