~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to util/i386/pc/grub-install.in

  • Committer: Bazaar Package Importer
  • Author(s): Robert Millan
  • Date: 2007-11-01 13:18:51 UTC
  • mto: (17.3.1 squeeze) (1.9.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: james.westby@ubuntu.com-20071101131851-63uqsb4dax2h1cbm
Tags: upstream-1.95+20071101
ImportĀ upstreamĀ versionĀ 1.95+20071101

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
 
3
3
# Install GRUB on your drive.
4
 
# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
 
4
# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007  Free Software Foundation, Inc.
5
5
#
6
 
# This file is free software; you can redistribute it and/or modify it
7
 
# under the terms of the GNU General Public License as published by
8
 
# the Free Software Foundation; either version 2 of the License, or
 
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
9
# (at your option) any later version.
10
10
#
11
 
# This program is distributed in the hope that it will be useful, but
12
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 
# General Public License for more details.
 
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.
15
15
#
16
16
# You should have received a copy of the GNU General Public License
17
 
# along with this program; if not, write to the Free Software
18
 
# Foundation, Inc., 51 Franklin St - Suite 330, Boston, MA 02110, USA.
 
17
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
19
18
 
20
19
# Initialize some variables.
21
20
transform="@program_transform_name@"
46
45
recheck=no
47
46
debug=no
48
47
 
 
48
# for make_system_path_relative_to_its_root()
 
49
. ${libdir}/grub/update-grub_lib
 
50
 
49
51
# Usage: usage
50
52
# Print the usage.
51
53
usage () {
216
218
    exit 1
217
219
fi
218
220
 
219
 
# Then the partition map module.
220
 
partmap_module=`$grub_probe --target=partmap --device-map=${device_map} ${grubdir}`
221
 
if test "x$partmap_module" = x -a "x$modules" = x; then
222
 
    echo "Auto-detection of a partition map module failed." 1>&2
223
 
    echo "Please specify the module with the option \`--modules' explicitly." 1>&2
224
 
    exit 1
225
 
fi
 
221
# Then the partition map module.  In order to support partition-less media,
 
222
# this command is allowed to fail (--target=fs already grants us that the
 
223
# filesystem will be accessible).
 
224
partmap_module=`$grub_probe --target=partmap --device-map=${device_map} ${grubdir} 2> /dev/null`
226
225
 
227
226
# _chain is often useful
228
 
modules="$modules $fs_module $partmap_module _chain"
 
227
modules="$modules $fs_module $partmap_module biosdisk _chain"
229
228
 
230
 
$grub_mkimage --output=${grubdir}/core.img $modules || exit 1
 
229
$grub_mkimage --output=${grubdir}/core.img --prefix=`make_system_path_relative_to_its_root ${grubdir}` $modules || exit 1
231
230
 
232
231
# Now perform the installation.
233
232
$grub_setup --directory=${grubdir} --device-map=${device_map} \