LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem with GRUB config and relative paths (https://www.linuxquestions.org/questions/linux-software-2/problem-with-grub-config-and-relative-paths-675931/)

a_m0d 10-12-2008 09:55 PM

Problem with GRUB config and relative paths
 
Hi guys,
I have a problem with GRUB. I have a dual boot F8 / Vista on my computer, and I have a seperate partition for /boot. Recently I tried to install LinuxMint on some of the free space on my hard drive, and it stuffed up the boot partition a bit. Thankfully I had backed up the boot partition, because I was worried about this happening, so I copied all the files back onto it again, but now it doesn't seem to work anymore.
When I boot, it drops me straight to a grub prompt, and I have to type in all the commands manually. I have examined all the files on the boot partition, and they all look alright.
The problem is that when I type in the commands manually, I have to type:
Code:

root (hd0,4)
kernel /boot/boot/vmlinuz-2.6.25.14-69.fc8 ro root=LABEL=/ rhgb quiet
initrd /boot/boot/initrd-2.6.25.14-69.fc8.img

instead of
Code:

root (hd0,4)
kernel /vmlinuz-2.6.25.14-69.fc8 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.25.14-69.fc8.img

Any suggestions as to why this might be?
The top set of commands does actually boot linux up, but if I enter this into the grub.conf file, it still doesn't work.
Thanks in advance

syg00 10-12-2008 10:25 PM

Sounds like Mint over-wrote the MBR - this points to the partition that contains the grub stage file (et al). Have you trashed that Mint partition - the grub prompt usually means the stage files can't be found ???.
From the grub prompt run the "root" command pointing to your restored /boot partition, then update the MBR with
Code:

setup (hd0)
Then your updates to the conf should be found.

a_m0d 10-12-2008 10:31 PM

Do you mean that if I have GRUB installed on /dev/sda5 I run
Code:

root (hd0,5)
Mint did stuff up the MBR, and I had to run grub-install to be able to even get to the GRUB prompt again.
Now the only problem is that I seem to have stuffed up the relative paths or something.

a_m0d 10-13-2008 12:22 AM

Solved!
 
Scratch that last post - I worked it out, and now the boot works.
Thanks for your help.
For anyone who is interested, these are the steps that I took to fix this problem:
First of all I checked which partition I had /boot on (all these commands were run at the grub prompt when I booted):
Code:

find /grub/grub.conf
this gives an answer like (hd0,4)
Then I ran the following code:
Code:

root (hd0,4)
setup

Then I rebooted the computer (this can be done by typing reboot at the grub prompt) and it all worked.
Once again, thanks a lot syg00.


All times are GMT -5. The time now is 06:29 AM.