[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/09: image: Raise an error when an image lacks a bootable partition.
From: |
guix-commits |
Subject: |
07/09: image: Raise an error when an image lacks a bootable partition. |
Date: |
Fri, 1 Jul 2022 06:27:34 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 05a759ab36c66e6336cdcf9f04ecc9e6e8e29dc2
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jul 1 10:38:37 2022 +0200
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 @@ 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."
- branch master updated (b5c6062bce -> 741895676b), guix-commits, 2022/07/01
- 03/09: services: root-file-system: Cleanly unmount upon shutdown., guix-commits, 2022/07/01
- 08/09: image: Add sanitizers for 'format' and 'partition-table-type'., guix-commits, 2022/07/01
- 02/09: file-systems: Add 'cleanly-unmounted-ext2?'., guix-commits, 2022/07/01
- 06/09: image: Avoid use of the deprecated 'gpt' option of genimage., guix-commits, 2022/07/01
- 04/09: image: 'system-image' throws when given an incorrect image format., guix-commits, 2022/07/01
- 05/09: image: Add default value for partition initializer., guix-commits, 2022/07/01
- 01/09: gnu: texlive-fmtcount: Add proper 'license' value., guix-commits, 2022/07/01
- 07/09: image: Raise an error when an image lacks a bootable partition.,
guix-commits <=
- 09/09: tests: Add sanitizer test., guix-commits, 2022/07/01