From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EBi+AIkv4l6rBAAA0tVLHw (envelope-from ) for ; Thu, 11 Jun 2020 13:20:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kCJHOIgv4l4tFQAA1q6Kng (envelope-from ) for ; Thu, 11 Jun 2020 13:20:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7438B9401CD for ; Thu, 11 Jun 2020 13:20:08 +0000 (UTC) Received: from localhost ([::1]:35964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjN7n-0008Ol-Dw for larch@yhetil.org; Thu, 11 Jun 2020 09:20:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjN7j-0008Mv-5J for guix-patches@gnu.org; Thu, 11 Jun 2020 09:20:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53006) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjN7h-0007Zv-Sy for guix-patches@gnu.org; Thu, 11 Jun 2020 09:20:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jjN7h-0001is-Nv for guix-patches@gnu.org; Thu, 11 Jun 2020 09:20:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41011] [PATCH] gnu: grub: Support for network boot via tftp/nfs. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 11 Jun 2020 13:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41011 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer , Stefan Cc: 41011@debbugs.gnu.org Received: via spool by 41011-submit@debbugs.gnu.org id=B41011.15918815846594 (code B ref 41011); Thu, 11 Jun 2020 13:20:01 +0000 Received: (at 41011) by debbugs.gnu.org; 11 Jun 2020 13:19:44 +0000 Received: from localhost ([127.0.0.1]:36318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjN7Q-0001iI-Gf for submit@debbugs.gnu.org; Thu, 11 Jun 2020 09:19:44 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:38834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjN7O-0001i8-EL for 41011@debbugs.gnu.org; Thu, 11 Jun 2020 09:19:42 -0400 Received: from localhost (80-110-127-207.cgn.dynamic.surfer.at [80.110.127.207]) by dd26836.kasserver.com (Postfix) with ESMTPSA id DC24633653F5; Thu, 11 Jun 2020 15:19:39 +0200 (CEST) Date: Thu, 11 Jun 2020 15:19:37 +0200 From: Danny Milosavljevic Message-ID: <20200611151937.204ad14d@scratchpost.org> In-Reply-To: <87bllqi66g.fsf@gmail.com> References: <9AAFEFF4-8ACE-4C95-975F-67C3F4FDAF81@vodafonemail.de> <87a72gi4kz.fsf@gmail.com> <1179D890-7D6C-43D8-A286-DA7A0F61D585@vodafonemail.de> <87h7w7cc55.fsf@gnu.org> <92DB8E2B-1CA2-41AE-9265-53C4F5337686@vodafonemail.de> <20200606193721.1e126131@scratchpost.org> <46CD97B3-9994-4AB7-AA7D-4DE39AB7A238@vodafonemail.de> <20200609154400.4c7d2f90@scratchpost.org> <87bllqi66g.fsf@gmail.com> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/=am4l1_r3KS5=990uDgH02q"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.11 X-TUID: CkqfeZ0BYtnK --Sig_/=am4l1_r3KS5=990uDgH02q Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Maxim, Hi Stefan, On Thu, 11 Jun 2020 00:21:11 -0400 Maxim Cournoyer wrote: > > (define (device-string->file-system-device device-string) > > ;; The "--root=3DSPEC" kernel command-line option always provides a > > ;; string, but the string can represent a device, a UUID, a > > ;; label or a NFS spec. So check for all three. > > (cond ((string-prefix? "/" device-string) device-string) > > ((uuid device-string) =3D> identity) > > (else (file-system-label device-string)))) > > > > But looking at the condition (uuid device-string) I have no idea what t= hat means, > > or is bound to! =20 >=20 > It means that if the device-string (a string as its name imply) contains > something that represent a UUID, return its corresponding UUID object. > `uuid' comes from (gnu system uuid). Does that answer your question? Oh! I've looked at now it but I still don't get it. How can that be a cond condition? Or asked differently, what if device-string does not represent an uuid, how come device-string->file-system-device does not enter the branch "=3D> iden= tity" ? > Does it cause a problem for the NFS boot via 'grub efi net' (I know > nothing about it -- any link for a recommended reading?) https://manpages.debian.org/testing/grub-common/grub-mknetdir.1.en.html Stefan has written a patch supporting it for Guix. (canonicalize-device-spec seems to expect a nfs share reference to be a string, too. Is that on purpose? No record? That's kinda weird when we even have records for device labels and uuids--but we don't have them for something that's actually complicated to specify? [1] :) ) > When booting > from NFS using the nfsroot Linux option, it's possible to specify a > '/dev/nfs' as the root kernel parameter. /dev/nfs is not a real block > device, it's just a stub hinting the kernel that its root file system is > on NFS. Perhaps that can be used? Hmm maybe. @Stefan? Also, could we have a system test testing this stuff? I can write the actual test--but could you tell me how to use the functionality introduced in this patch? [1] Reference docs for nfsroot: https://www.kernel.org/doc/Documentation/fi= lesystems/nfs/nfsroot.txt --Sig_/=am4l1_r3KS5=990uDgH02q Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl7iL2kACgkQ5xo1VCww uqXN3wgAn8JB7+NEMcj4kYz5P3wt2PSEz1rA5gml4ezMk3avxKkjZBLO+r3/7IR7 94PziwFb/6uRtIOxoPOsEzp1Al5bqLuHzwkcAvDx62VxKdrpyOkY8oBDnIPA/3sv MLwDe2SLYYZQDtO/Gyz6s+TaZvokU3ReJ0Er38qefrPRGKYyXD0pvOcX/SkTheeN Kun//ZBYCgOeYoMEzL1UYGdCn/tlmI97xV1QVQdlzgaUwAtPbBkOeZxY9x1xpVOu SOPiVVNasFMXKcabVm6lLY/bcy99kKXeNrv7doXtCPhF1sMCxHRknQDsTboxANMH J41lDBecMq137USle5K7WTR3FyQeLQ== =zDkN -----END PGP SIGNATURE----- --Sig_/=am4l1_r3KS5=990uDgH02q--