bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: impossible to install off-system ?


From: Oskar Schirmer
Subject: Re: impossible to install off-system ?
Date: Tue, 27 May 2003 11:03:46 +0200
User-agent: Mutt/1.3.22.1i

Hi Yoshinoro, hi Pádraig,

thanks for Your hints on how to install grub off-system.
Finally I found, the problem is that there are no grub
binaries on my working station. So I patched grub (see
below) to find its binaries on the target device.
Now it works.

The patch just introduces the option --prefix=...
to let grub find all it's stuff from another prefix path.
This allows to say, e.g.:
  ... --prefix=/mnt/cflash/usr ...

Sorry, no patch for the info-thing, don't know how.

Thanks a lot,
  Oskar
-- 
oskar schirmer, emlix gmbh, http://www.emlix.com, mailto:address@hidden
fon +49 551 37000-37, fax -38, keplerstraße 24, 37085 göttingen, germany

emlix - your embedded linux partner


--- snip snap ---



Index: grub-0.93/util/grub-install.in
diff -u grub-0.93/util/grub-install.in:1.1.1.2 
grub-0.93/util/grub-install.in:1.1.1.2.4.1
--- grub-0.93/util/grub-install.in:1.1.1.2      Mon May 20 13:21:50 2002
+++ grub-0.93/util/grub-install.in      Thu May 22 14:28:05 2003
@@ -18,18 +18,21 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 # Initialize some variables.
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
-pkgdatadir=${datadir}/${PACKAGE}/${host_cpu}-${host_vendor}
+init_vars () { # prefix
+    prefix=$1
+    address@hidden@
+    address@hidden@
+    address@hidden@
+    address@hidden@
+    address@hidden@
+    address@hidden@
+    address@hidden@
+    address@hidden@
+    pkgdatadir=${datadir}/${PACKAGE}/${host_cpu}-${host_vendor}
+    grub_shell=${sbindir}/grub
+}
 
-grub_shell=${sbindir}/grub
+init_vars @prefix@
 log_file=/tmp/grub-install.log.$$
 img_file=/tmp/grub-install.img.$$
 rootdir=
@@ -63,6 +66,7 @@
   -v, --version           print the version information and exit
   --root-directory=DIR    install GRUB images under the directory DIR
                           instead of the root directory
+  --prefix=DIR            use DIR as general tool prefix
   --grub-shell=FILE       use FILE as the grub shell
   --force-lba             force GRUB to use LBA mode even for a buggy
                           BIOS
@@ -219,6 +223,9 @@
        exit 0 ;;
     --root-directory=*)
        rootdir=`echo "$option" | sed 's/--root-directory=//'` ;;
+    --prefix=*)
+       set -- `echo "$option" | sed 's/--prefix=//'`
+       init_vars $1 ;;
     --grub-shell=*)
        grub_shell=`echo "$option" | sed 's/--grub-shell=//'` ;;
     --force-lba)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]