Skip to content

Commit 928c5e7

Browse files
committed
DLPX-93019 24.04: grub config contains the wrong root pool reference
PR URL: https://www.github.com/delphix/grub2/pull/41
1 parent a89970c commit 928c5e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

util/grub.d/10_linux_zfs.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -998,15 +998,15 @@ echo
998998
fi
999999
fi
10001000

1001-
root=$(findmnt / | grep '^/' | awk '{print $2}' | sed 's@^[^/]*/@@')
1001+
root=$(findmnt -n / | awk '{print $2}')
10021002
case "${section}" in
10031003
main)
10041004
title="${name}"
10051005
main_dataset_name="${name}"
10061006
main_dataset="${dataset}"
10071007

10081008
kernel_version=$(basename "${kernel}" | sed -e "s,^[^0-9]*-,,g")
1009-
zfs_linux_entry 0 "${title}" "simple" "rpool/${root}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
1009+
zfs_linux_entry 0 "${title}" "simple" "${root}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
10101010
at_least_one_entry=1
10111011
;;
10121012
advanced)
@@ -1022,12 +1022,12 @@ echo
10221022

10231023
kernel_version=$(basename "${kernel}" | sed -e "s,^[^0-9]*-,,g")
10241024
title="$(gettext_printf "%s%s, with Linux %s" "${last_booted_kernel_marker}" "${name}" "${kernel_version}")"
1025-
zfs_linux_entry 1 "${title}" "advanced" "rpool/${root}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
1025+
zfs_linux_entry 1 "${title}" "advanced" "${root}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
10261026

10271027
GRUB_DISABLE_RECOVERY=${GRUB_DISABLE_RECOVERY:-}
10281028
if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
10291029
title="$(gettext_printf "%s%s, with Linux %s (%s)" "${last_booted_kernel_marker}" "${name}" "${kernel_version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
1030-
zfs_linux_entry 1 "${title}" "recovery" "rpool/${root}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
1030+
zfs_linux_entry 1 "${title}" "recovery" "${root}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
10311031
fi
10321032
at_least_one_entry=1
10331033
;;

0 commit comments

Comments
 (0)