make sure that the user does not have a separate partition for /boot in the script grub-install.

This commit is contained in:
okuji 2000-01-08 08:42:54 +00:00
parent 4ca2160923
commit adcd2008e1
4 changed files with 32 additions and 1 deletions

View file

@ -1,3 +1,13 @@
2000-01-08 OKUJI Yoshinori <okuji@gnu.org>
* util/grub-install.in (grubdir_device): New variable.
If GRUBDIR_DEVICE is not equal to ROOT_DEVICE, print an error
message and exit.
* README: Added a caution about Automake.
* TODO: Updated. Only the things that should be done until 0.6
have one or more exclamations. Things with zero exclamation
will be done after 0.6 unless someone sends a patch for it.
2000-01-05 OKUJI Yoshinori <okuji@gnu.org>
* grub/asmstub.c: Include the header shared.h after including

4
README
View file

@ -50,6 +50,10 @@ the CVS:
an unreleased version from the CVS. See
http://sourceware.cygnus.com/automake/, for more information.
Caution: The recent versions are quite unstable, so check out a rather
old version from the CVS (1999-10-01 works fine, though it has some
non-critical bugs).
See the file INSTALL for instructions on how to build and install the
GRUB data and program files. See the GRUB manual for details about

5
TODO
View file

@ -13,6 +13,11 @@ Priorities:
higher priority.
* Port the script ``grub-install'' to FreeBSD, NetBSD and OpenBSD. At
least you will have to modify the function `convert' so that it can
translate a native device name into the corresponding GRUB drive
representation.
* Add configuration inclusion support by adding a command "include".
* Make symbolic links work for BSD FFS.

View file

@ -197,12 +197,24 @@ fi
# Get the root drive.
# For now, this uses the program `df' to get the device name, but is
# this really portable?
root_device=`df ${grubdir} | grep /dev/ | sed 's%.*\(/dev/[a-z0-9]*\).*%\1%'`
root_device=`df / | grep /dev/ | sed 's%.*\(/dev/[a-z0-9]*\).*%\1%'`
root_drive=`convert $root_device`
if test "x$root_drive" = x; then
exit 1
fi
# Check if the root directory exists in the same device as the grub
# directory.
grubdir_device=`df ${grubdir} | grep /dev/ | sed 's%.*\(/dev/[a-z0-9]*\).*%\1%'`
if test $grubdir_device != $root_device; then
# For now, cannot deal with this situation.
cat <<EOF 1&>2
For now, cannot deal with the situation that $grubdir does not exist
in the root device. Install GRUB manually instead.
EOF
exit 1
fi
# Copy the GRUB images to the GRUB directory.
rm -f ${grubdir}/stage1 ${grubdir}/stage2 ${grubdir}/*stage1_5
cp ${pkgdatadir}/stage1 ${pkgdatadir}/stage2 ${pkgdatadir}/*stage1_5 ${grubdir}