NetBSD Problem Report #53128

From gson@gson.org  Sun Mar 25 10:12:05 2018
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 5BC3D7A10D
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 25 Mar 2018 10:12:05 +0000 (UTC)
Message-Id: <20180325101158.498E1989EDF@guava.gson.org>
Date: Sun, 25 Mar 2018 13:11:58 +0300 (EEST)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: Boot says "default boot twice, skipping..."
X-Send-Pr-Version: 3.95

>Number:         53128
>Category:       port-i386
>Synopsis:       Boot says "default boot twice, skipping..."
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 25 10:15:00 +0000 2018
>Closed-Date:    Thu Jun 09 09:17:24 +0000 2022
>Last-Modified:  Thu Jun 09 09:17:24 +0000 2022
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current, source date >= 2018.03.02.00.25.26
>Organization:

>Environment:

System: NetBSD
Architecture: i386
Machine: i386
>Description:

Since the commit of src/etc/etc.i386/boot.cfg 1.5, the i386 testbed
on babylon5.netbsd.org has logged the message "default boot twice, skipping..."
on every boot.

Here's one log file containing the message:

  http://releng.netbsd.org/b5reports/i386/2018/2018.03.02.06.41.18/test.log

>How-To-Repeat:

Inspect the test logs.

>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-i386-maintainer->sevan
Responsible-Changed-By: gson@NetBSD.org
Responsible-Changed-When: Sun, 25 Mar 2018 10:17:16 +0000
Responsible-Changed-Why:
Over to committer.


From: Sevan Janiyan <sevan@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/53128 (Boot says "default boot twice, skipping...")
Date: Mon, 26 Mar 2018 00:42:54 +0100

 On 25/03/2018 11:17, gson@NetBSD.org wrote:
 > Over to committer.

 Thanks, I'll take a look this week.


 Sevan

From: coypu@sdf.org
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-i386/53128: Boot says "default boot twice, skipping..."
Date: Wed, 24 Apr 2019 10:39:53 +0000

 I'm torn:
 - no args meaning "pick the default entry" is kinda useful
 - But I've always thought it to mean "pick any kernel", actually.

 I've used it whenever I dropped to the boot prompt, had to edit userconf
 stuff, then boot the kernel.

 We can pass an unused boot argument to get the same result, e.g.
 menu=Boot normally:rndseed /var/db/entropy-file;boot -3

 But that might be too magical.

 We can also eliminate the warning.

From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@netbsd.org
Cc: coypu@sdf.org
Subject: Re: port-i386/53128: Boot says "default boot twice, skipping..."
Date: Mon, 19 Aug 2019 12:14:06 +0300

 The reason we get the "default boot twice, skipping..." message is
 that the bootloader tries to invoke the default recursively (!).
 Specifically, it executes the following chain of mutually recursive
 function calls (note that each function appears twice):

   docommandchoice(0) ->
     docommand("boot") ->
       command_boot("") ->
         bootdefault() ->
           docommandchoice(0) ->
             docommand("boot") ->
               command_boot("") ->
                 bootdefault()

 At that point, bootdefault() notices it has been reentered, prints the
 message "default boot twice, skipping..." and returns, thereby
 averting infinite recursion.  We end up back in command_boot(), which
 then executes the loop

                 for (i = 0; i < NUMNAMES; i++) {
                         bootit(names[i][0], howto);
                         bootit(names[i][1], howto);
                 }

 and the actual boot happens there.

 Clearly having the boot default defined recursively in terms of itself
 doesn't make sense, but I'm not sure what the correct behavior is - is
 it specified anywhere?
 -- 
 Andreas Gustafsson, gson@gson.org

From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc: sevan@netbsd.org, Andreas Gustafsson <gson@gson.org>
Subject: Re: port-i386/53128: Boot says "default boot twice, skipping..."
Date: Sun, 21 Jun 2020 01:44:59 +0300

 On Mon, Aug 19, 2019 at 09:15:02 +0000, Andreas Gustafsson wrote:

 >  Clearly having the boot default defined recursively in terms of
 >  itself doesn't make sense, but I'm not sure what the correct
 >  behavior is - is it specified anywhere?

 This seems to have been introduced in:

 sys/arch/i386/stand/boot/boot2.c

 revision 1.59
 date: 2013-07-28 12:50:09 +0400;  author: he;  state: Exp;  lines: +29 -1;
 Two changes for the i386 boot loader related to the boot menu which
 can be defined in boot.cfg:

  * Add a "menu" command which re-displays the menu and initiates
    the timed countdown
  * Use any default command defined in boot.cfg as default args
    if the user runs "boot" with no arguments

 This is useful in circumstances where you e.g. need to interrupt
 the normal boot process to switch to serial console, and where
 simply "boot netbsd" is no longer sufficient (e.g. as with install
 media which needs the miniroot kernel module loaded).

 -uwe

Responsible-Changed-From-To: sevan->port-i386-maintainer
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Mon, 13 Jul 2020 20:12:56 +0000
Responsible-Changed-Why:
Reset to role account


From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@netbsd.org
Cc: wiz@NetBSD.org, rvp@SDF.ORG
Subject: Re: port-i386/53128: Boot says "default boot twice, skipping..."
Date: Thu, 9 Jun 2022 12:14:34 +0300

 This bug was recently fixed as a positive side effect of wiz@
 committing a patch from RVP to fix PR 56862:

   2022.06.08.21.43.45 wiz src/sys/arch/i386/stand/boot/boot2.c 1.79
   2022.06.08.21.43.45 wiz src/sys/arch/i386/stand/efiboot/boot.c 1.21

 -- 
 Andreas Gustafsson, gson@gson.org

State-Changed-From-To: open->closed
State-Changed-By: gson@NetBSD.org
State-Changed-When: Thu, 09 Jun 2022 09:17:24 +0000
State-Changed-Why:
Fixed, thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.