From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Kernel modules in initrd Date: Tue, 27 Feb 2018 16:02:16 +0100 Message-ID: <874lm23287.fsf@gnu.org> References: <20180222211707.GB9758@jurong> <87eflck7ko.fsf@netris.org> <20180223020029.3babc4fa@scratchpost.org> <20180223152855.6a08f8bd@scratchpost.org> <20180223230239.GA6140@jurong> <20180225124330.2e706537@scratchpost.org> <87y3jfvkuv.fsf@gnu.org> <20180226172647.22d9e56b@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqglq-0007iR-PK for guix-devel@gnu.org; Tue, 27 Feb 2018 10:02:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqgln-0004yu-HC for guix-devel@gnu.org; Tue, 27 Feb 2018 10:02:22 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:60326) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eqgln-0004vA-9v for guix-devel@gnu.org; Tue, 27 Feb 2018 10:02:19 -0500 In-Reply-To: <20180226172647.22d9e56b@scratchpost.org> (Danny Milosavljevic's message of "Mon, 26 Feb 2018 17:26:47 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org Danny Milosavljevic skribis: > So what we would need next is something like modprobe written in guile. > > I think that ./gnu/build/linux-modules.scm load-linux-module* already doe= s that. > > The only part missing is to replace %modprobe-wrapper by a guile script > which imports ./gnu/build/linux-modules.scm load-linux-module*, interprets > some of the modprobe options and then masquerades as modprobe without inv= oking > modprobe. > > The reason is that the kernel calls us back when it needs a module (for > example when you mount something and it needs a charset converter or some= thing). > > (the name of the executable invoked is configured via /proc/sys/kernel/mo= dprobe) > > This can happen quite early in the boot process - and it took me some time > to get the order and also the environment variables right. We should be = able > to reuse that for the pure Guile modprobe. > > After the patch we don't *manually* load any of the modules - and all the > tests work. I booted my system with it - that also works. I see, that=E2=80=99s a workable plan, we should do that! > P.S. How come glibc is in the initrd? Shouldn't guile have statically li= nked it? > glibc is like 50000 kiB. In that case saving 800 kiB is not really worth= it... One of the packages that ends up in the initrd must be dynamically linked. You need to find out which one it is. Thanks for the explanations! Ludo=E2=80=99.