Skip to content

Instantly share code, notes, and snippets.

@fliiiix
Created December 18, 2013 17:03
Show Gist options
  • Save fliiiix/8025916 to your computer and use it in GitHub Desktop.
Save fliiiix/8025916 to your computer and use it in GitHub Desktop.
case ${BOOT} in
chain)
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
EOF
save_default_entry | grub_add_tab
prepare_grub_to_access_device ${DEVICE} | grub_add_tab
case ${LONGNAME} in
Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
;;
*)
cat << EOF
drivemap -s (hd0) \${root}
EOF
;;
esac
cat <<EOF
chainloader +1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment