From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bootloader and kernel arguments "--root", "--system", "--load" Date: Sat, 15 Apr 2017 21:50:38 +0200 Message-ID: <20170415215038.3b38aca1@scratchpost.org> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> <20170415184756.10b178be@scratchpost.org> <871sstilgo.fsf@gmail.com> 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]:33961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czTif-0006PV-AN for guix-devel@gnu.org; Sat, 15 Apr 2017 15:50:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czTic-00040L-9F for guix-devel@gnu.org; Sat, 15 Apr 2017 15:50:53 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:53638) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1czTic-0003zG-22 for guix-devel@gnu.org; Sat, 15 Apr 2017 15:50:50 -0400 In-Reply-To: <871sstilgo.fsf@gmail.com> 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: Mathieu Othacehe Cc: 26339@debbugs.gnu.org, guix-devel Ok, I'm in the process of reverting the patches to grub. ------ Problem analysis: - (profile-boot-parameters ...) doesn't pick up the correct kernel-arguments. It's reading them from a parameters file for the system generation back then, for example from /gnu/store/x8ymiksnhfyvjdi8ms38ysc4yr92lyk9-system/parameters, which contains: (boot-parameters (version 0) (label "GNU with Linux-Libre 4.5.1 (beta)") (root-device "/dev/sda1") (kernel "/gnu/store/h977riqrp7c3w2v0mcpp48ldcapy09gx-linux-libre-4.5.1") (kernel-arguments ("crashkernel=256M" "modprobe.blacklist=pcspkr,snd_pcsp" "quiet" "acpi_osi=Linux" "clocksource=acpi_pm")) (initrd (string-append "/gnu/store/8w1abpwlhnilibiamcp6j01rhjh9k5ix-base-initrd" "/initrd"))) , which indeed doesn't contain the correct kernel arguments for it to boot. Why not? Shouldn't we just store the correct arguments in there eventually? Those kernel arguments should include (in the front): linux-arguments let root = (boot-parameters-root-device params) or #f let root-device = (if (bytevector? root) (uuid->string root) root) let system = "/gnu/store/x8ymiksnhfyvjdi8ms38ysc4yr92lyk9-system" in "--root=" "--system=" "--load=/boot" . Or is it something grub-specific? Or is it because we don't know system's own hash value in order to be able to write it there? Would it be good to (later) replace the kernel-arguments accessor by a procedure that also takes system and root and prepends them on-the-fly? i.e. (define (boot-parameters-all-kernel-arguments params system root) (cons (string-append "--root=" root) (cons (string-append "--system=" system) ... load etc (boot-parameters-kernel-arguments params)))) ... and only use this one, never boot-parameters-kernel-arguments anywhere else?