Christian Franke wrote:
This patch allows to run update-grub on Cygwin.
... and here is a simple example for /etc/grub.d/10_cygwin Only adds current OS yet. Christian
diff --git a/util/grub.d/10_cygwin.in b/util/grub.d/10_cygwin.in new file mode 100644 index 0000000..1dd1116 --- /dev/null +++ b/util/grub.d/10_cygwin.in @@ -0,0 +1,48 @@ +#! /bin/sh -e + +# update-grub helper script. +# Copyright (C) 2008 Free Software Foundation, Inc. +# +# GRUB is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GRUB is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GRUB. If not, see <http://www.gnu.org/licenses/>. + + [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ + +grub_probe=${sbindir}/grub-probe + +case "`uname 2>/dev/null`" in + CYGWIN_NT-5.0) OS="Windows 2000" ;; + CYGWIN_NT-5.1) OS="Windows XP" ;; + CYGWIN*) OS="Windows" ;; + *) exit 0 ;; +esac + +[ "$SYSTEMDRIVE" != "" ] || exit 0 + +p="`cygpath -a "$SYSTEMDRIVE"`" + +[ -f "$p"/ntldr ] || exit 0 + +d="`${grub_probe} -t drive "$p" 2>/dev/null`" || exit 0 + +echo "Found $OS on $d" >&2 +cat << EOF +menuentry "$OS" { + root=$d + chainloader +1 +} +EOF +
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel