Add partprobe before blkid invocation, and use compress-force for btrfs fstab
This commit is contained in:
parent
375825c1e8
commit
fbad0e2184
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue