aboutsummaryrefslogtreecommitdiff
diff options
from:
to:
context:
space:
mode:
authorGravatar Neal Gompa <ngompa@fedoraproject.org> 2025-02-20 14:46:28 -0500
committerGravatar Neal Gompa <ngompa@fedoraproject.org> 2025-02-20 14:46:28 -0500
commitfcdcd34d509bc1daf38559c802d8b45680fddaec (patch)
treee151d00d3a7d7b8d9445ded887a5d6b83ddde946
parent5844c5c608909fce25b94ce9d74e3f405a49fb3b (diff)
downloadkiwi-descriptions-fcdcd34d509bc1daf38559c802d8b45680fddaec.tar.gz
kiwi-descriptions-fcdcd34d509bc1daf38559c802d8b45680fddaec.zip
components/boot, teams/server: Add partitioning hack for the Raspberry Pi 3
The Raspberry Pi 3 does not recognize a FAT filesystem marked with the 0xef type, so until we drop support for this device, hack the partition manually to use a legacy FAT filesystem partition type.
-rw-r--r--components/boot.xml2
-rwxr-xr-xeditbootinstall_rpilegacy.sh17
-rw-r--r--teams/server.xml2
3 files changed, 19 insertions, 2 deletions
diff --git a/components/boot.xml b/components/boot.xml
index 4b7db8e..0d59f5e 100644
--- a/components/boot.xml
+++ b/components/boot.xml
@@ -29,7 +29,7 @@
<preferences profiles="BootDiskCore" arch="aarch64">
<type image="oem"
filesystem="btrfs" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" fsmountoptions="x-systemd.growfs,compress=zstd:1"
- kernelcmdline="rhgb quiet" devicepersistency="by-uuid" force_mbr="true"
+ kernelcmdline="rhgb quiet" devicepersistency="by-uuid" force_mbr="true" editbootinstall="editbootinstall_rpilegacy.sh"
bootpartition="true" bootpartsize="1024" bootfilesystem="ext4" efipartsize="500" firmware="uefi"
rootfs_label="fedora"
>
diff --git a/editbootinstall_rpilegacy.sh b/editbootinstall_rpilegacy.sh
new file mode 100755
index 0000000..dfa178f
--- /dev/null
+++ b/editbootinstall_rpilegacy.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+set -euxo pipefail
+
+diskname=$1
+devname="$2"
+loopname="${devname%*p?}"
+loopdev=/dev/${loopname#/dev/*}
+
+#==========================================
+# Force the ESP to use legacy MBR identifier
+#------------------------------------------
+#
+# Raspberry Pi 3 and older systems don't handle
+# the 0xef partition type for the ESP, so switch
+# to the legacy one.
+#
+sfdisk --change-id ${loopdev} 1 6
diff --git a/teams/server.xml b/teams/server.xml
index a892f34..0413e5a 100644
--- a/teams/server.xml
+++ b/teams/server.xml
@@ -110,7 +110,7 @@
<preferences profiles="ServerDisk" arch="aarch64">
<type image="oem"
filesystem="xfs"
- devicepersistency="by-uuid" force_mbr="true"
+ devicepersistency="by-uuid" force_mbr="true" editbootinstall="editbootinstall_rpilegacy.sh"
bootpartition="true" bootpartsize="1000" bootfilesystem="ext4" efipartsize="500" firmware="uefi"
rootfs_label="fedora"
>