LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   help me to rescue my grub on x86 system with dual boot (https://www.linuxquestions.org/questions/linux-software-2/help-me-to-rescue-my-grub-on-x86-system-with-dual-boot-512246/)

adityakumar 12-20-2006 09:00 AM

help me to rescue my grub on x86 system with dual boot
 
I am using redhat linux and win xp and i ran with problems so want to reinstall my xp but i know that will erase my MBR preventing my linux OS to boot and the bootloader is grub any one give me a right answer
to solve this problem

titopoquito 12-20-2006 09:17 AM

I recently created a bootable CD with grub on it for me, following this article: http://www.pro-linux.de/news/2005/7752.html . It's in German, but the commands should be no problem. If you want to do it this way be sure about the parentheses () that are in some lines not completed. The mkisofs line is wrong, too I think. I used

Code:

mkisofs -R -b iso/boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso iso
from the directory right above "iso". It works nicely without a problem for me.

saikee 12-20-2006 09:27 AM

What do you want?

Choice #1 - If you restore Windows MBR you let Windows to boot up its own and no LInux. You can then ask XP's NTLDR to dual boot Linux.

Choice #2 - If you restore Grub it can dual boot both Linux and XP.

Workwise you will need to do 10 times more work to get the 1/10 of the Choice #2 result by going with the first Choice #1.

Take a look at the last link of my signature and then decide.

You can use a Linux Live CD, anyone will do, to get inside Red Hat to sort out Grub. It is a job of just a few minutes and you can make Grub sing and dance.

------------------
titopoquito is asking you to make a bootable Grub CD.

The Grab Manual, which can be Googled, has documented methods to put Grub in a floppy and in a CD and it is in English. Titopoquito's suggestion is inside there.

Take it from me there is no PC system that a Grub floppy or CD cannot boot. Get yourself some tools and fire up the two systems.

adityakumar 12-20-2006 09:37 AM

friend this is not working for me
cp: cannot stat `/lib/grub/i386-pc/stage2_eltorito': No such file or directory
giving above error

saikee 12-20-2006 09:46 AM

Read the Grub Manual and try to understand you only need to burn "ONE" file into a bootable Grub CD.

If that is hard then follow Chapter 3.1 of Grub Manual to make a Grub floppy. It is just a copying of "TWO" files using dd.

You can "source" the stage2_eltorito (for making Grub CD) and Stage1 and Stage2 files (for Grub floppy) in any Live CD that has Grub. These files are inside your Red Hat too.

How to find them? How about asking a Linux to do some leg work for you by
Code:

find / -name Stage1

adityakumar 12-20-2006 10:05 AM

this solved my problem thanq u

adityakumar 12-20-2006 10:06 AM

plz tell me how to make the bootable grub cd

saikee 12-20-2006 10:44 AM

You want to be taken by the hand? OK

Method 1 : If you Google "Grub Manual" you will see the steps are fully documented in Chapter 3.1

Method 2 : A text book called “Linux in a Nutshell” by Siever, Figgins and Webber also describes the steps in detail in its Chapter 4.

Method 3 : Off my head the steps are

(a) You boot up a Live CD that has Grub inside, say Ubuntu, Puppy, Mepis, Linxu rescue CD, Mandriva...
(b) You give a command to Linux to demand it to report back to you where the hell has it hidden the Stage1 file you after by
Code:

find / -name stage1
(c) You then change directory into it, slip a floppy into the drive (no need to format) and type out the following command
Code:

dd if=stage1 of=/dev/fd0 bs=512 count=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1

(d) You go to the bank and open a desposit box to lock up this floppy which is the most lethal weapon in booting. There is no PC system this floppy cannot boot.

If you want to try this weapon on your XP, which I don't have a clue where it is installed but say it is at the usual place of the first partition of your first hard disk then these lines on booting up a Grub floppy (in a Grub prompt) will fire its asx up
Code:

root (hd0,0)
chainloader +1
boot

If your Red Hat is in the second partition and its Grub menu is working then it will answer this call in a Grub prompt
Code:

root (hd0,1)
configfile /boot/grub/menu.lst

If you smash Red Hat's Grub to pieces and flush it down the toilet so that there is NO bootable available inside Red Hat the Grub floppy can still boot it. So look after the Grub floppy. Buy a shot gun to guard it if you have to.

----------------------------
edited

I always try to persuade others to use a Live CD as the standard tools to rescue a Linux but in your case you have Red Hat. Red Hat installation CD has a "rescue" section on booting up. You can use it to "source" the necessary Grub files to make the Grub floppy. In fact Method 2 above was written using Red Hat distro. I just booted up my Red Hat 9 and found out stage1 is available in /usr/share/grub/i386-redhat subdirectory. Using Red Hat installation CD saves you the trouble of getting a Linux Live CD.

adityakumar 12-28-2006 02:20 AM

thanq u saikee
 
a very thanks to you saikee i just tried it found useful iam very new to linux thats why i am confused thanq u a lot

saikee 12-28-2006 07:01 AM

adityakumar,

Enjoy Linux.

Don't worry confusion. Everyone has to start as a newbie. I am just half a step in front of you and there others several steps ahead of us.


All times are GMT -5. The time now is 06:23 PM.