summaryrefslogtreecommitdiffstats
path: root/projectroot/usr
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-03-02 12:03:55 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2020-03-05 18:27:07 +0100
commitf2ef6f09ce1af63587cebaea120bb0a102879843 (patch)
treea35a3b428a259e7c6c7cd6ac494911540f5b3e86 /projectroot/usr
parentdeaccfb515e0a6f20664457b95f9ca7abd16855b (diff)
downloadDistroKit-f2ef6f09ce1af63587cebaea120bb0a102879843.tar.gz
DistroKit-f2ef6f09ce1af63587cebaea120bb0a102879843.tar.xz
datapartition: disable autoformat of non-MBR Linux partitions
The upcoming STM32MP157C-DK2 board will be the first DistroKit board with a GPT based image and it has barebox as partition 3, unlike the other boards where this is always the data partition. This causes the data partition rule to brick the image by overwriting barebox. As a temporary measure, disable the data partition auto formatting on GPT-images by explicitly checking for partition type 0x83 before starting the service. Eventually we might want to match against a UUID before autoformatting, or create the partition anew altogether. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Diffstat (limited to 'projectroot/usr')
-rw-r--r--projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules b/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules
index 1c1a396..8af8f6c 100644
--- a/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules
+++ b/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules
@@ -1,5 +1,5 @@
ACTION!="add", GOTO="systemd-autoformat-ext4-devices_end"
SUBSYSTEM!="block", GOTO="systemd-autoformat-ext4-devices_end"
-ENV{ID_FS_USAGE}!="filesystem", SUBSYSTEMS=="mmc", KERNEL=="mmcblk0p3", ENV{ID_FS_TYPE}!="ext4", ENV{SYSTEMD_WANTS}+="systemd-autoformat@$name.service"
+ENV{ID_FS_USAGE}!="filesystem", SUBSYSTEMS=="mmc", KERNEL=="mmcblk0p3", ENV{ID_PART_ENTRY_TYPE}=="0x83", ENV{ID_FS_TYPE}!="ext4", ENV{SYSTEMD_WANTS}+="systemd-autoformat@$name.service"
LABEL="systemd-autoformat-ext4-devices_end"