3 # update-grub helper script.
4 # Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
6 # GRUB is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # GRUB is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GRUB. If not, see <http://www.gnu.org/licenses/>.
20 exec_prefix
=@exec_prefix@
22 .
${libdir}/grub
/grub-mkconfig_lib
24 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
27 OS
="${GRUB_DISTRIBUTOR} GNU/Hurd"
35 for i
in /boot
/gnumach.gz
/boot
/gnumach
; do
37 basename=`basename $i`
39 rel_dirname
=`make_system_path_relative_to_its_root $dirname`
40 echo "Found GNU Mach: $i" >&2
41 kernel
=${rel_dirname}/${basename}
46 # FIXME: This works for ext2. For other filesystems we might need special-casing
48 *fs
) hurd_fs
="${GRUB_FS}" ;;
49 *) hurd_fs
="${GRUB_FS}fs" ;;
52 for i
in /hurd
/${hurd_fs}.static
/hurd
/exec ; do
53 if test -e "$i" ; then
54 echo "Found Hurd module: $i" >&2
61 if ${at_least_one} ; then : ; else
62 # no hurd here, aborting silently
66 if ${all_of_them} && test -e /lib
/ld.so
.1 ; then : ; else
67 echo "Some Hurd stuff found, but not enough to boot." >&2
74 prepare_grub_to_access_device
${GRUB_DEVICE} |
sed -e "s/^/\t/"
76 multiboot ${kernel} root=device:${GRUB_DEVICE}
77 module /hurd/${hurd_fs}.static --readonly \\
78 --multiboot-command-line='\${kernel-command-line}' \\
79 --host-priv-port='\${host-port}' \\
80 --device-master-port='\${device-port}' \\
81 --exec-server-task='\${exec-task}' -T typed '\${root}' \\
82 '\$(task-create)' '\$(task-resume)'
83 module /lib/ld.so.1 /hurd/exec '\$(exec-task=task-create)'