From fca88467f90ca57140a7504258e95ec52cac9b96 Mon Sep 17 00:00:00 2001 From: rafael Date: Thu, 12 Sep 2024 08:46:27 +0200 Subject: [PATCH] re-instantiates LVM required devices. --- extensions/lvm.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extensions/lvm.sh b/extensions/lvm.sh index fad48294fa69..9500d8eeef9f 100644 --- a/extensions/lvm.sh +++ b/extensions/lvm.sh @@ -71,6 +71,13 @@ function post_create_partitions__setup_lvm() { } function prepare_root_device__create_volume_group() { + + LOOP=$(losetup -f) + [[ -z $LOOP ]] && exit_with_error "Unable to find free loop device" + check_loop_device "$LOOP" + losetup $LOOP ${SDCARD}.raw + partprobe $LOOP + display_alert "Using LVM root" "${EXTENSION}" "info" vgscan vgchange -a y ${LVM_VG_NAME}