LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-20-2006, 09:00 AM   #1
adityakumar
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Rep: Reputation: 0
Unhappy 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
 
Old 12-20-2006, 09:17 AM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,646

Rep: Reputation: 146Reputation: 146
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.
 
Old 12-20-2006, 09:27 AM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
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.

Last edited by saikee; 12-20-2006 at 09:32 AM.
 
Old 12-20-2006, 09:37 AM   #4
adityakumar
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Original Poster
Rep: Reputation: 0
friend this is not working for me
cp: cannot stat `/lib/grub/i386-pc/stage2_eltorito': No such file or directory
giving above error
 
Old 12-20-2006, 09:46 AM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
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

Last edited by saikee; 12-20-2006 at 09:50 AM.
 
Old 12-20-2006, 10:05 AM   #6
adityakumar
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Original Poster
Rep: Reputation: 0
this solved my problem thanq u
 
Old 12-20-2006, 10:06 AM   #7
adityakumar
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Original Poster
Rep: Reputation: 0
plz tell me how to make the bootable grub cd
 
Old 12-20-2006, 10:44 AM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
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.

Last edited by saikee; 12-20-2006 at 12:30 PM.
 
Old 12-28-2006, 02:20 AM   #9
adityakumar
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 12-28-2006, 07:01 AM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using and editing Grub or boot with System Rescue cd loninappleton Linux - Newbie 5 12-08-2005 06:19 PM
Is Grub necessary for Dual boot system JOR000 Linux - General 6 09-02-2005 12:28 PM
Boot x86 target from flash, with the image and file system on the x86 host. batsayan Linux - Software 2 08-23-2005 12:09 AM
help! grub does not boot the system! dual HD, 3 OS parv Fedora 3 08-31-2004 08:40 AM
GRUB for LINUX to boot dual system kpilaiku Linux - General 2 04-11-2003 03:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration