diff --git a/dracut/anaconda-diskroot b/dracut/anaconda-diskroot index 966bd844886..07958f1180a 100755 --- a/dracut/anaconda-diskroot +++ b/dracut/anaconda-diskroot @@ -52,15 +52,19 @@ debug_msg "Trying to find a root image on the device $dev." # Then do not run again. [ -e "/dev/root" ] && exit 1 -# Skip partitions on a disk with the iso9660 filesystem. Blivet doesn't -# recognize these partitions, so we mount the disk in stage2. However, it -# will fail if one of its partitions is already mounted, for example here. +# Skip partitions on a disk with the iso9660 filesystem, set by LABEL or UUID. +# Blivet doesn't recognize these partitions, so we mount the disk in stage2. +# However, it will fail if one of its partitions is already mounted, for example here. # Therefore, skip the partitions and use the disk to find our root image. # See the bug 1878784. -if dev_is_on_disk_with_iso9660 "$dev"; then - debug_msg "Skipping $dev on a disk with iso9660." - exit 1 -fi +case "$root" in + *"by-label"*|*"by-uuid"*) + if dev_is_on_disk_with_iso9660 "$dev"; then + debug_msg "Skipping $dev on a disk with iso9660." + exit 1 + fi + ;; +esac # If we're waiting for a cdrom kickstart, the user might need to swap discs. # So if this is a CDROM drive, make a note of it, but don't mount it (yet).