aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/image.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system/image.scm')
-rw-r--r--gnu/system/image.scm17
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index 36f56e237d..97c7021454 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -63,7 +63,8 @@
iso9660-image
find-image
- system-image))
+ system-image
+ image-with-label))
;;;
@@ -404,6 +405,20 @@ used in the image. "
#:options `(#:references-graphs ,inputs
#:substitutable? ,substitutable?))))
+(define (image-with-label base-image label)
+ "The volume ID of an ISO is the label of the first partition. This procedure
+returns an image record where the first partition's label is set to <label>."
+ (image
+ (inherit base-image)
+ (partitions
+ (match (image-partitions base-image)
+ ((boot others ...)
+ (cons
+ (partition
+ (inherit boot)
+ (label label))
+ others))))))
+
;;
;; Image creation.