From owner-freebsd-questions@FreeBSD.ORG Sat Aug 30 12:28:12 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F324392 for ; Sat, 30 Aug 2014 12:28:12 +0000 (UTC) Received: from smtp-vbr15.xs4all.nl (smtp-vbr15.xs4all.nl [194.109.24.35]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4657150A for ; Sat, 30 Aug 2014 12:28:11 +0000 (UTC) Received: from slackbox.erewhon.home (slackbox.xs4all.nl [83.162.243.5]) by smtp-vbr15.xs4all.nl (8.13.8/8.13.8) with ESMTP id s7UCS3Ac076437; Sat, 30 Aug 2014 14:28:03 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.home (Postfix, from userid 1001) id 08A991243A; Sat, 30 Aug 2014 14:28:03 +0200 (CEST) Date: Sat, 30 Aug 2014 14:28:03 +0200 From: Roland Smith To: Jamie Griffin Subject: Re: Loading kernel modules on startup Message-ID: <20140830122803.GA14170@slackbox.erewhon.home> Mail-Followup-To: Jamie Griffin , FreeBSD Questions References: <540172F5.4020707@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline In-Reply-To: <540172F5.4020707@gmail.com> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.23 (2014-03-12) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2014 12:28:12 -0000 --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 30, 2014 at 07:45:09AM +0100, Jamie Griffin wrote: > I'm just wondering about the correct way to load kernel modules; namely,= =20 > specifying them in /boot/loader.conf or /etc/rc.conf. For example; Both are correct. According to rc.conf(5): kld_list (str) A list of kernel modules to load right after the local disks are mounted. Loading modules at this point in the boot process is much faster than doing it via /boot/loader.conf for those modules not necessary for mounting local disk. > Then, there is kld_list=3Dkldi915 for the vt console driver, and also=20 > kern.vty=3Dvt and hw.vga.textmode=3D1 in loader.conf for the same module. The first statement is loading a module. The second and third statements are kernel environment settings. According to vt(4), they can only be set in loader.conf. > Incidentally, the vt driver did not work properly for me when I used the= =20 > latter in loader.conf and I had to use the kld_list line in rc.conf(5). The syntax is different. In loader.conf it should be; i915kms_load=3D"YES" While in rc.conf you should use; kld_list=3D"i915kms" > What is the 'right' method for kernel module loading and is it just=20 > easier to compile them into the kernel going forward? You can compile most modules into a custom kernel if you like. But IMO it's not really worth the extra effort. In any case I would advise you to keep a GENERIC kernel and modules around. If your motherboard dies and you have to replace it you might end up with a system that doesn't work properly with the custom kernel. Roland --=20 R.F.Smith http://rsmith.home.xs4all.nl/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 5753 3324 1661 B0FE 8D93 FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0) --y0ulUmNC+osPPQO6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUAcNSAAoJEED21dyjijPgzk0QAJr8yCvAeGu/aYo8GOo+Zn7c JytFCq2zULPQ68RCx1uEqUAx4lGAgeTjzOt4/hPL44OGeiba4b7So+EUxuqh1DEz M0KTg4Kj+lQ4xs4L7FXudRYFpN08XEtqSgTRQnQPu7Nr4rruyaGC/+z/tCKC1Lq5 qI7KgwZUN8Tlw0Sj3BoGVWQkrbUoq/7nmSL+oh4JFB8rgqQWKxF7syCbypl7u3HE kZZyt6qVYMjp3yGDz14TU7I+TkgoPxjRIu7U9jY8644GLWJT4Ou7qPZaAuPJz62/ i8Ao+9enxpgwzZQNI25TKlPZBO/iqs22lj6/EuMCM2tIYGJYdOND79ZdMjX7xoog +cyu8knO2kpye+0df5RdVaTkNz05A8bJ94gHLhDesVnXw5aXFDcOoMjiB6pu1V1s hCfe1HpY5ow16c2wqwzU0cH+aksuqA+3gD7pXFRnBsX8psf8FBnbwheeYsneRkhj OfHuKr1hgnezkNCIfi0qQtRJtM1yu24lqWuzSrboxi/cuh+OMn0J2Z1WxhHOrORF IhiytXFRGkmWdcGmEWNLizD6PJ2uBrgcxoD0/mp9E0EEGvIeI9kGVqqD+lVJZnBD y/Kc0muEsTxu0VxxvLDnDP3eRm1PGrI8VOrgW0RgVmqljuVFggU6JHZ1/vM/tYkf kDKJK0MFMecUsk/g7ePP =ei4s -----END PGP SIGNATURE----- --y0ulUmNC+osPPQO6--