bug-grub
[Top][All Lists]
Advanced

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

grub 0.91 - setup passes invalid path to install


From: David Wisti
Subject: grub 0.91 - setup passes invalid path to install
Date: Tue, 22 Oct 2002 10:51:33 -0700 (PDT)

Hello

The GRUB setup command does not correctly configure
GRUB to automatically display the menu upon boot. 
Using GRUB version 0.91, as reported by grub
--version, the path to the users grub.conf file is not
passed to the "install" command correctly.  I have
attached a log output from my execution of the grub
command to the end of this email.

I looked through the GRUB manual and the FAQ and I
didn't find anything related to my problem with the
setup command.

I was testing a bare-metal recovery of my RedHat 7.3
system which runs on an HP Pavilion 8160 with an
Adaptec 2930CU SCSI card and a Seagate 9GB SCSI drive
and an IDE CD-ROM.  /dev/sda1 contains the /boot
partition and is where grub is located.  /dev/sda5 is
the root "/" partition.  /dev/sda2 is /usr, /dev/sda3
is /home and /dev/sda6 is /var.

After partitioning the drive and restoring the
filesystems, I needed to restore the MBR on the SCSI
disk.  I ran the following command (which I now know
to be deprecated):

grub-install /dev/sda

I rebooted and was presented with the grub> prompt
instead of the menu that used to be present.  I knew I
had a valid grub.conf file because it worked prior to
the restore and was created by the RedHat 7.3
installer and I did not modify it.

After doing some more reading, I found that the GRUB
manual suggests running grub and using the "root" and
"setup" commands.  I entered the following commands
into grub:

root (hd0,0)
setup (hd0)
quit

I rebooted and was presented with the grub> prompt.

I looked at the commands that setup was running and
the last parameter to install, real_config_file, is
incorrect.  setup uses "/boot/grub/grub.conf" for the
real_config_file parameter, but running "cat
/boot/grub/grub.conf" returns "Error 15: File not
found".

Configuring grub by re-running "install" manually and
only changing the last parameter, real_config_file, to
"/grub/grub.conf" fixed my problem.

The menu is now automatically displayed when the
system boots.

There are actually two bugs described in this report
(in my mind anyway).

One: The setup command didn't work correctly since it
didn't pass the correct argument to install.

Two: The install command should issue a warning if it
cannot read the config_file or real_config_file.

Thanks.
--
    GRUB  version 0.91  (640K lower / 3072K upper
memory)

 [ Minimal BASH-like line editing is supported.  For
the first word, TAB
   lists possible command completions.  Anywhere else
TAB lists the possible
   completions of a device/filename. ]

grub> root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  22
sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 d (hd0) (hd0)1+22
p (hd0,0)/boot/grub/stage
2 /boot/grub/grub.conf"... succeeded
Done.

grub> cat /boot/grub/grub.conf

Error 15: File not found

grub> cat /grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making
changes to this file
# NOTICE:  You have a /boot partition.  This means
that
#          all kernel and initrd paths are relative to
/boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda5
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-3)
        root (hd0,0)
        kernel /vmlinuz-2.4.18-3 ro root=/dev/sda5
        initrd /initrd-2.4.18-3.img

grub> install /boot/grub/stage1 d (hd0) (hd0)1+22 p
(hd0,0)/boot/grub/stage2 /grub/grub.conf

grub> quit




__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/




reply via email to

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