guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: berlin: Adjust %copy-kernel-and-initrd activation script.


From: Maxim Cournoyer
Subject: 02/03: berlin: Adjust %copy-kernel-and-initrd activation script.
Date: Fri, 30 Sep 2022 17:02:37 -0400 (EDT)

apteryx pushed a commit to branch master
in repository maintenance.

commit 441f2486078e1ba0af252b9c7e74b22fe9147192
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Sep 30 12:53:27 2022 -0400

    berlin: Adjust %copy-kernel-and-initrd activation script.
    
    The store being on a GRUB-invisible SAN device, the kernel and initrd
    should now be copied to /boot, which is hosted on two local
    SSDs (Btrfs RAID1).
    
    * hydra/berlin.scm (%copy-kernel-and-initrd): Adjust to /boot instead
    of to /store.  Copy the whole file name, not just its base name.
    Let warnings go through.
    [services]: Rename service from copy-kernel+initrd-to-/store to
    copy-kernel+initrd-to-/boot.
---
 hydra/berlin.scm | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/hydra/berlin.scm b/hydra/berlin.scm
index 58fe68d..f70f447 100644
--- a/hydra/berlin.scm
+++ b/hydra/berlin.scm
@@ -106,26 +106,26 @@ Happy hacking!\n"))
 
 
 (define %copy-kernel-and-initrd
-  ;; The storage device where the root file system is is invisible to GRUB.
-  ;; Thus, copy the kernel and initrd to /store, where GRUB will be able to
-  ;; find them.
+  ;; The storage device where the root file system is is invisible to
+  ;; GRUB.  Thus, copy the kernel and initrd to /boot, where GRUB will
+  ;; be able to find them.
   (with-imported-modules '((guix build utils))
     #~(begin
         (use-modules (guix build utils))
 
-        (for-each (lambda (file)
-                    (let ((target (string-append "/store/" (basename file))))
-                      (unless (file-exists? target)
-                        (format #t "copying '~a' to /store...~%" file)
-                        (copy-recursively file target
-                                          #:log (%make-void-port "w")))))
+        (for-each
+         (lambda (file)
+           (let ((target (string-append "/boot/@root/" file)))
+             (format #t "copying '~a' to /boot/@root/~%" file)
+             (mkdir-p (dirname target))
+             (copy-recursively file target)))
 
-                  ;; /run/current-system/kernel is a profile.  The trick
-                  ;; below allows us to get at its actual directory name,
-                  ;; which is what 'grub.cfg' refers to.
-                  (list (dirname
-                         (canonicalize-path 
"/run/current-system/kernel/bzImage"))
-                        (dirname (canonicalize-path 
"/run/current-system/initrd")))))))
+         ;; /run/current-system/kernel is a profile.  The trick below
+         ;; allows us to get at its actual directory name, which is
+         ;; what 'grub.cfg' refers to.
+         (list (dirname
+                (canonicalize-path "/run/current-system/kernel/bzImage"))
+               (dirname (canonicalize-path "/run/current-system/initrd")))))))
 
 
 (define %build-node-key-directory
@@ -322,7 +322,7 @@ at MOUNT-POINT."
                    %base-packages))
 
   (services (cons*
-             (simple-service 'copy-kernel+initrd-to-/store
+             (simple-service 'copy-kernel+initrd-to-/boot
                              activation-service-type
                              %copy-kernel-and-initrd)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]