Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iVETn-0007vQ-I0 for mharc-grub-devel@gnu.org; Thu, 14 Nov 2019 07:44:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52384) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVETl-0007ut-7A for grub-devel@gnu.org; Thu, 14 Nov 2019 07:44:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVETj-0005AU-34 for grub-devel@gnu.org; Thu, 14 Nov 2019 07:44:04 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:49532 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iVETi-0005AE-VK for grub-devel@gnu.org; Thu, 14 Nov 2019 07:44:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573735442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qDEC6rOdaHLG6C4PSkBsEeOZqD4mcg1JQwre139Zej0=; b=fpvsh2HNKxn4Tz3MmVLgDSAsaTI29WaYmQhMNlvPXAHZc03/WMZ+meR4ICXxiDJVJ5cdeJ 6mhN2GC3/3xM1jEqwiAh+06JX6O2Q3GwifRaJVKqVDVGsQ9GEc+119JG8/6XtKgN0uYf5D eyH47gUCzr3+3c42SjXiuaq3zwidNuM= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-14-Bb1HsA3EP6mFE3-hFBx-6A-1; Thu, 14 Nov 2019 07:42:38 -0500 Received: by mail-wr1-f69.google.com with SMTP id m17so4329276wrb.20 for ; Thu, 14 Nov 2019 04:42:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KzTmJtxyE6tMzUFW7H1TGECkd1mp9xKupX+WpilxmfM=; b=iqkvOMmVhv3xYZHh1eqYlsp7eBXbSq7md4mRL1jR4ENmUlMBKJNjY4UqRPUyR3iNzr PPLDq19QYsUwJXEukAyMS6CSpMzibV9Mh7K1WF+HlFb3Cqk5uR75wkUEiGU3fknuhr8B Bx1qBQSXcp6j963YLqUbQ2Gz7ox/+tuqjD7pTpstsu26oHnphubdpIE0EGfVio6FuMak oCsrl59lHqJB59iEYBWMWfyvqgduoLlYzcTUQA8b7GSrBS3Dpxfzhy/TstNrA+2ytQA4 wX/nMPxQmK7e4lUkuS568G+y28X5H0Sp3k3d2gRnZqcUaSAlJnePAnp5i4hnmrRTi2Z3 xOMg== X-Gm-Message-State: APjAAAX0ysKPqqdQ0fsfkqRmulz1rh4GuLPSwPkIYMbaY333i+f7I5hM fF8wcZyx4MyHF7qah1j8ym+r7bA1heFWd7IUDa3d0FxTzoHBv3LC7IwTXiMYJZ3pwCTq1SDPCoU vETVqyVOz4lg= X-Received: by 2002:adf:c649:: with SMTP id u9mr8507110wrg.20.1573735357622; Thu, 14 Nov 2019 04:42:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwHm9xL9woOZx2YqwNE5KCUjMJvYU3J71oeIRwA7zfvFHK5aB3DfV3p/WbDaTRkszTC/AvRPg== X-Received: by 2002:adf:c649:: with SMTP id u9mr8507091wrg.20.1573735357353; Thu, 14 Nov 2019 04:42:37 -0800 (PST) Received: from shalem.localdomain (84-106-84-65.cable.dynamic.v4.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id s9sm5693897wmj.22.2019.11.14.04.42.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Nov 2019 04:42:36 -0800 (PST) Subject: Re: Transfering Data from GRUB to userspace? To: The development of GNU GRUB , Daniel Kiper Cc: Max Tottenham References: <20191028105820.GC11778@akamai.com> <20191028164613.tfklmvw3k7wxf46l@tomti.i.net-space.pl> <20191114102710.GA31359@lon-lp55b.london.corp.akamai.com> From: Hans de Goede Message-ID: <44de79b3-0941-a5cb-3472-a7d29df36315@redhat.com> Date: Thu, 14 Nov 2019 13:42:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <20191114102710.GA31359@lon-lp55b.london.corp.akamai.com> Content-Language: en-US X-MC-Unique: Bb1HsA3EP6mFE3-hFBx-6A-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2019 12:44:06 -0000 Hi, Sorry for jumping in mid thread, but I just noticed this and some functiona= lity like this has my interest too. I especially triggered on the cpio / initrd proposal. I have been discussing something similar with the systemd folks, see some background see: https://lists.freedesktop.org/archives/systemd-devel/2019-September/043498.= html https://lists.freedesktop.org/archives/systemd-devel/2019-September/043515.= html https://lists.freedesktop.org/archives/systemd-devel/2019-September/043520.= html https://lists.freedesktop.org/archives/systemd-devel/2019-September/043521.= html Where the last one goed into the cpio / appended initrd concept. What we were discussing there is a way to pass the kbd-layout to the bootlo= ader and then having the bootloader pass it back to the initrd (so userspace in a way). The problem is that localectl updates /etc/vconsole.conf but that does not influence that file in existing initrds so the initrd has a wrong value after changing the kbd layout and regenerating the initrd is undesirable, since we keep old kernel + initrds around as a fallback in case something breaks and if it is the initrd which broke then regenerating it will break the fallback. So Lennart said that we should really also pass the kbdmap to the bootloade= r in case the bootloader supports it (for the cmdline mode). Lennart suggeste= d dropping a kbdmap file next to say grubenv which contains the kbdmap info. I instead am suggesting a "config" file which contains key-value pairs to make the mechanism more generic. Now the problem is, we still need to get this info to the initrd. Typically the initrd does not mount /boot or the ESP, so it cannot directly get to the kbdmap or config file. Lennart suggested simply passing it on the kernel cmdline which will work for the kbdmap case, but again is not very generic. I instead suggested making the "config" (or whatever we are going to name i= r) file available to the initrd variant by append an on the fly generated cpio archive to the initrd with that file in it. Which is why I triggered on the mentioning of using cpio to pass info from the bootloader to userspace. Please keep in mind that what I'm looking for is a bootloader agnostic solution. Requiring changes to the bootloader is fine, but it is something which should not be grub specific. Anyways TL;DR: I think that being able to pass an extra on the fly generated cpio archive appended to the initrd when booting is something which would be useful to have. Regards, Hans