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


Message #146 received at 41011 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Stefan <stefan-guix <at> vodafonemail.de>
Cc: 41011 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>
Subject: Re: [bug#41011] [PATCH] gnu: grub: Support for network boot via TFTP.
Date: Sat, 26 Sep 2020 18:13:57 +0200
[Message part 1 (text/plain, inline)]
Hi Stefan,

I think this is almost ready to be merged.

There's still one thing I'm unclear about.

I tested it this way:

(1) create ~/config.scm with the following contents:

(use-modules (gnu))

(operating-system
  (timezone "UTC")
  (bootloader
    (bootloader-configuration
      (bootloader grub-efi-netboot-bootloader)
      (target "/boot")))
  (file-systems
    (cons* (file-system
             (mount-point "/")
             (device ":/foo")
             (type "nfs"))
            %base-file-systems))
  (host-name "client1"))

(2) mkdir ~/tf
(3) ./pre-inst-env guix system init ~/config.scm ~/tf

Now, ~/tf contains the system to be booted over the network, right?

But ~/tf/boot/efi/Guix/grub.cfg points to the tftp machine's /boot .
Is that a bug?  Shouldn't it point to the /boot of ~/tf, the system
to be booted?

Likewise, the gnu store directly inside ~/tf is not used, but
~/tf/boot/gnu points to the tftp machines's /gnu.  Shouldn't it
point to the former?

On Sat, 26 Sep 2020 12:54:00 +0200
Stefan <stefan-guix <at> vodafonemail.de> wrote:

> +         (let* ((net-dir (string-append mount-point target "/"))
> +                (sub-dir (string-append net-dir #$subdir "/"))
> +                (store-link (string-append net-dir (%store-prefix)))
> +                (grub-cfg "/boot/grub/grub.cfg")

Shouldn't that be

 (string-append mount-point "/boot/grub/grub.cfg")

?

> +                (grub-cfg-link (string-append sub-dir (basename grub-cfg)))
> +                (boot-efi-link (string-append sub-dir #$boot-efi-link)))
> +           ;; Prepare the symlink to the store.
> +           (mkdir-p (dirname store-link))
> +           (false-if-exception (delete-file store-link))
> +           (symlink-relative (%store-prefix) store-link)

Shouldn't that be

  (symlink-relative (string-append mount-point (%store-prefix)) store-link)

?

> +           ;; Install GRUB, which refers to the grub.cfg, with support for
> +           ;; encrypted partitions,
> +           (setenv "GRUB_ENABLE_CRYPTODISK" "y")
> +           (invoke/quiet (string-append bootloader "/bin/grub-mknetdir")
> +                         (string-append "--net-directory=" net-dir)
> +                         (string-append "--subdir=" #$subdir))
> +           ;; Prepare the symlink to the grub.cfg, which points into the store.
> +           (false-if-exception (delete-file grub-cfg-link))
> +           (symlink-relative grub-cfg grub-cfg-link)
> +           ;; Prepare the bootloader symlink, which points to GRUB.
> +           (false-if-exception (delete-file boot-efi-link))
> +           (symlink #$efi-bootloader boot-efi-link))))))

Okay.
[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.