Date: Wed, 24 Oct 2018 13:47:16 -0400 From: Jung-uk Kim <jkim@FreeBSD.org> To: Warner Losh <imp@bsdimp.com>, Harry Newton <hn@yewbarrow.net> Cc: Kyle Evans <kevans@freebsd.org>, Toomas Soome <tsoome@me.com>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: UEFI boot hangs after loader Message-ID: <2c936e35-7bcf-95f9-f99d-60d3c9408d39@FreeBSD.org> In-Reply-To: <CANCZdfqeox-pb9_iEpvf8ahYzJsJ=mwNO%2BhoDjE6OppQG%2Bbfig@mail.gmail.com> References: <CAKAm69Fw%2BX3Xik6rUcEOrr0TtxypEc2D05%2B5g9JGh=N2VxZGpA@mail.gmail.com> <282E6F72-6573-4F0E-81AB-25110855EBB7@me.com> <CAKAm69EMraV0KaPEbsxTcEpwFjpNZtW-sc42mmSq=9vv%2BiyGzQ@mail.gmail.com> <2950121D-C985-4F2E-A512-FB73CFDF48BC@me.com> <CAKAm69Gd1yq0Lss2nByjkkfiTPCAW6wvaKPF8LVqbw%2BvbEnxUQ@mail.gmail.com> <4457A5DC-A577-4782-B1E8-306236908D5D@me.com> <CAKAm69EF98FZnh0KHkArPGX=_7OZT369kQr3J5YigE-0mOsgqA@mail.gmail.com> <B5749B46-02E5-4B48-858B-EE2743281154@me.com> <CAKAm69HrTh%2BibMi8GHV9CpUa2=2jsof2AXk5LeOE0TwRxTWc3w@mail.gmail.com> <CAKAm69FEOCWwEPr3ZLVOYHuVyZYNACbXhzhwH_4VgC0DV9B7jw@mail.gmail.com> <CACNAnaGrk9tN0Pg0HeODRuSnqGCaSZSBQtvV6JscVh%2B7hBCN%2BQ@mail.gmail.com> <CAKAm69E8mCEwZnWrHLRDQeJpN9KZyyayjZLq6Kg7jU2Zpe_N-Q@mail.gmail.com> <CANCZdfp2ELRD0Cb-Rbxna8_dga-Y9o790gGAF05tsdPjBcz%2BNA@mail.gmail.com> <CAKAm69Fa=9qFB=UeY3HbmSb2gHc6_gU_ChWtNj=Vaxy5HwOq-A@mail.gmail.com> <CANCZdfqeox-pb9_iEpvf8ahYzJsJ=mwNO%2BhoDjE6OppQG%2Bbfig@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6YQ9ZCTcMVw91DDlUHa6JZDeoMPqZaEHa Content-Type: multipart/mixed; boundary="ei2Kmkk4IfMlSr6K5wLYoLjvuy9Iwfoij"; protected-headers="v1" From: Jung-uk Kim <jkim@FreeBSD.org> To: Warner Losh <imp@bsdimp.com>, Harry Newton <hn@yewbarrow.net> Cc: Kyle Evans <kevans@freebsd.org>, Toomas Soome <tsoome@me.com>, FreeBSD Current <freebsd-current@freebsd.org> Message-ID: <2c936e35-7bcf-95f9-f99d-60d3c9408d39@FreeBSD.org> Subject: Re: UEFI boot hangs after loader References: <CAKAm69Fw+X3Xik6rUcEOrr0TtxypEc2D05+5g9JGh=N2VxZGpA@mail.gmail.com> <282E6F72-6573-4F0E-81AB-25110855EBB7@me.com> <CAKAm69EMraV0KaPEbsxTcEpwFjpNZtW-sc42mmSq=9vv+iyGzQ@mail.gmail.com> <2950121D-C985-4F2E-A512-FB73CFDF48BC@me.com> <CAKAm69Gd1yq0Lss2nByjkkfiTPCAW6wvaKPF8LVqbw+vbEnxUQ@mail.gmail.com> <4457A5DC-A577-4782-B1E8-306236908D5D@me.com> <CAKAm69EF98FZnh0KHkArPGX=_7OZT369kQr3J5YigE-0mOsgqA@mail.gmail.com> <B5749B46-02E5-4B48-858B-EE2743281154@me.com> <CAKAm69HrTh+ibMi8GHV9CpUa2=2jsof2AXk5LeOE0TwRxTWc3w@mail.gmail.com> <CAKAm69FEOCWwEPr3ZLVOYHuVyZYNACbXhzhwH_4VgC0DV9B7jw@mail.gmail.com> <CACNAnaGrk9tN0Pg0HeODRuSnqGCaSZSBQtvV6JscVh+7hBCN+Q@mail.gmail.com> <CAKAm69E8mCEwZnWrHLRDQeJpN9KZyyayjZLq6Kg7jU2Zpe_N-Q@mail.gmail.com> <CANCZdfp2ELRD0Cb-Rbxna8_dga-Y9o790gGAF05tsdPjBcz+NA@mail.gmail.com> <CAKAm69Fa=9qFB=UeY3HbmSb2gHc6_gU_ChWtNj=Vaxy5HwOq-A@mail.gmail.com> <CANCZdfqeox-pb9_iEpvf8ahYzJsJ=mwNO+hoDjE6OppQG+bfig@mail.gmail.com> In-Reply-To: <CANCZdfqeox-pb9_iEpvf8ahYzJsJ=mwNO+hoDjE6OppQG+bfig@mail.gmail.com> --ei2Kmkk4IfMlSr6K5wLYoLjvuy9Iwfoij Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 18. 10. 24., Warner Losh wrote: > On Wed, Oct 24, 2018 at 10:33 AM Harry Newton <hn@yewbarrow.net> wrote:= >=20 >> gryphon# efivar -N --hex $(efivar | grep Boot0002) >> 0000: 01 00 00 00 98 00 55 00 45 00 46 00 49 00 3a 00 >> 0010: 20 00 4b 00 69 00 6e 00 67 00 73 00 74 00 6f 00 >> 0020: 6e 00 44 00 61 00 74 00 61 00 54 00 72 00 61 00 >> 0030: 76 00 65 00 6c 00 65 00 72 00 20 00 32 00 2e 00 >> 0040: 30 00 31 00 2e 00 30 00 30 00 00 00 02 01 0c 00 >> 0050: d0 41 03 0a 00 00 00 00 01 01 06 00 00 14 03 05 >> 0060: 06 00 03 00 04 01 2a 00 01 00 00 00 01 00 00 00 >> 0070: 00 00 00 00 40 06 00 00 00 00 00 00 90 90 90 90 >> 0080: 00 00 00 00 00 00 00 00 00 00 00 00 01 01 7f ff >> 0090: 04 00 01 04 4e 00 ef 47 64 2d c9 3b a0 41 ac 19 >> 00a0: 4d 51 d0 1b 4c e6 4b 00 69 00 6e 00 67 00 73 00 >> 00b0: 74 00 6f 00 6e 00 44 00 61 00 74 00 61 00 54 00 >> 00c0: 72 00 61 00 76 00 65 00 6c 00 65 00 72 00 20 00 >> 00d0: 32 00 2e 00 30 00 31 00 2e 00 30 00 30 00 00 00 >> 00e0: 7f ff 04 00 00 00 42 4f >> gryphon# >> >=20 > Perfect. I'll decode this and see if I can figure out where we're going= AFU. It looks familiar. http://docs.freebsd.org/cgi/mid.cgi?eadf5d63-a65a-338e-a3e0-f91b410052fa Jung-uk Kim >> On 24 October 2018 at 15:09, Warner Losh <imp@bsdimp.com> wrote: >> >>> >>> >>> On Wed, Oct 24, 2018 at 7:05 AM Harry Newton <hn@yewbarrow.net> 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, thoug= h 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 <kevans@freebsd.org> 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 med= ia >>>>> and give that a shot for booting? If that works, we can explore UEF= I >>>>> 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 <hn@yewbarrow.net> wro= te: >>>>>> >>>>>> I set LOADER_DEFAULT_INTERP=3D4th and went in /usr/src/stand and >>>> re-made >>>>> 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 th= e >>>>> strings >>>>>> I see on the console before the hang. But it must then call / rea= d >>>>>> 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 wit= h >>>> EFI >>>>>> variables, but as efibootmgr doesn't work I can't explore this, >>>> despite >>>>>> efirt being in the kernel. >>>>>> >>>>>> Suggestions received welcomed, and new suggestions / leads to foll= ow >>>> also >>>>>> very much welcomed. >>>>>> >>>>>> /H >>>>>> >>>>>> >>>>>> On 23 October 2018 at 21:33, Harry Newton <hn@yewbarrow.net> wrote= : >>>>>> >>>>>>> Right ... I've the binaries in /boot, freshly made. This might b= e >>>> 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 <tsoome@me.com> 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 <hn@yewbarrow.net> 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 >>>> parts >>>>> onto >>>>>>>> the UEFI partition ? If so, how ? >>>>>>>> >>>>>>>> >>>>>>>> On 23 October 2018 at 21:17, Toomas Soome <tsoome@me.com> wrote:= >>>>>>>> >>>>>>>>> ok, in that case I=E2=80=99d suggest to test out if forth based= one is >>>> still >>>>>>>>> working - at least you can get the bootable system. And then >>>> there >>>>> is a >>>>>>>>> chance to debug the lua version too (note it should be possible= >>>> to >>>>> chain >>>>>>>>> /boot/loader_lua.efi). >>>>>>>>> >>>>>>>>> rgds, >>>>>>>>> toomas >>>>>>>>> >>>>>>>>>> On 23 Oct 2018, at 23:08, Harry Newton <hn@yewbarrow.net> >>>> 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 <tsoome@me.com> >>>> wrote: >>>>>>>>>> >>>>>>>>>>> hm. in that case, whats the content of /boot/loader.rc ? >>>>>>>>>>> >>>>>>>>>>> rgds, >>>>>>>>>>> toomas >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On 23 Oct 2018, at 23:01, Harry Newton <hn@yewbarrow.net> >>>> wrote: >>>>>>>>>>> >>>>>>>>>>> If boot menu is the screen where you get the options for >>>> various >>>>>>>>> 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 load= ed 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 <tsoome@me.com> >>>> 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 <hn@yewbarrow.net> >>>>> 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.EFI >>>>>>>>>>>>> - >>>>>>>>>>>>> >>>>>>>>>>>>> So it gets into loader.efi which runs but stops I think jus= t >>>>> 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 >>>> kernel >>>>>>>>>>>>> >>>>>>>>>>>>> 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 --ei2Kmkk4IfMlSr6K5wLYoLjvuy9Iwfoij-- --6YQ9ZCTcMVw91DDlUHa6JZDeoMPqZaEHa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlvQsCUACgkQfJ+WJvzb 8UYlSgf8CyNpYkuNjtNOpFbBpP2PpM0BlEh9KBT3LpCKtIklwLqaIwOkBxFTRxwl BWtgvbVKjb3H0T9YaLK4KdLSBCyy1sfRBS4eJwkak03slZhqyxAAryVRludH4xt2 xDwtHCRNUELDaceonkrb18mBM1RQmlmua5EL/18Dr4Xu6iiKQzjH92558aAVw6A1 YGGryrdp1MVZBLZmHdhJvHDDz2Yed6kBFXyR0Dw03c2wslkH1M8CsuQ4h7bCwDDP cNv7cYFNlQ1f754uTIMnxVxo6Ao3EchNhemDDm2lwHoHe6QM2zWlzfIwvtnBS46e dHr7nhbXuyYtR4WbZ33Q/1jSz6DrPQ== =Rgav -----END PGP SIGNATURE----- --6YQ9ZCTcMVw91DDlUHa6JZDeoMPqZaEHa--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2c936e35-7bcf-95f9-f99d-60d3c9408d39>