PktTimeout resw 1 ; Timeout for current packet
KernelExtPtr resw 1 ; During search, final null pointer
IPOptionLen resw 1 ; Length of IPOption
+LocalBootType resw 1 ; Local boot return code
TextAttrBX equ $
TextAttribute resb 1 ; Text attribute for message file
TextPage resb 1 ; Active display page
jmp short parse_config_2
pc_localboot: call getint ; "localboot" command
- and bx,bx
- jz parse_config_2
cmp word [VKernelCtr],byte 0 ; ("label" section only)
je parse_config_2
mov [VKernelBuf+vk_rname], byte 0 ; Null kernel name
+ mov [VKernelBuf+vk_rname+1], bx ; Return type
jmp short parse_config_2
pc_kernel: cmp word [VKernelCtr],byte 0 ; "kernel" command
cmp byte [VKernelBuf+vk_rname], 0
jne near get_kernel ; No, it's real, go get it
+ mov ax, [VKernelBuf+vk_rname+1]
jmp local_boot
;
; kernel_corrupt: Called if the kernel file does not seem healthy
.badness: jmp short .badness
;
-; Boot to the local disk by returning the appropriate PXE magic
+; Boot to the local disk by returning the appropriate PXE magic.
+; AX contains the appropriate return code.
;
local_boot:
lss sp,[cs:Stack] ; Restore stack pointer
pop ds ; Restore DS
+ mov [LocalBootType],ax
mov si,localboot_msg
call writestr
; Restore the environment we were called with
pop ds
popfd
popad
- xor ax,ax ; Unload PXE and local boot
+ mov ax,[cs:LocalBootType]
retf ; Return to PXE
;
label = mylabel
append = "myoptions"
- corresponding to the SYSLINUX:
+ ... whereas SYSLINUX uses the syntax:
label mylabel
kernel mykernel
append myoptions
- Notes: Labels are mangled as if they were DOS filenames, and must be
+ Notes: Labels are mangled as if they were filenames, and must be
unique after mangling. For example, two labels
"v2.1.30" and "v2.1.31" will not be distinguishable.
Append nothing. APPEND with a single hyphen as argument in a
LABEL section can be used to override a global APPEND.
- LOCALBOOT flag_val
- On PXELINUX, specifying "LOCALBOOT 1" instead of a "KERNEL"
+ LOCALBOOT type
+ On PXELINUX, specifying "LOCALBOOT 0" instead of a "KERNEL"
option means invoking this particular label will cause a local
disk boot instead of booting a kernel.
+ 0 means perform a normal boot. The type value 4 will perform
+ a local boot with the Universal Network Driver Interface
+ (UNDI) driver still resident in memory. The type value 5 will
+ perform a local boot with the entire PXE stack, including the
+ UNDI driver, still resident in memory. All other values are
+ undefined.
+
IMPLICIT flag_val
If flag_val is 0, do not load a kernel image unless it has been
explicitly named in a LABEL statement. The default is 1.