summaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-07-22 01:09:14 +0200
committerMarius Bakke <marius@gnu.org>2022-07-22 01:09:14 +0200
commit9044b086ddca64a62966a83cbf1b82d32dece89e (patch)
tree2c7f910c9100b2f2a752d07fe0ec44be83fb7600 /gnu/system
parent5dfc6ab1ab292b87ceea144aa661d0e64c834031 (diff)
parentabea091dbef2d44e6eb46bd2413bdf917e14d095 (diff)
Merge branch 'staging' into core-updates
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/image.scm16
1 files changed, 11 insertions, 5 deletions
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index 5972a944d7..42c2e6c121 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -275,7 +275,9 @@ set to the given OS."
(define (find-root-partition image)
"Return the root partition of the given IMAGE."
- (srfi-1:find root-partition? (image-partitions image)))
+ (or (srfi-1:find root-partition? (image-partitions image))
+ (raise (formatted-message
+ (G_ "image lacks a partition with the 'boot' flag")))))
(define (root-partition-index image)
"Return the index of the root partition of the given IMAGE."
@@ -374,7 +376,8 @@ used in the image."
(type (partition-file-system partition))
(image-builder
(with-imported-modules*
- (let ((initializer #$(partition-initializer partition))
+ (let ((initializer (or #$(partition-initializer partition)
+ initialize-root-partition))
(inputs '#+(list e2fsprogs fakeroot dosfstools mtools))
(image-root "tmp-root"))
(sql-schema #$schema)
@@ -444,8 +447,8 @@ used in the image."
(define (genimage-type-options image-type image)
(cond
((equal? image-type "hdimage")
- (format #f "~%~/~/gpt = ~a~%~/"
- (if (gpt-image? image) "true" "false")))
+ (format #f "~%~/~/partition-table-type = \"~a\"~%~/"
+ (image-partition-table-type image)))
(else "")))
(let* ((format (image-format image))
@@ -842,7 +845,10 @@ image, depending on IMAGE format."
;; This happens if some limits are exceeded, see:
;; https://lists.gnu.org/archive/html/grub-devel/2020-06/msg00048.html
#:grub-mkrescue-environment
- '(("MKRESCUE_SED_MODE" . "mbr_only"))))))))
+ '(("MKRESCUE_SED_MODE" . "mbr_only"))))
+ (else
+ (raise (formatted-message
+ (G_ "~a: unsupported image format") image-format)))))))
;;