diff options
authorH. Peter Anvin <hpa@zytor.com>2010-01-06 11:28:24 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-01-06 11:30:22 -0800
commitb5ff778263ba1d815e5c4088b16dec33190c2c55 (patch)
parent9c8b462f1fbcc0efd975bd1404c022fff56858d5 (diff)
core: Remove the built-in default
The built-in default is rarely if ever used anymore and highly confusing to users. Remove it entirely. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
4 files changed, 25 insertions, 22 deletions
diff --git a/NEWS b/NEWS
index 226a4d31..be2987d1 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,12 @@ to all derivatives.
Changes in 3.85:
* vesamenu.c32: unbreak the default "grey hole" background.
+ * We no longer have a built-in default of "linux auto".
+ Instead, if no DEFAULT or UI statement is found, or the
+ configuration file is missing entirely, we drop to the boot:
+ prompt with an error message (if NOESCAPE is set, we stop
+ with a "boot failed" message; this is also the case for
+ PXELINUX if the configuration file is not found.)
Changes in 3.84:
* SYSLINUX: make the DOS installer work for MS-DOS 7.x/8.x
diff --git a/core/configinit.inc b/core/configinit.inc
index cf6a814c..2795b2d1 100644
--- a/core/configinit.inc
+++ b/core/configinit.inc
@@ -37,11 +37,6 @@ reset_config:
- mov si,linuxauto_cmd ; Default command: "linux auto"
- mov di,default_cmd
- mov cx,linuxauto_len
- rep movsb
mov di,KbdMap ; Default keymap 1:1
xor al,al
inc ch ; CX <- 256
@@ -53,7 +48,3 @@ mkkeymap: stosb
mov [VKernelEnd],eax
- section .data
-linuxauto_cmd db 'linux auto',0
-linuxauto_len equ $-linuxauto_cmd
diff --git a/core/ui.inc b/core/ui.inc
index 1b40717a..22258fcc 100644
--- a/core/ui.inc
+++ b/core/ui.inc
@@ -292,12 +292,27 @@ show_network_info:
; Jump here to run the default command line
+ cmp word [DefaultLevel],0 ; No UI or DEFAULT?
+ jne .have_default
+ mov si,no_default_msg
+ call writestr
+ cmp word [NoEscape],0 ; NOESCAPE but no DEFAULT?
+ jne kaboom ; If so, we're stuck!
+ jmp enter_command
mov si,default_cmd
mov di,command_line
mov cx,(max_cmd_len+4) >> 2
rep movsd
jmp short load_kernel
+ section .data
+no_default_msg db 'No DEFAULT or UI configuration directive found!'
+ db CR, LF, 0
+ section .text
; Jump here when the command line is completed
diff --git a/doc/syslinux.txt b/doc/syslinux.txt
index f654bffd..76cae245 100644
--- a/doc/syslinux.txt
+++ b/doc/syslinux.txt
@@ -2,7 +2,7 @@
A suite of bootloaders for Linux
- Copyright 1994-2009 H. Peter Anvin and contributors
+ Copyright 1994-2010 H. Peter Anvin and contributors
This program is provided under the terms of the GNU General Public
License, version 2 or, at your option, any later version. There is no
@@ -90,10 +90,6 @@ For the DOS and Windows installers, the -m and -a options can be used
on hard drives to write a Master Boot Record (MBR), and to mark the
specific partition active.
-On boot time, by default, the kernel will be loaded from the image named
-LINUX on the boot floppy. This default can be changed, see the section
-on the Syslinux config file.
If the Shift or Alt keys are held down during boot, or the Caps or Scroll
locks are set, Syslinux will display a LILO-style "boot:" prompt. The
user can then type a kernel file name followed by any kernel parameters.
@@ -140,14 +136,9 @@ DEFAULT kernel options...
it will act just as if the entries after DEFAULT had been typed
in at the "boot:" prompt.
- If no configuration file is present, or no DEFAULT entry is
- present in the config file, the default is "linux auto".
- NOTE: Earlier versions of Syslinux used to automatically
- append the string "auto" to whatever the user specified using
- the DEFAULT command. As of version 1.54, this is no longer
- true, as it caused problems when using a shell as a substitute
- for "init." You may want to include this option manually.
+ If no configuration file is present, or no DEFAULT entry is
+ present in the config file, an error message is displayed and
+ the boot: prompt is shown.
UI module options...
Selects a specific user interface module (typically menu.c32