[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grub-0.5.96.1 on x86 debian-linux: grub-install /dev/fd0 error
From: |
Erik Schoenfelder |
Subject: |
grub-0.5.96.1 on x86 debian-linux: grub-install /dev/fd0 error |
Date: |
Mon, 6 Nov 2000 14:23:12 +0100 |
Hi,
platform is a debian linux based installation on intel hardware.
grub version is `grub (GNU GRUB 0.5.96.1)'. invoking `grub-install /dev/fd0'
shows the following output:
> address@hidden:/root 11 # grub-install /dev/fd0
> Probing devices to guess BIOS drives. This may take a long time.
> /usr/local/sbin/grub-install: -e: command not found
> /usr/local/sbin/grub-install: -e: command not found
> expr: non-numeric argument
> /usr/local/sbin/grub-install: -e: command not found
> /usr/local/sbin/grub-install: -e: command not found
>
> GRUB version 0.5.96.1 (640K lower / 3072K upper memory)
> [...]
the shell in use is `GNU bash, version 2.03.0(1)-release
(i386-pc-linux-gnu)'.
1)
the `-e: command not found' comes from multiline sed
arguments. a possible fix would be:
--- util/grub-install.in-dist Mon Oct 16 16:42:36 2000
+++ util/grub-install.in Sun Nov 5 13:30:31 2000
@@ -76,9 +76,9 @@
# Break the device name into the disk part and the partition part.
case "$host_os" in
linux*)
- tmp_disk=`echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%'
+ tmp_disk=`echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \
-e 's%/part[0-9]*$%/disc%'`
- tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%'
+ tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \
-e 's%.*/\(disc\|part\([0-9]*\)\)$%\2%'`
;;
gnu*)
2)
the `expr: non-numeric argument' seems to happen when the
/dev/fd0 should be convert()'ed.
the output running this with sh -x shows:
> [...]
> ++ tmp_part=/dev/fd0
> grep -v '^#' $device_map | grep "$tmp_disk *$" | sed
's%.*\(([hf]d[0-9][a-g0-9,]*)\).*%\1%'
> +++ grep -v '^#' /boot/grub/device.map
> +++ grep '/dev/fd0 *$'
> +++ sed 's%.*\(([hf]d[0-9][a-g0-9,]*)\).*%\1%'
> ++ tmp_drive=(fd0)
> ++ test 'x(fd0)' = x
> ++ test x/dev/fd0 '!=' x
> ++ echo '(fd0)'
> expr $tmp_part - 1
> +++ expr /dev/fd0 - 1
> expr: non-numeric argument
> ++ sed 's%)$%,)%'
> + install_drive=(fd0,)
> + test 'x(fd0,)' = x
maybe this diff shows a way to fix this without breaking
conversion of disk devices by adding another case for fdx:
--- util/grub-install.in-dist Mon Oct 16 16:42:36 2000
+++ util/grub-install.in Sun Nov 5 14:18:11 2000
@@ -76,9 +76,11 @@
# Break the device name into the disk part and the partition part.
case "$host_os" in
linux*)
- tmp_disk=`echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%'
+ tmp_disk=`echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \
+ -e 's%.*/\(fd[0-9]*\)$%\1%' \
-e 's%/part[0-9]*$%/disc%'`
- tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%'
+ tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \
+ -e 's%.*/fd[0-9]*$%%' \
-e 's%.*/\(disc\|part\([0-9]*\)\)$%\2%'`
;;
gnu*)
please note, this seems to work for /dev/fd0 on linux, but is
untested for other cases and therefore only a guess.
another fix would be removing /dev/fd0 as possible argument to
grub-install forcing the user to pass '(fd0)' as argument :-)
anyway, thanks in advance,
Erik
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grub-0.5.96.1 on x86 debian-linux: grub-install /dev/fd0 error,
Erik Schoenfelder <=