LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB problem (https://www.linuxquestions.org/questions/linux-newbie-8/grub-problem-357267/)

Richgene 08-26-2005 12:29 PM

GRUB problem
 
HII,

I am having a very small problem with my RedHat Linux 9.0, recently I upgraded my windows xp sp1 to sp2 , after doing that when i restarted then instead of the GRUB boot loader window , windows xp automatically started and so now I don't have any way to login to linux, I tried to upgrade GRUB loader but it I'm still having the same problem. What should I do?:newbie:

Shaddy 08-26-2005 12:43 PM

Hi,

Windows XP has activated your windows-partition, so your system tries to boot from a partition, where only the windows bootloader is installed. Try booting with a live linux like Knoppix, open a shell and activate your boot partition via fdisk.

For that, go to shell an an edit the partition table of your disk you want to boot from, using the command "fdisk /dev/hda" (if the disk is primary master). if you type "h", you will get help over the given commands. with "p" you'll see the partitions table, and you'll see that your ntfs/fat32 partition is boot-flagged (*). Now type a (for toggle boot flag) and select your windows-partition, "a" again and choose your boot-partition. after that "w" for write and "q" for exit, and that's it. Note: you must be root.

If you done this, grub will be booted, maybe you have to add an entry fpr your windows xp in menu.lst.

Good luck :-)

Shaddy

bigrigdriver 08-26-2005 10:03 PM

Or.

You could try booting from the Install cd, and re-install grub to the MBR from there, after booting into a running version of Linux from CD..

vimal 08-28-2005 12:57 AM

boot from the first cd of your distro:. after that type "linux rescue" at the grub prompt. this will bring the system in rescue mode. after that u will get a shell. now execute the command " grub-install /dev/hdX". change the letter X to a,b,c,d etc.... depending on your hard disk connection. /dev/hda denotes that it is primary master, /dev/hdb denotes it is primary slave etc...
if the prompt returns with no errormessages, exit twice. this will reboot the system and you will have the grub installed. vimal..........

syg00 08-28-2005 02:18 AM

Re: GRUB problem
 
Quote:

Originally posted by Richgene
... I tried to upgrade GRUB loader but it I'm still having the same problem.
?????.
How did you try to upgrade grub - similar to what vimal suggested ???. For a RH user, I agree this is likely to be the best answer.

Shaddy:
Sorry, but only Microsoft boot-loaders are so brain-dead to be as limited as you describe.
Once grub is restored to the MBR, the boot flag is irrelevant for Linux loading. Microsoft still check it, but there are other (brain-dead) checks they do as well.

tinybit 09-11-2005 08:42 AM

Generally GRUB FOR DOS can easily solve the problem.

Get GRUB for DOS at http://freshmeat.net/projects/grub4dos/

Place GRLDR and your menu.lst file in the same directory as NTLDR/BOOT.INI, normally in the root dir of C:, then add a new line to the end of BOOT.INI:

C:\GRLDR="START GRUB"

After rebooting the machine, you can enter GRUB by selecting the "START GRUB" menu item.

Note: NTLDR and BOOT.INI is hidden. You should unhide BOOT.INI first in order for you to edit it.

humble 10-30-2005 11:38 PM


I also seem to have the same problem as Richgene,

When i tried to do what vimal suggested , after typing grub-install /dev/hda , it gave the following error

/sbin/grub not found

What should i do now.

syg00 10-31-2005 04:35 AM

Mmmmm - wonder if a chroot is needed in there.
After the "linux rescue", try "chroot /mnt/sysimage". then the grub-install.

humble 11-02-2005 01:08 AM

Hii,

At last a success, thank you very very much all of u for helping.

But,
Now there is a new problem when i restarted and when the grub was loaded ,there appeared a number of choices,
1. Red Hat Linux (2.4.20-8smp)
2. Red Hat Linux (2.4.20-8bigmem)
3. Red Hat Linux (2.4.20-8BOOT)
4. Red Hat Linux -smp (2.4.20-8smp)
5.DOS

I have the following questions:

1.Out of these which one is my original(before having the grub problem)redhat.
2. how can I get rid of the unnecessary options.
3.When I loaded the first one i.e.Red Hat Linux(2.4.20-8smp), my modem did not work, when I ran kppp, it gave the error “unable to open modem”, what should I do ?
:newbie:

humble 11-03-2005 01:25 AM

still waiting for a reply

tinybit 11-03-2005 01:51 AM

I am not able to answer. I just want to say something other. Your Linux may be too old: 2.4.xx. I think the latest distro will solve all problems.

saikee 11-03-2005 06:20 AM

Red Hat 9 is stable but 2.6 kernal can detect hardware a lot better so upgarding to Fedora Core (Version 4 already) would be a wise move.

humble 11-03-2005 11:46 AM

I forgot to mention that before the grub problem , i was able to connect to the internet using my present modem but it isn't working anymore after i solved the prob.

Is there any other solution (for a newbie) to the above stated problems apart from upgrading?Also tell me that is there any connection between Redhat and Fedora Core . I used to think that they are separate distros:newbie:

saikee 11-03-2005 07:29 PM

I haven't had a need to mess around with modem but knew RH9 isn't easy to configure a network card. I have a router which does not need a driver in XP and Linux.

If your modem worked before then try the other kernels to see if any one can kick start the modem.

Fedora Core is the son of Red Hat. Development is now concentrated on FC. You will recognise it when you install one. Newer kernels have been surprisingly good in detecting the hardware.

humble 11-04-2005 09:40 AM

After solving my GRUB problem , the GRUB loaded giving these OS choices.
1. Red Hat Linux (2.4.20-8smp)
2. Red Hat Linux (2.4.20-8bigmem)
3. Red Hat Linux (2.4.20-8BOOT)
4. Red Hat Linux -smp (2.4.20-8smp)
5.DOS

I have the following questions:

1.Out of these which one is my original(before having the grub problem)redhat.
2. how can I get rid of the unnecessary options.


All times are GMT -5. The time now is 12:03 AM.