diff --git a/dracut.sh b/dracut.sh index a6d9256604..bbb346970e 100755 --- a/dracut.sh +++ b/dracut.sh @@ -198,8 +198,9 @@ Creates initial ramdisk images for preloading modules necessary network drivers. --persistent-policy [POLICY] Use [POLICY] to address disks and partitions. - POLICY can be any directory name found in /dev/disk. - E.g. "by-uuid", "by-label" + POLICY can be any directory name found in /dev/disk + (e.g. "by-uuid", "by-label"), or "mapper" to use + /dev/mapper device names (default). --fstab Use /etc/fstab to determine the root device. --add-fstab [FILE] Add file to the initramfs fstab. --mount "[DEV] [MP] [FSTYPE] [FSOPTS]" @@ -1301,6 +1302,13 @@ else exit 1 fi +if [[ $persistent_policy == "mapper" ]]; then + unset persistent_policy +elif [[ -n $persistent_policy && ! -d "/dev/disk/${persistent_policy}" ]]; then + dwarn "Invalid persistent policy, your system does not have a /dev/disk/${persistent_policy} directory." + unset persistent_policy +fi + if [[ $enhanced_cpio == "yes" ]]; then enhanced_cpio="$dracutbasedir/dracut-cpio" if [[ -x $enhanced_cpio ]]; then diff --git a/man/dracut.8.asc b/man/dracut.8.asc index d9a4b8daf5..5c2b147ab2 100644 --- a/man/dracut.8.asc +++ b/man/dracut.8.asc @@ -391,8 +391,8 @@ Default: **--persistent-policy** __:: Use __ to address disks and partitions. - __ can be any directory name found in /dev/disk. - E.g. "by-uuid", "by-label" + __ can be any directory name found in /dev/disk (e.g. "by-uuid", + "by-label"), or "mapper" to use /dev/mapper device names (default). **--fstab**:: Use _/etc/fstab_ instead of _/proc/self/mountinfo_. diff --git a/man/dracut.conf.5.asc b/man/dracut.conf.5.asc index 45192fa0c4..dbeaf4d879 100644 --- a/man/dracut.conf.5.asc +++ b/man/dracut.conf.5.asc @@ -142,8 +142,8 @@ Configuration files must have the extension .conf; other extensions are ignored. *persistent_policy=*"____":: Use __ to address disks and partitions. - __ can be any directory name found in /dev/disk. - E.g. "by-uuid", "by-label" + __ can be any directory name found in /dev/disk (e.g. "by-uuid", + "by-label"), or "mapper" to use /dev/mapper device names (default=mapper). *tmpdir=*"____":: Specify temporary directory to use.