/[grub]/grub2/util/i386/pc/grub-install.in
ViewVC logotype

Diff of /grub2/util/i386/pc/grub-install.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by okuji, Tue Jul 26 20:05:47 2005 UTC revision 1.3 by okuji, Sun Aug 7 14:59:56 2005 UTC
# Line 33  pkgdatadir=${datadir}/${PACKAGE_TARNAME} Line 33  pkgdatadir=${datadir}/${PACKAGE_TARNAME}
33  grub_setup=${sbindir}/grub-setup  grub_setup=${sbindir}/grub-setup
34  grub_mkimage=${sbindir}/grub-mkimage  grub_mkimage=${sbindir}/grub-mkimage
35  grub_mkdevicemap=${sbindir}/grub-mkdevicemap  grub_mkdevicemap=${sbindir}/grub-mkdevicemap
36    grub_probefs=${sbindir}/grub-probefs
37  rootdir=  rootdir=
38  grub_prefix=/boot/grub  grub_prefix=/boot/grub
39    modules=
40    
41  install_device=  install_device=
42  no_floppy=  no_floppy=
# Line 51  Install GRUB on your drive. Line 53  Install GRUB on your drive.
53    
54    -h, --help              print this message and exit    -h, --help              print this message and exit
55    -v, --version           print the version information and exit    -v, --version           print the version information and exit
56      --modules=MODULES       pre-load specified modules MODULES
57    --root-directory=DIR    install GRUB images under the directory DIR    --root-directory=DIR    install GRUB images under the directory DIR
58                            instead of the root directory                            instead of the root directory
59    --grub-setup=FILE       use FILE as grub-setup    --grub-setup=FILE       use FILE as grub-setup
60    --grub-mkimage=FILE     use FILE as grub-mkimage    --grub-mkimage=FILE     use FILE as grub-mkimage
61    --grub-mkdevicemap=FILE use FILE as grub-mkdevicemap    --grub-mkdevicemap=FILE use FILE as grub-mkdevicemap
62      --grub-probefs=FILE     use FILE as grub-probefs
63    --no-floppy             do not probe any floppy drive    --no-floppy             do not probe any floppy drive
64    --recheck               probe a device map even if it already exists    --recheck               probe a device map even if it already exists
65    
# Line 78  for option in "$@"; do Line 82  for option in "$@"; do
82      -v | --version)      -v | --version)
83          echo "grub-install (GNU GRUB ${PACKAGE_VERSION})"          echo "grub-install (GNU GRUB ${PACKAGE_VERSION})"
84          exit 0 ;;          exit 0 ;;
85        --modules=*)
86            modules=`echo "$option" | sed 's/--modules=//'` ;;
87      --root-directory=*)      --root-directory=*)
88          rootdir=`echo "$option" | sed 's/--root-directory=//'` ;;          rootdir=`echo "$option" | sed 's/--root-directory=//'` ;;
89      --grub-setup=*)      --grub-setup=*)
# Line 85  for option in "$@"; do Line 91  for option in "$@"; do
91      --grub-mkimage=*)      --grub-mkimage=*)
92          grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;          grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
93      --grub-mkdevicemap=*)      --grub-mkdevicemap=*)
94          grub_setup=`echo "$option" | sed 's/--grub-mkdevicemap=//'` ;;          grub_mkdevicemap=`echo "$option" | sed 's/--grub-mkdevicemap=//'` ;;
95        --grub-probefs=*)
96            grub_probefs=`echo "$option" | sed 's/--grub-probefs=//'` ;;
97      --no-floppy)      --no-floppy)
98          no_floppy="--no-floppy" ;;          no_floppy="--no-floppy" ;;
99      --recheck)      --recheck)
# Line 198  for file in ${pkgdatadir}/*.mod ${pkgdat Line 206  for file in ${pkgdatadir}/*.mod ${pkgdat
206      cp -f $file ${grubdir} || exit 1      cp -f $file ${grubdir} || exit 1
207  done  done
208    
209  # Create the core image.  # Create the core image. First, auto-detect the filesystme module.
210  modules="_chain pc"  fs_module=`$grub_probefs --device-map=${device_map} ${grubdir}`
211  # XXX This must be dynamic. I'm still thinking how to implement this.  if test "x$fs_module" = x -a "x$modules" = x; then
212  modules="$modules fat"      echo "Auto-detection of a filesystem module failed." 1>&2
213        echo "Please specify the module with the option `--modules' explicitly." 1>&2
214        exit 1
215    fi
216    
217    # Typically, _chain and pc are required.
218    modules="$modules $fs_module _chain pc"
219    
220  $grub_mkimage --output=${grubdir}/core.img $modules || exit 1  $grub_mkimage --output=${grubdir}/core.img $modules || exit 1
221    
222  # Now perform the installation.  # Now perform the installation.

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26