diff options
author | Jybz <j.biernacki@free.fr> | 2024-04-20 22:43:43 +0200 |
---|---|---|
committer | Jybz <j.biernacki@free.fr> | 2024-04-20 22:43:43 +0200 |
commit | e42b25fd7c8aab281e11ac3b1f798534ba4885f7 (patch) | |
tree | d310e61b3702112d30e2a34ec6c0801453aaefb8 /modules.d/90mgalive | |
parent | ecca6a561826c8242c09dd4dfc71e54e769fe6e2 (diff) | |
download | mageia-dracut-conf-e42b25fd7c8aab281e11ac3b1f798534ba4885f7.tar mageia-dracut-conf-e42b25fd7c8aab281e11ac3b1f798534ba4885f7.tar.gz mageia-dracut-conf-e42b25fd7c8aab281e11ac3b1f798534ba4885f7.tar.bz2 mageia-dracut-conf-e42b25fd7c8aab281e11ac3b1f798534ba4885f7.tar.xz mageia-dracut-conf-e42b25fd7c8aab281e11ac3b1f798534ba4885f7.zip |
Updated to ensure udev has re-added the protective partition before trying to mount it (mga#27638).
- origin:
https://svnweb.mageia.org/packages/cauldron/dracut/current/SOURCES/0511-mgalive-A-module-to-mount-Mageia-Live-media.patch?r1=1649975&r2=1653914
- mgalive: ensure udev has re-added the protective partition before trying to mount it (mga#27638)
Diffstat (limited to 'modules.d/90mgalive')
-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 |