me
/
guix
Archived
1
0
Fork 0

installer: parted: Call set-system before set-flags.

Parted 3.5 introduces the following regression:

- partition-set-flag sets the BIOS_GRUB flag. The partition type is set to
PARTITION_BIOS_GRUB_GUID.

- partition-set-system resets the partition type to PARTITION_LINUX_DATA_GUID
undoing what's done by partition-set-flag.

To prevent it, reverse the call order.

Fixes: <https://issues.guix.gnu.org/55549>.

* gnu/installer/parted.scm (mkpart): Call partition-set-system before
partition-set-flag.
Mathieu Othacehe 2022-08-05 08:50:51 +02:00
parent eb0277e7e3
commit 3c381af76a
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 7 additions and 4 deletions

View File

@ -845,15 +845,18 @@ cause them to cross."
(when (and partition-ok? has-name? name)
(partition-set-name partition name))
;; Set flags is required.
;; Both partition-set-system and partition-set-flag calls can affect
;; the partition type. Their order is important, see:
;; https://issues.guix.gnu.org/55549.
(partition-set-system partition filesystem-type)
;; Set flags if required.
(for-each (lambda (flag)
(and (partition-is-flag-available? partition flag)
(partition-set-flag partition flag 1)))
flags)
(and partition-ok?
(partition-set-system partition filesystem-type)
partition))))))
(and partition-ok? partition))))))
;;