From owner-freebsd-current@FreeBSD.ORG Sun Apr 21 09:13:18 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx2.freebsd.org (mx2.FreeBSD.org [8.8.178.116]) by hub.freebsd.org (Postfix) with ESMTP id 232429B6 for ; Sun, 21 Apr 2013 09:13:18 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id 302135089; Sun, 21 Apr 2013 09:13:16 +0000 (UTC) Message-ID: <5173AD2D.6030008@FreeBSD.org> Date: Sun, 21 Apr 2013 13:11:09 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Steven Hartland Subject: Re: Booting an alternative kernel from loader prompt fails the first time only References: <625362A8116D4B43AF4912773F478CB9@multiplay.co.uk> <5172C699.8020708@smeets.im> <5172CF44.1050309@gwdg.de> <201304201741.r3KHfrJe001805@pozo.com> <517327C5.5050305@gmail.com> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Joshua Isom , freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Apr 2013 09:13:18 -0000 On 21.04.2013 04:36, Steven Hartland wrote: > This fails and trips the "Restart from the beginning" case which contains: > last_file_format = i = 0; > fp = NULL; > continue; > > So "i" gets set to 0 but the loop then increments it to 1 before running > the next iteration, so its impossible to use first handler in the retry > case; which I suspect is the kernel loader. > > This also explains why the second call to boot works as last_file_format > is now 0 due to the previous failure. > > If this is the issue the attached patch should fix it. I can't test it > ATM as my current box is at the office and doesn't have remote KVM, so > I need to be in front of it. > > If anyone can confirm this attached patch fixes the problem then I'll get > it committed, otherwise I'll test on Monday. Hi, yes, you are right. I just committed this with r249719. Thanks. -- WBR, Andrey V. Elsukov