Improve loop device setup for enhanced compatibility

This commit is contained in:
baiywt 2025-05-14 11:45:22 +08:00
parent cedcef69e2
commit ff9e781d2c
1 changed files with 1 additions and 3 deletions

View File

@ -644,13 +644,11 @@ PREPARE_IMAGE_SIZE
check_loop_device "$LOOP"
losetup $LOOP ${SDCARD}.raw
losetup -P $LOOP ${SDCARD}.raw
# loop device was grabbed here, unlock
flock -u $FD
partprobe $LOOP
# stage: create fs, mount partitions, create fstab
rm -f $SDCARD/etc/fstab
if [[ -n $rootpart ]]; then