summaryrefslogtreecommitdiffstats
path: root/server/ipxe
diff options
context:
space:
mode:
authorJannik Schönartz2019-02-27 20:19:29 +0100
committerJannik Schönartz2019-02-27 20:19:29 +0100
commitf5a2f0f4a87c845d88380883f8cebe4253b42c11 (patch)
tree1a815b57c2ec92608a1f3b4644f0368ef5a4351c /server/ipxe
parentfix major design issue (diff)
downloadbas-f5a2f0f4a87c845d88380883f8cebe4253b42c11.tar.gz
bas-f5a2f0f4a87c845d88380883f8cebe4253b42c11.tar.xz
bas-f5a2f0f4a87c845d88380883f8cebe4253b42c11.zip
[server/ipxe] Fix codemirror only loading on click bug & add the fixes for the tamas demo to the git
Diffstat (limited to 'server/ipxe')
-rw-r--r--server/ipxe/bash_scripts/emergency_shell.sh3
-rw-r--r--server/ipxe/bash_scripts/tpm.sh7
-rw-r--r--server/ipxe/console_efi.h2
-rw-r--r--server/ipxe/default.ipxe10
-rw-r--r--server/ipxe/embedded_efi.ipxe1
-rw-r--r--server/ipxe/general_efi.h6
-rw-r--r--server/ipxe/minilinux.ipxe2
-rw-r--r--server/ipxe/registration.ipxe8
8 files changed, 30 insertions, 9 deletions
diff --git a/server/ipxe/bash_scripts/emergency_shell.sh b/server/ipxe/bash_scripts/emergency_shell.sh
new file mode 100644
index 0000000..30ee09c
--- /dev/null
+++ b/server/ipxe/bash_scripts/emergency_shell.sh
@@ -0,0 +1,3 @@
+# TODO check wheather emergency_shell ist activatable
+. /lib/dracut-lib.sh
+emergency_shell \ No newline at end of file
diff --git a/server/ipxe/bash_scripts/tpm.sh b/server/ipxe/bash_scripts/tpm.sh
index 2b01287..faba4b3 100644
--- a/server/ipxe/bash_scripts/tpm.sh
+++ b/server/ipxe/bash_scripts/tpm.sh
@@ -1,7 +1,8 @@
#!/bin/bash
-
+set -x
+exec &> /log
# Check if the pc has tpm enabled
-if [ -d "/dev/tpm0" ]; then
+if [ -c "/dev/tpm0" ]; then
export TPM_INTERFACE_TYPE=dev
export TPM_DEVICE=/dev/tpm0
mkdir /run/tpm/
@@ -9,5 +10,5 @@ if [ -d "/dev/tpm0" ]; then
openssl rsa -in /run/tpm/$UUID-ssl-private.pem -out /run/tpm/$UUID-ssl-public.pem -outform PEM -pubout
create_tpm2_key -w /run/tpm/$UUID-ssl-private.pem -p 81000001 /run/tpm/$UUID-tpm-private.key
- curl -X PUT -F "tpm=@/run/tpm/$UUID-tpm-private.key" -F "openssl=@/run/tpm/$UUID-ssl-private.pem" --insecure https://$BAS/api/registration/$UUID/files
+ curl -X PUT -F "tpm=@/run/tpm/$UUID-tpm-private.key" -F "openssl=@/run/tpm/$UUID-ssl-public.pem" --insecure https://$BAS/api/registration/$UUID/files
fi
diff --git a/server/ipxe/console_efi.h b/server/ipxe/console_efi.h
index 0e7a65c..d351ee7 100644
--- a/server/ipxe/console_efi.h
+++ b/server/ipxe/console_efi.h
@@ -22,7 +22,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
*
*/
-#define CONSOLE_PCBIOS /* Default BIOS console */
+#undef CONSOLE_PCBIOS /* Default BIOS console */
#define CONSOLE_EFI /* Default EFI console */
//#undef CONSOLE_LINUX /* Default Linux console */
diff --git a/server/ipxe/default.ipxe b/server/ipxe/default.ipxe
index c16ef2e..d184713 100644
--- a/server/ipxe/default.ipxe
+++ b/server/ipxe/default.ipxe
@@ -3,6 +3,8 @@
:start
menu Default Script:
item bwlehrpool bwLehrpool
+item bwlehrpool_efi bwLehrpool_efi
+item bwlehrpool_tpm bwLehrpool_tpm
item reg Registration
item sh [Shell]
choose target && goto ${target}
@@ -10,12 +12,18 @@ choose target && goto ${target}
:bwlehrpool
chain --replace http://132.230.4.2/tftp/ipxelinux.0
+:bwlehrpool_efi
+chain --replace http://132.230.8.192/tftp/snponly.efi || shell
+
+:bwlehrpool_tpm
+kernel http://132.230.4.6/tbk/kernel-neu.sb.efi
+boot
+
:reg
set crosscert http://ca.ipxe.org/auto/
chain --replace https://bas.intra.uni-freiburg.de/api/ipxe/load/registration ||
goto start
-
:sh
shell ||
goto start
diff --git a/server/ipxe/embedded_efi.ipxe b/server/ipxe/embedded_efi.ipxe
index 70bfc17..bcb1770 100644
--- a/server/ipxe/embedded_efi.ipxe
+++ b/server/ipxe/embedded_efi.ipxe
@@ -5,6 +5,7 @@
################
ifopen
+dhcp
# Wallpaper
set img tftp://10.8.102.124/ipxeWallpaper3_scale.png || shell
diff --git a/server/ipxe/general_efi.h b/server/ipxe/general_efi.h
index 96ab724..1f60fa2 100644
--- a/server/ipxe/general_efi.h
+++ b/server/ipxe/general_efi.h
@@ -44,8 +44,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
* PXE support
*
*/
-//#undef PXE_STACK /* PXE stack in iPXE - you want this! */
-//#undef PXE_MENU /* PXE menu booting */
+#undef PXE_STACK /* PXE stack in iPXE - you want this! */
+#undef PXE_MENU /* PXE menu booting */
/*
* Download protocols
@@ -146,7 +146,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define POWEROFF_CMD /* Power off command */
//#define IMAGE_TRUST_CMD /* Image trust management commands */
//#define PCI_CMD /* PCI commands */
-//#define PARAM_CMD /* Form parameter commands */
+#define PARAM_CMD /* Form parameter commands */
//#define NEIGHBOUR_CMD /* Neighbour management commands */
//#define PING_CMD /* Ping command */
#define CONSOLE_CMD /* Console command */
diff --git a/server/ipxe/minilinux.ipxe b/server/ipxe/minilinux.ipxe
index ae70b4d..a482b72 100644
--- a/server/ipxe/minilinux.ipxe
+++ b/server/ipxe/minilinux.ipxe
@@ -2,5 +2,5 @@
kernel tftp://10.8.102.124/kernel/kernel
initrd tftp://10.8.102.124/initramfs-stage31-bss
-imgargs kernel ip=${net0/ip}:10.8.102.124:${net0/gateway}:${net0/netmask} BOOTIF=01-${net0/mac} bas=bas.intra.uni-freiburg.de
+imgargs kernel ip=${net0/ip}:10.8.102.124:${net0/gateway}:${net0/netmask} BOOTIF=01-${net0/mac} bas=bas.intra.uni-freiburg.de initrd=initramfs-stage31-bss
boot
diff --git a/server/ipxe/registration.ipxe b/server/ipxe/registration.ipxe
index 66e34e2..537cb58 100644
--- a/server/ipxe/registration.ipxe
+++ b/server/ipxe/registration.ipxe
@@ -10,11 +10,13 @@ set crosscert http://ca.ipxe.org/auto/
:start
menu Initializing client registration
item --key a automatic Automatic registration
+item --key k key Replace Secure Boot Keys
item --key m manual Manual registration
item --key l localboot Localboot
item --key r reboot Reboot
item --key p poweroff Power Off
item --key s sh [Shell]
+item --key u update Reload Menufile
choose --default automatic --timeout 15000 target && goto ${target} || goto automatic
:localboot
@@ -30,6 +32,9 @@ param ip ${net0/ip}
param purpose Pool PC
chain https://bas.intra.uni-freiburg.de/api/registration/add##params
+:key
+chain -ar http://132.230.4.6/tbk/ReplaceKeysWithOwnKeys.efi
+
:manual
params
param id 0
@@ -52,3 +57,6 @@ iseq ${password} sh || goto start
clear username
clear password
shell
+
+:update
+chain -ar registration.ipxe