Skip to content

Commit

Permalink
initramfs: Make mountpoint=none work
Browse files Browse the repository at this point in the history
In initramfs, mount.zfs fails to mount a dataset with mountpoint=none,
but mount.zfs -o zfsutil works.  Use -o zfsutil when mountpoint=none.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes openzfs#14455
  • Loading branch information
Ryan Moeller committed Feb 6, 2023
1 parent 6695368 commit eb823cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contrib/initramfs/scripts/zfs
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,11 @@ mount_fs()
# isn't the root fs.
return 0
fi
ZFS_CMD="mount.zfs"
# Last hail-mary: Hope 'rootmnt' is set!
mountpoint=""
if [ "$mountpoint" = "legacy" ]; then
ZFS_CMD="mount.zfs"
fi
else
mountpoint="$mountpoint1"
fi
Expand Down

0 comments on commit eb823cb

Please sign in to comment.