core: Remove the built-in default
authorH. Peter Anvin <hpa@zytor.com>
Wed, 6 Jan 2010 19:28:24 +0000 (11:28 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 6 Jan 2010 19:30:22 +0000 (11:30 -0800)
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>
NEWS
core/configinit.inc
core/ui.inc
doc/syslinux.txt

diff --git a/NEWS b/NEWS
index 226a4d3..be2987d 100644 (file)
--- 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
index cf6a814..2795b2d 100644 (file)
@@ -37,11 +37,6 @@ reset_config:
 %endif
 %endif
 
-               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
 
                ret
-
-               section .data
-linuxauto_cmd  db 'linux auto',0
-linuxauto_len   equ $-linuxauto_cmd
index 1b40717..22258fc 100644 (file)
@@ -292,12 +292,27 @@ show_network_info:
 ; Jump here to run the default command line
 ;
 auto_boot:
+               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
+
+.have_default:
                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
 ;
index f654bff..76cae24 100644 (file)
@@ -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