diff options
Diffstat (limited to 'modules.d/90mgalive/mgalive-root.sh')
-rwxr-xr-x | modules.d/90mgalive/mgalive-root.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules.d/90mgalive/mgalive-root.sh b/modules.d/90mgalive/mgalive-root.sh index dd09be7..10f2cdc 100755 --- a/modules.d/90mgalive/mgalive-root.sh +++ b/modules.d/90mgalive/mgalive-root.sh @@ -94,11 +94,20 @@ if [ $ps -ne 0 ] ; then # If we mount the raw device, we can't then also mount a partition # on that device. So to enable persistence, we need to extend the # first partition to claim the full range of the iso9660 filesystem. + # The loops waiting for udev are to ensure we don't try to mount the + # partition in the small window when udev has removed it but not yet + # re-added it (mga#27638). pe=$(partx -go END $livedev) if [ $ps -eq 1 ] ; then info "Extending $livedev to cover sector 0" delpart $basedev 1 + while [ -e $livedev ] ; do + info "Wait for udev to remove $livedev" + done addpart $basedev 1 0 $pe + while [ ! -e $livedev ] ; do + info "Wait for udev to re-add $livedev" + done else info "$livedev is not a valid protective partition" fi |