From 4989f6acff3b3fcfbd9dde3e3c2767bd2cd6d49e Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Wed, 31 Aug 2022 23:22:55 +0200 Subject: installer: Fix segfault on double logical partition removal. * gnu/installer/parted.scm (auto-partition!): Avoid removing logical partitions twice. Signed-off-by: Mathieu Othacehe --- gnu/installer/parted.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu/installer/parted.scm') diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm index 641a1f45e8..84fdbe24fb 100644 --- a/gnu/installer/parted.scm +++ b/gnu/installer/parted.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2018, 2019 Mathieu Othacehe ;;; Copyright © 2019, 2020, 2022 Ludovic Courtès ;;; Copyright © 2020 Tobias Geerinckx-Rice +;;; Copyright © 2022 Josselin Poiret ;;; ;;; This file is part of GNU Guix. ;;; @@ -983,6 +984,11 @@ (define* (auto-partition! disk (for-each (lambda (partition) (and (data-partition? partition) + ;; Do not remove logical partitions ourselves, since + ;; disk-remove-partition* will remove all the logical partitions + ;; residing on an extended partition, which would lead to a + ;; double-remove and ensuing SEGFAULT. + (not (logical-partition? partition)) (disk-remove-partition* disk partition))) non-boot-partitions) -- cgit v1.2.3