From owner-freebsd-current@freebsd.org Sat Jan 2 03:15:28 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DFD6A5DA5D for ; Sat, 2 Jan 2016 03:15:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 3D72A1720 for ; Sat, 2 Jan 2016 03:15:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 3B61AA5DA5C; Sat, 2 Jan 2016 03:15:28 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AE62A5DA5B for ; Sat, 2 Jan 2016 03:15:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 205201650 for ; Sat, 2 Jan 2016 03:15:27 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sat, 2 Jan 2016 03:15:49 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id u023FJIu024572; Fri, 1 Jan 2016 20:15:19 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1451704519.1369.78.camel@freebsd.org> Subject: Re: env functionality of config(5) has no effect? From: Ian Lepore To: "Eggert, Lars" , "current@freebsd.org" Date: Fri, 01 Jan 2016 20:15:19 -0700 In-Reply-To: <0F998D21-682B-4B41-8248-B072F468184B@netapp.com> References: <0F998D21-682B-4B41-8248-B072F468184B@netapp.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 02 Jan 2016 03:15:28 -0000 On Wed, 2015-10-21 at 08:09 +0000, Eggert, Lars wrote: > Hi, > > I'm trying to include some loader tunables in the kernel, via the > "env" functionality described in config(5). > > When I look at the compiled kernel binary with strings(1), I see that > the tunables are compiled in. > > However, they don't seem to take any effect when booting the kernel, > and they also don't show up when running kenv(1) after boot. > > Any ideas? > > Thanks, > Lars It took a while to get to, but now as of r293045 this should be fixed and the 'env' directive will be honored on all architectures. Be aware that the static environment completely replaces anything provided by the boot loader. That means that vfs.root.mount_from won't be set so you'll need to provide that value in your static env, or set ROOTDEVICE= in your kernel config. module_path is another one that loader(8) normally provides, and it needs to be set for kldload and things that auto-load modules (devd, mount) to work. I think this should be safe to MFC, but I tend to be lazy and do MFCing in long-delayed batches; let me know if you need it MFC'd sooner. -- Ian