PXE boot using tftp instead http

Post there if you plan to contribute to this SystemCd
cheche
Posts: 8
Joined: 30 May 2006, 17:21

PXE boot using tftp instead http

Postby cheche » 28 Jun 2017, 07:25

I have been using sysrcd booting from the network using PXE and nfsboot.
This is the /srv/tftp/pxelinux.cfg/default

Code: Select all

label systemrescue
  kernel sysrcd/isolinux/rescue32
  APPEND scandelay=1 initrd=sysrcd/isolinux/initram.igz nfsboot=192.168.1.5:/srv/tftp/sysrcd


It works just fine. But If I want to simplify to use only tftp instead:

Code: Select all

label systemrescue
  kernel sysrcd/isolinux/rescue32
  APPEND scandelay=1 initrd=sysrcd/isolinux/initram.igz netboot=tftp://192.168.1.5/sysrcd/sysrcd.dat


The loading of the sysrcd.dat goes on a loop and never ends. Searching on the forum I found a solution viewtopic.php?f=18&t=5279

I make a simple patch that would fix this problem (I have not tested yet):

Code: Select all

diff --git a/mainfiles/init b/mainfiles/init
index e55fd65..4c9f471 100755
--- a/mainfiles/init
+++ b/mainfiles/init
@@ -709,6 +709,7 @@ sysresccd_stage1_tftp()
     # download each file
     for curfile in ${FILENAMES}
     do
+        filedatasize=500000
         filename="${curfile}"
         filecksm=$(echo ${curfile} | sed -e 's!.dat!.md5!' -e 's!.srm!.md5!')
         urldatafile="${tftpurl}/${filename}"
@@ -720,7 +721,7 @@ sysresccd_stage1_tftp()
         ${cmd}
         res1=$?
 
-        cmd="/bin/busybox tftp -g -r ${urldatafile} -l ${BOOTPATH}/${filename} ${tftpip}"
+        cmd="/bin/busybox tftp -g -r ${urldatafile} -l ${BOOTPATH}/${filename} ${tftpip} -b ${filedatasize}"
         echo "${cmd}"
         ${cmd}
         res2=$?


Is there any problem to apply this patch?

Return to “Contributions”

Who is online

Users browsing this forum: No registered users and 1 guest