File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- version=2.0.10
3
+ version=2.0.11
4
4
5
5
# auto run grub-install if grub detected
6
6
grub_auto=1
@@ -1182,7 +1182,11 @@ Use -U for unattended even if initializing.
1182
1182
dd if=/dev/$src_disk of=/dev/$dst_disk bs=1M count=$count
1183
1183
echo " "
1184
1184
sync
1185
-
1185
+ sleep 1
1186
+ new_id=$( od -A n -t x -N 4 /dev/urandom | tr -d " " )
1187
+ qprintf " x\ni\n0x$new_id \nr\nw\nq\n" | fdisk /dev/$dst_disk > /dev/null
1188
+ sync
1189
+ sleep 1
1186
1190
sfd0=$( sfdisk -d /dev/$src_disk )
1187
1191
if (( force_2 _parts && (n_src_parts > n_image_parts)) )
1188
1192
then
@@ -1213,18 +1217,13 @@ Use -U for unattended even if initializing.
1213
1217
printf " \n====$PGM \n==orig:\n%s\n\n==edited:\n%s\n" \
1214
1218
" $sfd0 " " $sfd1 " >> /tmp/$PGM -fail
1215
1219
printf " \n Resize failed. See /tmp/$PGM -fail.\n\n"
1216
-
1217
- # Don't let dst disk keep source disk ID. Can lead to remounts.
1218
- new_id=$( od -A n -t x -N 4 /dev/urandom | tr -d " " )
1219
- qprintf " x\ni\n0x$new_id \nr\nw\nq\n" | fdisk /dev/$dst_disk > /dev/null
1220
1220
exit 1
1221
1221
fi
1222
1222
done
1223
1223
printf " \n Resize success.\n\n"
1224
+ sync
1224
1225
sleep 2
1225
-
1226
- new_id=$( od -A n -t x -N 4 /dev/urandom | tr -d " " )
1227
- qprintf " x\ni\n0x$new_id \nr\nw\nq\n" | fdisk /dev/$dst_disk > /dev/null
1226
+ partprobe " /dev/$dst_disk "
1228
1227
1229
1228
for (( p = n_image_parts + 1 ; p <= n_src_parts; p++ ))
1230
1229
do
You can’t perform that action at this time.
0 commit comments