Page 1 of 1

PXE BOOT: Selective "ipappend" option for PXE Chain loading?

Posted: 23 Jul 2014, 19:53
by att
Hello,

To whom it may concern - I have sucessfully been able to use the PXE boot option of "Diskcryptor" to encrypt a harddisk, and I have been able to use the PXE bootmenu of a Porteus distribution to get this to run.

The whole thing is a bit tricky, you need a file called "pxechain.com" which is able to chain load PXE loaders (such as the PXE loader from Diskcryptor).
You can get that file from the syslinux package : /modules/pxechain.com.

And ofcourse you need the loader "loader.img" from Diskcryptor.

A sample PXE chainloading section looks like this:

Code: Select all

LABEL PXE_Diskcryptor
MENU LABEL PXE-Diskcryptor
KERNEL /pxechain.com
APPEND ::/loader.img
TEXT HELP
  DISKCRYPTOR-BOOT_PC_4
ENDTEXT
HOWEVER, and that's why I am posting this here, you need to take care that your /srv/pxe/boot/pxelinux.cfg file contains the right IPAPPEND option:

Code: Select all

PROMPT 1
TIMEOUT 90
UI /vesamenu.c32 ~
DEFAULT GUI
IPAPPEND 0                                                    ; -> IPAPPEND MUST BE 0!
MENU BACKGROUND /porteus.png
MENU TITLE Porteus PXE boot menu
If "Ipappend" is 1, the appended IPs prevent booting of the Diskcryptor loader.

SO, I actually need a "selective" ipappend option - I have several PXE boot menu entries which need "ipappend 1" , and I have several entries which need "ipappend 0".
Is there anything like that possible, and if so, how could I implement this feature?

Re: PXE BOOT: Selective "ipappend" option for PXE Chain load

Posted: 24 Jul 2014, 02:37
by att
I found out the solution myself.
The trick is to use "IPAPPEND 1" at the beginning of the file, and inside each section of where you do not need this IPAPPEND option, you simply place a "IPAPPEND 0", like this:

Code: Select all

PROMPT 1
TIMEOUT 90
UI /vesamenu.c32 ~
DEFAULT GUI
IPAPPEND 1
MENU BACKGROUND /porteus.png
MENU TITLE Porteus PXE boot menu

MENU WIDTH 30
MENU MARGIN 2
MENU ROWS 10
MENU HELPMSGROW 17
MENU TIMEOUTROW 28
MENU TABMSGROW 15
MENU CMDLINEROW 22
MENU HSHIFT 4
MENU VSHIFT 5

(..................rest of normal file here............) 

LABEL dos
IPAPPEND 0
MENU LABEL Run FreeDOS
KERNEL /memdisk
APPEND initrd=/balder10.imz

LABEL dos2
IPAPPEND 0
MENU LABEL Run FreeDOS modded
KERNEL /memdisk
APPEND initrd=/balder10.img

LABEL PXE_Diskcryptor
IPAPPEND 0
MENU LABEL PXE-Diskcryptor
KERNEL /pxechain.com
APPEND ::/loader.img
TEXT HELP
    DISKCRYPTOR-BOOT_PC_4
ENDTEXT
That works neatly.

Re: PXE BOOT: Selective "ipappend" option for PXE Chain load

Posted: 24 Jul 2014, 03:41
by att
Oh, shit, it's still much easier. Syslinux has the "PXE" chain boot option, all you need is to rename the PXE chain loader to "somefilename.0":

Code: Select all

LABEL PXE_Diskcryptor_v2
IPAPPEND 0
MENU LABEL PXE-Diskcryptor PXE test
PXE loader_img.0
TEXT HELP
    DISKCRYPTOR-BOOT_PC_4 PXE Test v2
ENDTEXT
Maybe even the "IPAPPEND" line is obsolete now. :%) :good: