From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: How to use custom grub? Date: Mon, 7 Nov 2016 16:05:44 +0100 Message-ID: <20161107160544.76784851@scratchpost.org> References: <8737j85yek.fsf@duckhunt.i-did-not-set--mail-host-address--so-tickle-me> <87a8df1ioy.fsf@gnu.org> <878tsy6r2k.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <20161106004117.1d08b79b@scratchpost.org> <20161107114833.2c1453ca@scratchpost.org> <87inrz8qss.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3lUf-0000bz-Mz for guix-devel@gnu.org; Mon, 07 Nov 2016 10:05:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3lUc-0006OG-97 for guix-devel@gnu.org; Mon, 07 Nov 2016 10:05:53 -0500 Received: from dd1012.kasserver.com ([85.13.128.8]:42414) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c3lUb-0006O2-Ko for guix-devel@gnu.org; Mon, 07 Nov 2016 10:05:49 -0500 In-Reply-To: <87inrz8qss.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> 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: Marius Bakke Cc: guix-devel@gnu.org Hi Marius, On Mon, 07 Nov 2016 11:36:51 +0000 Marius Bakke wrote: > That's it! This makes it pick up (bootloader (grub-configuration (grub > grub-efi))) from my config.scm: > > making '/gnu/store/kgk9rrawq9fxh1g2j6121gl3lcz47395-system' the current system... > Installing for x86_64-efi platform. > Installation finished. No error reported. > > Even though I'm now working on multi-platform grub, I think we should > have this anyway so that the "grub" argument works as expected. WDYT? Yes, I agree that grub should not be magically picked up but rather be read from the configuration - as you do here. This makes alternative bootloaders possible and is also less surprising in any case. Also in guix/scripts/system.scm in perform-action there's a (setenv "PATH" ...) form. I think that one should be replaced, too - for much the same reasons. It would be better to just pass grub to install-grub* (which would need its parameter list adapted) instead of mucking with PATH :P In this way the package variable would flow from the os configuration all the way to the actual "grub-install" invocation call without magical environment variables, packages that just happen to be pulled in from some imported module etc. If you want, you can also fix this one up, too. (If not, I'll wait until your stuff is merged and fix it myself - no worries) A first test whether it was enough is to remove the #:use-module (gnu packages grub) from guix/scripts/system.scm and see whether it still works (it should). For clarity I would make the final patch remove it, too.