aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/initramfs/scripts
diff options
context:
space:
mode:
authorDamian Szuberski <[email protected]>2021-11-13 16:02:50 +0100
committerGitHub <[email protected]>2021-11-13 08:02:50 -0700
commit8ac58c3f567a87cc9b69d89cd18754b5dcf20cfc (patch)
tree12f64710a9b705c8554e98318cdb920c56039c99 /contrib/initramfs/scripts
parentac32854a6eef468441ad5c46100af38bc101e088 (diff)
Fix `zfs:AUTO` autodetection in initramfs scripts
Don't exit early in find_rootfs() when zpool.bootfs is set to `zfs:AUTO`. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12658
Diffstat (limited to 'contrib/initramfs/scripts')
-rw-r--r--contrib/initramfs/scripts/zfs6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs
index ad20eeb49..ccb42ce10 100644
--- a/contrib/initramfs/scripts/zfs
+++ b/contrib/initramfs/scripts/zfs
@@ -79,7 +79,9 @@ find_rootfs()
# If it's already specified, just keep it mounted and exit
# User (kernel command line) must be correct.
- [ -n "${ZFS_BOOTFS}" ] && return 0
+ if [ -n "${ZFS_BOOTFS}" ] && [ "${ZFS_BOOTFS}" != "zfs:AUTO" ]; then
+ return 0
+ fi
# Not set, try to find it in the 'bootfs' property of the pool.
# NOTE: zpool does not support 'get -H -ovalue bootfs'...
@@ -756,7 +758,7 @@ mountroot()
# rpool=rpool (default if none of the above is used)
# root=<pool>/<dataset> (uses this for rpool - first part)
# root=ZFS=<pool>/<dataset> (uses this for rpool - first part, without 'ZFS=')
- # root=zfs:AUTO (tries to detect both pool and rootfs
+ # root=zfs:AUTO (tries to detect both pool and rootfs)
# root=zfs:<pool>/<dataset> (uses this for rpool - first part, without 'zfs:')
#
# Option <dataset> could also be <snapshot>