Skip to content

Commit 644ac44

Browse files
authored
v8.0
+ DietPi-Imager | When attaching a loop device or changing a partition, sleep for a consistent 0.5 seconds for the changes to be written and detected by the kernel, else partition table or filesystem types may printed as empty strings
1 parent 05e046c commit 644ac44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.meta/dietpi-imager

+3-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
G_EXEC_NOEXIT=1 G_EXEC partprobe "$FP_SOURCE" || return
133133
G_EXEC_NOEXIT=1 G_EXEC partx -u "$FP_SOURCE" || return
134134
G_DIETPI-NOTIFY 0 "Attached the image ($FP_SOURCE_IMG) as loopback device: $FP_SOURCE"
135-
sleep 0.5 # Give the root filesystem a little time to be detected
135+
G_EXEC sleep 0.5 # Give the root filesystem a little time to be detected
136136
fi
137137

138138
Menu_Source_RootFS # Directly open this menu next
@@ -277,6 +277,7 @@
277277
- Root device: $FP_ROOT_DEV
278278
- Via $CLONING_TOOL to $OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT
279279
- With intermediate mounting turned $MOUNT_IT"
280+
G_EXEC sleep 0.5 # Give the root filesystem a little time to be detected
280281
else
281282
local main_menu_choice
282283
Menu_Source_Type
@@ -305,7 +306,7 @@
305306
G_DIETPI-NOTIFY 2 'GPT partition table detected, moving GPT backup partition table to end of drive...'
306307
G_AG_CHECK_INSTALL_PREREQ gdisk
307308
G_EXEC_OUTPUT=1 G_EXEC sgdisk -e "$FP_SOURCE"
308-
G_EXEC sleep 1
309+
G_EXEC sleep 0.5 # Give the root filesystem a little time to be detected
309310
else
310311
G_DIETPI-NOTIFY 1 "Unknown partition table type ($PART_TABLE_TYPE), aborting..."
311312
exit 1

0 commit comments

Comments
 (0)