From 05a759ab36c66e6336cdcf9f04ecc9e6e8e29dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 1 Jul 2022 10:38:37 +0200 Subject: [PATCH] image: Raise an error when an image lacks a bootable partition. * gnu/system/image.scm (find-root-partition): Raise an error when 'find' returns #f. --- gnu/system/image.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/system/image.scm b/gnu/system/image.scm index e6e6917ecd..42c2e6c121 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -275,7 +275,9 @@ (define (root-partition? partition) (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."