From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Ahmad Fatoum Date: Mon, 2 Mar 2020 12:03:55 +0100 Message-Id: <20200302110356.19112-6-a.fatoum@pengutronix.de> In-Reply-To: <20200302110356.19112-1-a.fatoum@pengutronix.de> References: <20200302110356.19112-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Subject: [DistroKit] [PATCH 5/6] datapartition: disable autoformat of non-MBR Linux partitions List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: distrokit-bounces@pengutronix.de Sender: "DistroKit" To: distrokit@pengutronix.de Cc: Ahmad Fatoum 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 --- projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1c1a39612aed..8af8f6cd39ba 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" -- 2.25.0 _______________________________________________ DistroKit mailing list DistroKit@pengutronix.de