summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorSimon Rettberg2013-05-14 18:54:48 +0200
committerSimon Rettberg2013-05-14 18:54:48 +0200
commit362fbbb7c888e125b0270eda89878859eac0e3f4 (patch)
tree67eb9d52db7d7aa9ce306ccb4f464cd7c275b378 /data
parentpxelinux.0 (diff)
parentchange ipxe source (diff)
downloadtm-scripts-362fbbb7c888e125b0270eda89878859eac0e3f4.tar.gz
tm-scripts-362fbbb7c888e125b0270eda89878859eac0e3f4.tar.xz
tm-scripts-362fbbb7c888e125b0270eda89878859eac0e3f4.zip
Merge branch 'master' of dnbd3:openslx-ng/tm-scripts
Diffstat (limited to 'data')
-rwxr-xr-xdata/install_server.sh41
1 files changed, 38 insertions, 3 deletions
diff --git a/data/install_server.sh b/data/install_server.sh
index ca67a6ed..be1fc91c 100755
--- a/data/install_server.sh
+++ b/data/install_server.sh
@@ -1,6 +1,12 @@
#!/bin/sh
-TOOLS="git squashfs-tools rsync lighttpd tftpd"
+if [ $# -lt 1 ]; then
+ echo "Usage: $0 <this server's ip>"
+ exit 1
+fi
+SERVER_IP="$1"
+
+TOOLS="git squashfs-tools rsync lighttpd tftpd gcc binutils make nasm"
for tool in $TOOLS; do
echo " ###### Installiere $tool ##########"
@@ -113,7 +119,6 @@ if [ "$ERR" -gt 0 ]; then
exit 1
fi
-
echo " ##### Klone das mltk repository ########"
mkdir -p /opt/openslx
@@ -121,8 +126,38 @@ cd /opt/openslx
git clone git://git.openslx.org/openslx-ng/tm-scripts
+echo " ##### Setup iPXE #######"
+
+mkdir -p /opt/ipxe
+cd /opt/ipxe
+git clone git://git.ipxe.org/ipxe.git
+
+cd ipxe
+
+# iPXE-Konfiguration einschreiben
+cat > pxelinux.ipxe << HEREEND
+#!ipxe
+set use-cached 1
+dhcp net0
+set net0.dhcp/next-server $SERVER_IP
+set net0.dhcp/filename ipxelinux.0
+imgload pxelinux.0
+boot pxelinux.0
+HEREEND
+
+cd src
+make bin/undionly.kkkpxe EMBED=../ipxelinux.ipxe,/opt/openslx/tm-scripts/data/pxelinux.0
+
+ERR=$?
+if [ "$ERR" -gt 0 ]; then
+ echo "Fehler beim kompilieren von ipxelinux.0 - Abbruch!"
+ exit 1
+fi
+
+cp "ipxelinux.0" "/srv/openslx/tftp/"
+
echo "....Fertig"
-echo "mltk liegt nun im Verzeichnis $(pwd)/tm-scripts"
+echo "mltk liegt nun im Verzeichnis /opt/openslx/tm-scripts"
echo "Extrahieren und Erstellen der Basissystemdaten:"
echo "./mltk remote stage31 -b"
echo "./mltk remote stage32 -b"