From owner-freebsd-current@freebsd.org Wed Oct 24 14:09:24 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00A07FEA4E8 for ; Wed, 24 Oct 2018 14:09:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8978B92E5A for ; Wed, 24 Oct 2018 14:09:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe33.google.com with SMTP id l6so3217856vsj.13 for ; Wed, 24 Oct 2018 07:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PdyTM1Px/CNs5hVfniX6WnaUXA6bblEmimeK5ZmIHZ4=; b=XAM6SKMH3yvjwhe/gBsP8PSbYJKQ01J1dhhDr+5wRLy2eQIAEpSpKyKGGHuSV4p6lW M6PIPHWahf62MN0DemPH9tD3XwEoGzBlGGy95SBA0NFlpqKD9EbSI63gv4ZV8uC7WHkL EoSnXX683s+NLkUHhi0AP+563Tdjs5Hbxzgl4rvJxEidLy+c8JXrHVDheNOG2+ULJ/6x /a6hbGuQbG5m6rpT0ozQDo6CiIgxXyE/oA0dTShH3c75u1w0yewcEKGG0ExpKm+W2jv+ L+Rs63izX+dLokYqdmQ5IoYrs6lgCifpozFFhX6gk4QtgBgWFDlbe/H0KDIuiQ1DP0A4 iOuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PdyTM1Px/CNs5hVfniX6WnaUXA6bblEmimeK5ZmIHZ4=; b=Maqd4iLZ/uy7js1Q73rfxSXRfSU+ZzDzQ33PY+n3jGH4QOEBCUPGv9BDYetULOMdWU HEst4zY6czswoCZeyqJTVeLEUjexEYipFuc40GxSLaM5fOABBA/mIPCtjH+vtnLHeW2b bBXQruH8MfMIb3Yaxie1BIooaLWhz+H/4fehNoakReIoZov1mhZW8xKr5dJha7L6MC3W +lbkLNAH4LbWuANIh5+oVQpee9Drl6MxNCj39+gS6jOMHHHzFVS53m3ykptC+1HOoNtM DMh+/NrRLgpXsi/Qmv1InVUcZ0tiWDIe1ApfqVOw/DFyXvdrrlqnRSMw/2t8mSlsU1bK c+cA== X-Gm-Message-State: AGRZ1gJ2NY5BymXhp21xbYz1G1FMn1V1fn1ORvo13PlB+ALArdYwQEnc T14IvQsCDH10pc70g38bJPD9Jj7BTmczkRI8Pf9gcubNiN0= X-Google-Smtp-Source: AJdET5dosEu/nQduRLSRuKg2WfOBglLlPmIeE6FqnGHpFdUhUINTZ8+qiL4kIhh596IRsVPphUSCKZC2kKVIxn/Y6b0= X-Received: by 2002:a67:4988:: with SMTP id d8mr1190259vsg.41.1540390162593; Wed, 24 Oct 2018 07:09:22 -0700 (PDT) MIME-Version: 1.0 References: <282E6F72-6573-4F0E-81AB-25110855EBB7@me.com> <2950121D-C985-4F2E-A512-FB73CFDF48BC@me.com> <4457A5DC-A577-4782-B1E8-306236908D5D@me.com> In-Reply-To: From: Warner Losh Date: Wed, 24 Oct 2018 08:09:11 -0600 Message-ID: Subject: Re: UEFI boot hangs after loader To: hn@yewbarrow.net Cc: Kyle Evans , Toomas Soome , FreeBSD Current Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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: Wed, 24 Oct 2018 14:09:24 -0000 On Wed, Oct 24, 2018 at 7:05 AM Harry Newton wrote: > Booted with the installer image makes efibootmgr to work as you said: > > gryphon# efibootmgr -v > BootCurrent: 0002 > Timeout : 2 seconds > BootOrder : 0001, 0002 > Boot0001* UEFI OS > > HD(1,GPT,b19ccd5d-7c6a-11e7-ae3e-28b2bde107e4,0x28,0x640)/File(\EFI\BOOT\= BOOTX64.EFI) > ada0p1:/EFI/BOOT/BOOTX64.EFI (null) > > However it (efibootmgr) hangs and doesn't return to the shell, though it = is > interruptible with ^C. > > The partition listed against Boot0001 is my efi partition. > Can you do something like: sudo efivar -N --hex `sudo efivar | grep Boot0002` so I can have an example of a naughty boot variable? That's almost certainly causing the heart-burn. Warner > /H > > On 23 October 2018 at 22:51, Kyle Evans wrote: > > > Hi, > > > > I suspect 4th vs. lua has no impact here, given the output shown -- > > can you throw one of the installer images [0] on some removable media > > and give that a shot for booting? If that works, we can explore UEFI > > variables from there. > > > > efibootmgr will only work on a successful UEFI boot, unfortunately- if > > we didn't make uefi loader -> kernel transition, then we don't have > > access to runtime services. > > > > Thanks, > > > > Kyle Evans > > > > [0] > https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/12.0/ > > > > On Tue, Oct 23, 2018 at 4:23 PM Harry Newton wrote: > > > > > > I set LOADER_DEFAULT_INTERP=3D4th and went in /usr/src/stand and re-m= ade > > the > > > binaries in /boot but this doesn't solve the problem. It did copy > > > /boot/loader_4th.efi to /boot/loader.efi which is (according to uefi(= 8) > > > which is what is called from /boot/boot1.efi and which contains the > > strings > > > I see on the console before the hang. But it must then call / read > > > something else and I don't think it can find it. Not sure why it > doesn't > > > produce an error message. I *think* it may be something to do with E= FI > > > variables, but as efibootmgr doesn't work I can't explore this, despi= te > > > efirt being in the kernel. > > > > > > Suggestions received welcomed, and new suggestions / leads to follow > also > > > very much welcomed. > > > > > > /H > > > > > > > > > On 23 October 2018 at 21:33, Harry Newton wrote: > > > > > > > Right ... I've the binaries in /boot, freshly made. This might be = a > > silly > > > > question ... do I not need to copy them (or dd the boot1.efifat > image) > > to > > > > the EFI partition ? > > > > > > > > /H > > > > > > > > On 23 October 2018 at 21:30, Toomas Soome wrote: > > > > > > > >> you should have the binaries in boot - just ln (or copy) one to > > loader.efi > > > >> > > > >> rgds, > > > >> toomas > > > >> > > > >> > > > >> On 23 Oct 2018, at 23:22, Harry Newton wrote: > > > >> > > > >> Yes ... so as everything is built, can I just alter > > LOADER_DEFAULT_INTERP > > > >> in /etc/make.conf and then reinstall just the loader and boot part= s > > onto > > > >> the UEFI partition ? If so, how ? > > > >> > > > >> > > > >> On 23 October 2018 at 21:17, Toomas Soome wrote: > > > >> > > > >>> ok, in that case I=E2=80=99d suggest to test out if forth based o= ne is > still > > > >>> working - at least you can get the bootable system. And then ther= e > > is a > > > >>> chance to debug the lua version too (note it should be possible t= o > > chain > > > >>> /boot/loader_lua.efi). > > > >>> > > > >>> rgds, > > > >>> toomas > > > >>> > > > >>> > On 23 Oct 2018, at 23:08, Harry Newton wrote= : > > > >>> > > > > >>> > So it's got FORTH in it, but my loader is lua based, and also > > doesn't > > > >>> > appear to read loader.rc. > > > >>> > > > > >>> > /H > > > >>> > > > > >>> > On 23 October 2018 at 21:03, Toomas Soome wrote= : > > > >>> > > > > >>> >> hm. in that case, whats the content of /boot/loader.rc ? > > > >>> >> > > > >>> >> rgds, > > > >>> >> toomas > > > >>> >> > > > >>> >> > > > >>> >> On 23 Oct 2018, at 23:01, Harry Newton > wrote: > > > >>> >> > > > >>> >> If boot menu is the screen where you get the options for vario= us > > > >>> kernels > > > >>> >> and the picture of the daemon head, no. It stops at the point > in > > my > > > >>> email > > > >>> >> =E2=80=94 though not as I said just before the kernel is loade= d but in > > point > > > >>> of > > > >>> >> fact before the menu. > > > >>> >> > > > >>> >> I've also rebuilt the kernel and still can't use efibootmgr > which > > is > > > >>> >> puzzling me. > > > >>> >> > > > >>> >> /H > > > >>> >> > > > >>> >> > > > >>> >> On 23 October 2018 at 20:56, Toomas Soome > wrote: > > > >>> >> > > > >>> >>> Do you get boot menu? if so, press esc to get to ok prompt, > then > > type > > > >>> >>> start - if its bootfort based loader, it will load the kernel > and > > > >>> modules. > > > >>> >>> lsmod will then list the loaded files. > > > >>> >>> > > > >>> >>> If the loader prompt is still usable, then next command would > be: > > > >>> boot > > > >>> >>> > > > >>> >>> rgds, > > > >>> >>> toomas > > > >>> >>> > > > >>> >>>> On 23 Oct 2018, at 20:45, Harry Newton > > wrote: > > > >>> >>>> > > > >>> >>>> Just upgraded my Asus UX303L (amd64) from 11-STABLE to > > 12.0-BETA1 > > > >>> >>> r339529 > > > >>> >>>> by source. Have a problem with booting which hangs after: > > > >>> >>>> > > > >>> >>>>>> FreeBSD EFI boot block > > > >>> >>>> Loader path: /boot/loader.efi > > > >>> >>>> > > > >>> >>>> Initializing modules: ZFS UFS > > > >>> >>>> Probing 5 block devices ... done > > > >>> >>>> ZFS found the following pools: zroot > > > >>> >>>> UFS found no partitions > > > >>> >>>> Consoles: EFI console > > > >>> >>>> FreeBSD/amd64 EFI loader, Revision 1.1 > > > >>> >>>> > > > >>> >>>> Command line arguments: loader.efi > > > >>> >>>> EFI version 2.31 > > > >>> >>>> EFI Firmware: American Megatrends (rev 4.654) > > > >>> >>>> Console: efi(0) > > > >>> >>>> Load Path: HD(4, GPT [ ... ] > > > >>> >>>> Load Device: Pci Root [ ... ] > > > >>> >>>> Boot Current: 0001 > > > >>> >>>> Boot Order: 0001 [x] > > > >>> >>>> Boot Info Path: HS(1, GPT, [ ... ] /\EFI\BOOT\BOOTX64.EF= I > > > >>> >>>> - > > > >>> >>>> > > > >>> >>>> So it gets into loader.efi which runs but stops I think just > > before > > > >>> >>> loading > > > >>> >>>> the kernel. Partitions: > > > >>> >>>> > > > >>> >>>> =3D> 40 250069600 ada0 GPT (119G) > > > >>> >>>> 40 1600 1 efi (800K) > > > >>> >>>> 1640 1024 2 freebsd-boot (512K) > > > >>> >>>> 2664 1432 - free - (716K) > > > >>> >>>> 4096 4194304 3 freebsd-swap (2.0G) > > > >>> >>>> 4198400 245870592 4 freebsd-zfs (117G) > > > >>> >>>> 250068992 648 - free - (324K) > > > >>> >>>> > > > >>> >>>> and the EFI partition is FAT 12. > > > >>> >>>> > > > >>> >>>> I can't provide (at the moment) any output from efibootmgr: > > > >>> >>>> > > > >>> >>>> root@gryphon:~ # efibootmgr -v > > > >>> >>>> efibootmgr: efi variables not supported on this system. root= ? > > > >>> kldload > > > >>> >>> efirt? > > > >>> >>>> root@gryphon:~ # kldload efirt > > > >>> >>>> kldload: can't load efirt: module already loaded or in kerne= l > > > >>> >>>> > > > >>> >>>> which I don't understand. > > > >>> >>>> > > > >>> >>>> I'm going to rebuild the kernel (currently GENERIC) and see = if > > that > > > >>> >>> allows > > > >>> >>>> me to load efirt / use efibootmgr. > > > >>> >>>> > > > >>> >>>> In the meantime, I should be very grateful for any advice. > > > >>> >>>> > > > >>> >>>> ( Currently booting using a 11-RELEASE memstick image and > > dropping > > > >>> into > > > >>> >>> its > > > >>> >>>> loader to get to the installed 12-STABLE ). > > > >>> >>>> > > > >>> >>>> /Harry > > > >>> >>>> _______________________________________________ > > > >>> >>>> freebsd-current@freebsd.org mailing list > > > >>> >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-current > > > >>> >>>> To unsubscribe, send any mail to > "freebsd-current-unsubscribe@f > > > >>> >>> reebsd.org" > > > >>> >>> > > > >>> >>> > > > >>> >> > > > >>> >> > > > >>> >> -- > > > >>> >> Harry Newton > > > >>> >> > > > >>> >> > > > >>> >> > > > >>> > > > > >>> > > > > >>> > -- > > > >>> > Harry Newton > > > >>> > _______________________________________________ > > > >>> > freebsd-current@freebsd.org mailing list > > > >>> > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > > >>> > To unsubscribe, send any mail to "freebsd-current-unsubscribe@f > > > >>> reebsd.org" > > > >>> > > > >>> > > > >> > > > >> > > > >> -- > > > >> Harry Newton > > > >> > > > >> > > > >> > > > > > > > > > > > > -- > > > > Harry Newton > > > > > > > > > > > > > > > > -- > > > Harry Newton > > > _______________________________________________ > > > freebsd-current@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@ > > freebsd.org" > > > > > > -- > Harry Newton > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= " >