summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhpa <hpa>2001-03-09 08:00:56 +0000
committerhpa <hpa>2001-03-09 08:00:56 +0000
commitceb464f1d142c7da45c4d6a3be3aade980d7d154 (patch)
tree62ac32b53f693c30a6d5755f717287ac667283e9
parent4a5bcf0c5cd72e7d6f9bd2ffa1fb41677baddc3f (diff)
downloadsyslinux-ceb464f1d142c7da45c4d6a3be3aade980d7d154.tar.gz
Allow the PXELINUX "localboot" option to specifying the boot type.
-rw-r--r--pxelinux.asm11
-rw-r--r--syslinux.doc15
2 files changed, 18 insertions, 8 deletions
diff --git a/pxelinux.asm b/pxelinux.asm
index 4deae09d..72dbd607 100644
--- a/pxelinux.asm
+++ b/pxelinux.asm
@@ -358,6 +358,7 @@ ConfigFile resw 1 ; Socket for config file
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
@@ -913,11 +914,10 @@ pc_ipappend: call getint ; "ipappend" command
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
@@ -1377,6 +1377,7 @@ vk_found: popa
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
@@ -2102,11 +2103,13 @@ is_bss_sector:
.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
@@ -2116,7 +2119,7 @@ local_boot:
pop ds
popfd
popad
- xor ax,ax ; Unload PXE and local boot
+ mov ax,[cs:LocalBootType]
retf ; Return to PXE
;
diff --git a/syslinux.doc b/syslinux.doc
index 31572bf5..c04198ff 100644
--- a/syslinux.doc
+++ b/syslinux.doc
@@ -138,12 +138,12 @@ LABEL label
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.
@@ -154,11 +154,18 @@ LABEL label
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.