From fbad0e21842aec96a2706f7efaa6b5de69c8df9b Mon Sep 17 00:00:00 2001 From: oddlama Date: Fri, 6 Nov 2020 18:58:15 +0100 Subject: [PATCH] Add partprobe before blkid invocation, and use compress-force for btrfs fstab --- scripts/internal_config.sh | 2 +- scripts/utils.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/internal_config.sh b/scripts/internal_config.sh index 2abca09..06e716b 100644 --- a/scripts/internal_config.sh +++ b/scripts/internal_config.sh @@ -302,7 +302,7 @@ create_default_disk_layout() { if [[ $root_fs == "btrfs" ]]; then DISK_ID_ROOT_TYPE="btrfs" - DISK_ID_ROOT_MOUNT_OPTS="defaults,noatime,compress=zstd,subvol=/root" + DISK_ID_ROOT_MOUNT_OPTS="defaults,noatime,compress-force=zstd,subvol=/root" elif [[ $root_fs == "btrfs" ]]; then DISK_ID_ROOT_TYPE="ext4" DISK_ID_ROOT_MOUNT_OPTS="defaults,noatime,errors=remount-ro,discard" diff --git a/scripts/utils.sh b/scripts/utils.sh index 0a4d1bc..946c79f 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -121,6 +121,7 @@ get_blkid_field_by_device() { local device="$2" blkid -g \ || die "Error while executing blkid -g" + partprobe local val val="$(blkid -o export "$device")" \ || die "Error while executing blkid '$device'" @@ -141,6 +142,7 @@ get_device_by_blkid_field() { local field_value="$2" blkid -g \ || die "Error while executing blkid -g" + partprobe local dev dev="$(blkid -o export -t "$blkid_field=$field_value")" \ || die "Error while executing blkid to find $blkid_field=$field_value"