GNU bug report logs - #41011
[PATCH] gnu: grub: Support for network boot via tftp/nfs.

Previous Next

Package: guix-patches;

Reported by: Stefan <stefan-guix <at> vodafonemail.de>

Date: Fri, 1 May 2020 20:33:02 UTC

Severity: normal

Tags: patch

Done: Stefan <stefan-guix <at> vodafonemail.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, Stefan <stefan-guix <at> vodafonemail.de>
Cc: 41011 <at> debbugs.gnu.org
Subject: [bug#41011] [PATCH] gnu: grub: Support for network boot via tftp/nfs.
Date: Thu, 11 Jun 2020 15:19:37 +0200
[Message part 1 (text/plain, inline)]
Hi Maxim,
Hi Stefan,

On Thu, 11 Jun 2020 00:21:11 -0400
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:

> >   (define (device-string->file-system-device device-string)
> >     ;; The "--root=SPEC" 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) => identity)
> >           (else (file-system-label device-string))))
> >
> > But looking at the condition (uuid device-string) I have no idea what that means,
> > or is bound to!  
> 
> 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 "=> identity" ?

> 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 <nfs-share> 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/filesystems/nfs/nfsroot.txt
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 4 years and 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.