From owner-freebsd-current@freebsd.org Sun Aug 19 17:04:30 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 198B8107051F for ; Sun, 19 Aug 2018 17:04:30 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:bb:dcff:fe50:d900]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.lerctr.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AEF3A80231; Sun, 19 Aug 2018 17:04:29 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=VNd0O+XLYOYLIaMHMeRIbl8gMxik2+ZsLSvSDaKPbxE=; b=vGtg6a68h7qeB+79bfbHK1AACM 7LZegTx5ZH6DfRqDvIXc05U9oQYh2tpqrz8fe0vIOjmCDr7OIgj9/kny4+zPazzdrv26vOqW2p3I8 W//EV7oKOvGdHMgoh9rQ0tjTjzm7+N/fgwRZnV+xG8lEHt7LFmKwT/m2O8pDXjnMY17Y=; Received: from [2600:1700:210:b18f:1840:43d6:4770:35e0] (port=63577 helo=ler-imac.local) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91 (FreeBSD)) (envelope-from ) id 1frR7s-000GDA-Qk; Sun, 19 Aug 2018 12:04:28 -0500 Date: Sun, 19 Aug 2018 12:04:28 -0500 From: Larry Rosenman To: John Baldwin Cc: Kyle Evans , Warner Losh , FreeBSD Current , tychon@freebsd.org Subject: Re: LUA loader: bhyve now doesn't? Message-ID: <20180819170428.w676mh2og6syzbcx@ler-imac.local> Mail-Followup-To: John Baldwin , Kyle Evans , Warner Losh , FreeBSD Current , tychon@freebsd.org References: <20180819152253.bbcrefdvynl7y5ka@ler-imac.local> <20180819153526.7ruovrpmdsimkmfj@ler-imac.local> <167d1cb1-7232-52bb-9a73-6f109c437a63@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lno55kmn4s22nhzj" Content-Disposition: inline In-Reply-To: <167d1cb1-7232-52bb-9a73-6f109c437a63@FreeBSD.org> User-Agent: NeoMutt/20180716 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 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, 19 Aug 2018 17:04:30 -0000 --lno55kmn4s22nhzj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 19, 2018 at 05:58:43PM +0100, John Baldwin wrote: > On 8/19/18 5:28 PM, Kyle Evans wrote: > > On Sun, Aug 19, 2018 at 10:42 AM, Warner Losh wrote: > >> On Sun, Aug 19, 2018 at 9:35 AM, Larry Rosenman wrot= e: > >> > >>> On Sun, Aug 19, 2018 at 09:33:18AM -0600, Warner Losh wrote: > >>>> On Sun, Aug 19, 2018 at 9:22 AM, Larry Rosenman wr= ote: > >>>> > >>>>> With today's change to LUA as the loader, I seem to have an issue w= ith > >>>>> bhyhve: > >>>>> > >>>>> Consoles: userboot > >>>>> > >>>>> FreeBSD/amd64 User boot, Revision 1.1 > >>>>> (Thu Nov 16 15:04:02 CST 2017 root@borg.lerctr.org) > >>>>> Startup error in /boot/lua/loader.lua: > >>>>> LUA ERROR: cannot open /boot/lua/loader.lua: no such file or direct= ory. > >>>>> > >>>>> /boot/kernel/kernel text=3D0x1063d88 data=3D0x12e930+0x283970 > >>>>> syms=3D[0x8+0x14cf28+0x8+0x163e57] > >>>>> Hit [Enter] to boot immediately, or any other key for command promp= t. > >>>>> Booting [/boot/kernel/kernel]... > >>>>> > >>>>> These VM's have been running for MONTHS. > >>>>> > >>>>> Ideas? > >>>>> > >>>> > >>>> There's no boot/lua/loader.lua. > >>>> > >>>> You can either fix that, or you can recompile with > >>>> LOADER_DEFAULT_INTERP=3D4th for the moment. > >>> actually on the host there is: > >>> borg.lerctr.org /home/ler $ ls -l /boot/lua/ > >>> total 131 > >>> -r--r--r-- 1 root wheel 3895 Aug 19 09:46 cli.lua > >>> -r--r--r-- 1 root wheel 3204 Aug 19 09:46 color.lua > >>> -r--r--r-- 1 root wheel 14024 Aug 19 09:46 config.lua > >>> -r--r--r-- 1 root wheel 10302 Aug 19 09:46 core.lua > >>> -r--r--r-- 1 root wheel 9986 Aug 19 09:46 drawer.lua > >>> -r--r--r-- 1 root wheel 3324 Aug 19 09:46 hook.lua > >>> -r--r--r-- 1 root wheel 2543 Aug 19 09:46 loader.lua > >>> -r--r--r-- 1 root wheel 2431 Aug 19 09:46 logo-beastie.lua > >>> -r--r--r-- 1 root wheel 2203 Aug 19 09:46 logo-beastiebw.lua > >>> -r--r--r-- 1 root wheel 1958 Aug 19 09:46 logo-fbsdbw.lua > >>> -r--r--r-- 1 root wheel 2399 Aug 19 09:46 logo-orb.lua > >>> -r--r--r-- 1 root wheel 2119 Aug 19 09:46 logo-orbbw.lua > >>> -r--r--r-- 1 root wheel 12010 Aug 19 09:46 menu.lua > >>> -r--r--r-- 1 root wheel 3941 Aug 19 09:46 password.lua > >>> -r--r--r-- 1 root wheel 2381 Aug 19 09:46 screen.lua > >>> borg.lerctr.org /home/ler $ > >>> > >>> This is when booting the vm, and it's not on the vm's disk. > >>> > >>> So the bhyveload behavior *CHANGED*. > >>> > >>> POLA? > >>> > >> > >> Unlikely, but a couple of questions. Have you always used the LUA load= er, > >> or is this a change with the recent default switch? > >> > >> And to be clear, you expect the host's file to be used for this, not t= he VM > >> filesystem? > >> > >=20 > > (CC'ing jhb@ and tychon@, who might have better insight) > >=20 > > If we can swing it, I think the best model here should have always > > been that userboot uses the host's scripts but the guest's > > loader.conf. The current model doesn't tolerate any mismatch between > > host and guest and looks unsustainable. >=20 > Err, normally guests read things out of the a guest disk image (think most > VMs like VirtualBox, etc.). userboot.so is looking in the guest's disk i= mage. > Now, userboot isn't memory limited like the BIOS boot, so if it's > possible to have userboot just include both lua and forth perhaps with > some auto-detection based on what is in /boot/loader.rc to determine > which interpreter to use, that is really the best path forward. That won't help (looking at /boot/loader.rc) as my lua updated system still has: borg.lerctr.org /home/ler $ more /boot/loader.rc \ Loader.rc \ $FreeBSD: head/stand/i386/loader/loader.rc 331326 2018-03-21 22:01:51Z ke= vans $ \ \ Includes additional commands include /boot/loader.4th include /boot/efi.4th try-include /boot/loader.rc.local \ Reads and processes loader.conf variables initialize maybe-efi-resizecons \ Tests for password -- executes autoboot first if a password was defined check-password \ Load in the boot menu include /boot/beastie.4th \ Start the boot menu beastie-start borg.lerctr.org /home/ler $ so it still looks forth'ish, but it's using lua. >=20 > --=20 > John Baldwin > _______________________________________________ > 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" --=20 Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106 --lno55kmn4s22nhzj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHABAABCgCqFiEEHjgknedhWzvJgwVzaXyZsatIp30FAlt5oxwsFIAAAAAAFQAO cGthLWFkZHJlc3NAZ251cGcub3JnbGVyQGxlcmN0ci5vcmdfFIAAAAAALgAoaXNz dWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDFFMzgy NDlERTc2MTVCM0JDOTgzMDU3MzY5N0M5OUIxQUI0OEE3N0QACgkQaXyZsatIp30I awgAhycKYirfaHzbsOwalvzZPTRVk6jdsq1aafN3laAaq4LlPXHmn8i7IO97n5UN 6pXUB/PdDWpH5LtVbkW4fvleJSPqjA243slOXUamAsjPoqAVUVCPXZNX9m6JIpxV +TLmTEXVccPuC6590g8S8haaHae3+8us0kx7E9ofUvf2HlbGV0evcKeoBdDSGIQP pT8FQYFubv6d8N9ArfxFN1VPif74sa0fr4A8K+HHkVwreA4vOoowZfBPIo84St+L op3wpcPsFTk8CWm2ADoAYVzo+p+J4OskxUe41KsLTpIjYojLtN8p1Mh0l0ipAXBY 1EC0kxXvhfarDutkf1soHJkKNg== =IFY2 -----END PGP SIGNATURE----- --lno55kmn4s22nhzj--