[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1034814: debian-installer: bootable flag not toggling



Control: reassign -1 partman-partitioning
Control: tags -1 patch

On 30/04/2023 at 16:22, Cyril Brulebois wrote:
Pascal Hambourg <pascal@plouf.fr.eu.org> (2023-04-30):
On 30/04/2023 at 10:16, Matt Taggart wrote:
IMO "hide the bootable option if GPT" (but maybe that is non-trivial).

It should not be too hard. I can work on a patch against
partman-partitioning if the d-i developers agree with this solution.

Trivial patch attached. Sorry for the delay, I was busy on other topics and forgot a bit about this one. Should I open a MR too ?

I'm happy to defer to Steve's expertise and yours on those topics.

I'm no expert on partman, so that means Steve's.
From 2216090668c175fe158c6935122b60aa09474d26 Mon Sep 17 00:00:00 2001
From: Pascal Hambourg <pascal@plouf.fr.eu.org>
Date: Sat, 13 May 2023 12:46:18 +0200
Subject: [PATCH] Hide the "Bootable" option on GPT

On GPT, the boot flag is the same as esp and means the partition
has the EFI type, so showing the Bootable option makes no sense.
Toggling it does not work anyway.

Closes: #1034814
---
 active_partition/toggle_bootable/choices | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/active_partition/toggle_bootable/choices b/active_partition/toggle_bootable/choices
index ed8d8d2..6cfb324 100755
--- a/active_partition/toggle_bootable/choices
+++ b/active_partition/toggle_bootable/choices
@@ -7,6 +7,12 @@ id=$2
 
 cd $dev
 
+open_dialog GET_LABEL_TYPE
+read_line label_type
+close_dialog
+# on GPT, the boot flag means type ESP, so hide the boot option
+[ "$label_type" != gpt ] || exit 0
+
 valid_boot=no
 open_dialog VALID_FLAGS $id
 while { read_line flag; [ "$flag" ]; }; do
-- 
2.30.2


Reply to: