Browse Source

Tidy up tftp, use lpxelinux for faster booting (#919)

Tidy up tftp, use lpxelinux for faster booting

Signed-off-by: Graham MacDonald <grahamamacdonald@gmail.com>
Graham MacDonald 3 years ago
parent
commit
12e0a4dd65

+ 3 - 2
.gitignore

@@ -67,7 +67,8 @@ tools/mpfr-3.1.2.tar.bz2
 tools/share
 /tmp
 
-cfg/pxe/tftpboot
+cfg/pxe/tftpboot/harvey.32bit
+cfg/pxe/tftpboot/pxelinux.cfg
 usr/harvey/tmp
 
 build_out
@@ -81,4 +82,4 @@ util/harvey.raw
 
 **/*.h.gch
 
-.vscode
+.vscode

+ 28 - 0
cfg/pxe/readme.txt

@@ -0,0 +1,28 @@
+This folder is set up to allow netbooting using pxeserver from u-root.
+
+Pxeserver hosts the kernel using http, and the pxelinux files using tftp.
+
+Assumptions:
+- The following ports are open on your firewall: 67, 68, 69 (tftp), 80 (http server), 5640 (ufs)
+- You've successfully built harvey.
+
+---------------------
+Create the file $HARVEY/cfg/pxe/tftpboot/pxelinux.cfg/default
+The file should contain (change the IP address to that of the machine running pxeserver and ufs):
+
+DEFAULT harvey
+LABEL harvey
+  KERNEL mboot.c32
+  APPEND http://192.168.0.19/harvey.32bit service=cpu nobootprompt=tcp maxcores=1024 fs=192.168.0.19 auth=192.168.0.19 nvram=/boot/nvram nvrlen=512 nvroff=0 acpiirq=1
+
+---------------------
+
+Fetch and build pxeserver:
+  go get github.com/u-root/u-root
+  go install github.com/u-root/u-root/cmds/exp/pxeserver
+
+Run pxeserver to host pxelinux and harvey (make sure you change the interface to match the one on your server):
+  sudo pxeserver -tftp-dir $HARVEY/cfg/pxe/tftpboot/ -bootfilename lpxelinux.0 -interface enp0s31f6 --http-dir $HARVEY/cfg/pxe/tftpboot
+
+Run ufs to host the harvey files over 9p:
+  $HARVEY/util/ufs -root $HARVEY

BIN
cfg/pxe/tftpboot/ldlinux.bin


BIN
cfg/pxe/tftpboot/ldlinux.bss


BIN
cfg/pxe/tftpboot/ldlinux.c32


BIN
cfg/pxe/tftpboot/ldlinux.sys


BIN
cfg/pxe/tftpboot/libcom32.c32


BIN
cfg/pxe/tftpboot/lpxelinux.0


BIN
cfg/pxe/tftpboot/mboot.c32


BIN
cfg/pxe/tftpboot/pxelinux.0


+ 0 - 6
cfg/pxe/tftpboot/pxelinux.cfg/01-00-00-00-00-00-01

@@ -1,6 +0,0 @@
-label 9k8cpu.32bit 
-	kernel mboot.c32
-	append 9k8cpu.32bit
-
-default 9k8cpu.32bit
-      

+ 0 - 6
cfg/pxe/tftpboot/pxelinux.cfg/01-00-03-2d-19-6d-88

@@ -1,6 +0,0 @@
-label 9k8cpu.32bit 
-	kernel mboot.c32
-	append 9k8cpu.32bit
-
-default 9k8cpu.32bit
-      

+ 0 - 6
cfg/pxe/tftpboot/pxelinux.cfg/01-00-0c-29-cf-de-0e

@@ -1,6 +0,0 @@
-label akaros 
-	kernel mboot.c32
-	append akaros
-
-default akaros
-      

+ 0 - 6
cfg/pxe/tftpboot/pxelinux.cfg/01-00-13-20-fe-52-8c

@@ -1,6 +0,0 @@
-label 9k8cpu.32bit 
-	kernel mboot.c32
-	append 9k8cpu.32bit
-
-default 9k8cpu.32bit
-      

+ 0 - 6
cfg/pxe/tftpboot/pxelinux.cfg/01-00-14-bf-fe-24-70

@@ -1,6 +0,0 @@
-label 9k8cpu.32bit 
-	kernel mboot.c32
-	append 9k8cpu.32bit
-
-default 9k8cpu.32bit
-      

+ 0 - 6
cfg/pxe/tftpboot/pxelinux.cfg/01-c8-b3-73-1f-44-55

@@ -1,6 +0,0 @@
-label 9k8cpu.32bit 
-	kernel mboot.c32
-	append 9k8cpu.32bit
-
-default 9k8cpu.32bit
-