You are not logged in.

#1 2006-01-09 04:14:19

xaos5
Member
Registered: 2005-12-30
Posts: 75

grub not finding config file

I had to reinstall grub due to another operating system overwriting it. I did so by this command:

grub-install --root-directory=/boot hd0

This worked but grub comes up with its command line and I have to enter:

configfile /grub/menu.lst

whats causing grub to not find this file?

if it helps:
hda1 = /boot
hda2 = swap
hda3 = /
hda4 = ntfs

Offline

#2 2006-01-09 04:19:26

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: grub not finding config file

Not sure about this, but maybe

--root-directory=/boot

is making Grub think it needs to look for the config file in /boot/grub/menu.lst?

I suggest installing grub like this:

$ grub

    GNU GRUB  version 0.97  (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... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
succeeded
 Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,5)/grub/stage2 /grub/menu
.lst"... succeeded
Done.

grub> quit

Offline

#3 2006-01-09 04:41:45

xaos5
Member
Registered: 2005-12-30
Posts: 75

Re: grub not finding config file

i'm pretty sure I tryed it that way to, but I'll try again.

grub> root (hd0,
 Possible partitions are:
   Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 1,  Filesystem type unknown, partition type 0x82
   Partition num: 2,  Filesystem type is reiserfs, partition type 0x83
   Partition num: 3,  Filesystem type unknown, partition type 0x7

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

grub> setup (hd0,0)
 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,0)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd0,0) /boot/grub/stage2 p /boot/grub/menu
.lst "... succeeded
Done.

rebooting now

edit: nope, still the same thing.

edit2: I think while I was trying to install grub before I might have installed it to the mbr but I'm not sure as i'm no grub guru. I think it might be booting from the mbr instead of /dev/hda1 (hd0,0). Is there anyway to check this?

Offline

#4 2006-01-09 04:53:56

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: grub not finding config file

Hm.... that setup() line should have been setup(hd0), shouldn't have it?  Meh, guess it doesn't matter.

edit:  Oh, you want it installed to hd0,0.  Very good then. tongue  Not sure how to check what's installed on your MBR though..

Offline

#5 2006-01-09 05:01:56

xaos5
Member
Registered: 2005-12-30
Posts: 75

Re: grub not finding config file

Cerebral wrote:

Hm.... that setup() line should have been setup(hd0), shouldn't have it?  Meh, guess it doesn't matter.

edit:  Oh, you want it installed to hd0,0.  Very good then. tongue  Not sure how to check what's installed on your MBR though..

setup (hd0) didn't make a difference, it still did the same thing. hmmm I wonder why grub isn't finding menu.lst

Offline

#6 2006-01-10 03:21:35

xaos5
Member
Registered: 2005-12-30
Posts: 75

Re: grub not finding config file

ok I finally solved the problem. First off grub will only look for menu.lst in /boot/grub/menu.lst and nowhere else unless you modify it. For some reason my default grub stuff was installed to: /boot/grub/menu.lst which was why I was confused. Grub seen /dev/hda1 as / where my /etc/fstab specifics it in /boot. So my menu.lst file needed to be in /boot/boot/grub/menu.lst if that makes any sense.
Arch must install grub differently then documented ways to install it or something because I was just trying to reinstall grub with existing files.

Offline

Board footer

Powered by FluxBB