From b07db07061d2a42f74cc9bad9bcac90b7d75fa70 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Wed, 9 Sep 2020 23:10:07 +0700 Subject: [PATCH] tar2fs: Set UUID in extlinux.conf, if exist extlinux.conf is not tied to the u-boot bootloader and always needed replace Label with the UUID if the file exist. --- bin/tar2fs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/tar2fs b/bin/tar2fs index bb562afe..5ddbb624 100755 --- a/bin/tar2fs +++ b/bin/tar2fs @@ -360,11 +360,13 @@ popd [ -f "$ROOTFS/boot/efi/cmdline.txt" ] && sed -i "s/LABEL=ROOT/$ROOTDEV/" "$ROOTFS/boot/efi/cmdline.txt" +# Update extlinux.conf +[ -f "$ROOTFS/boot/extlinux/extlinux.conf" ] && + sed -i "s/LABEL=ROOT/$ROOTDEV/g" "$ROOTFS/boot/extlinux/extlinux.conf" + # Setup bootloader case "$BOOTLOADER" in uboot) - EXTLINUX_CONF="$ROOTFS/boot/extlinux/extlinux.conf" - sed -i "s/LABEL=ROOT/$ROOTDEV/g" "$EXTLINUX_CONF" parting set "$ROOTPART" boot on ;; lilo)