On 02/09/2025 at 05:42, [email protected] wrote:

Please see the revised patch below.
(...)
+    # But writing at offset 8K will trample upon GPT.
+    if [ "$wroff" = "8K" ] || [ "$disable8k" = "y" ]; then
+        if printf 'EFI PART' | cmp -s -i 0:512 -n 8 - "$DEV"; then
+            echo >&2 "$0: device/image ($DEV) uses GUID partition table, would 
overwrite it"
+            exit 1

Should the combination of GPT + boot loader found at offset 8KiB really be a blocker here ? I see two cases: - GPT and boot loader overlap (e.g. standard GPT), the primary GPT is invalid, partitioning tools would rewrite it from the backup GPT and overwrite the boot loader. - GPT and boot loader do not overlap (non-standard GPT, e.g. partition entries <= 56 or primary GPT at offset ~1MiB).
So IMO 'eGON.BT0' can safely be deleted in both cases.

Reply via email to