?
Solved

how to recover grub loader after reinstall windows xp

Posted on 2003-02-21
7
Medium Priority
?
4,369 Views
Last Modified: 2013-12-06
I had a dual system (RedHat and win xp in two hard drives). After winxp crashed down, I reformated the windows partition and reinstalled xp. But I lost the grub boot loader and can't boot the linux. Can any body tell me how to get my linux back  instead of installing a new one?
0
Comment
Question by:delphet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 

Expert Comment

by:Cygnus78
ID: 7998235


You do not have a floppy to boot into Linux with ? If not I think you can boot from the red hat cd to get into linux (have not tried this with red hat though, it works on suse linux)

If you somehow manage to get into red hat again you maybe want to create a boot floppy with grub, then you wont risk to do the opposite of what you just did (not getting into windows after reinstalling grub).

You can do this with the following commands:

# cd /usr/share/grub/i386-pc
# dd if=stage1 of=/dev/fd0 bs=512 count=1
1+0 records in
1+0 records out
# dd if=stage2 of=/dev/fd0 bs=512 seek=1
153+1 records in
153+1 records out

By the way you can read about dual boot on red hat systems here:

http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/install-guide/ch-x86-dualboot.html

0
 
LVL 4

Expert Comment

by:garisoain
ID: 7998323
You can also, booting with your Linux instalation CD or with a Rescue Disk, configure the Windows XP boot loader to start linux...

1. When logged into linux, use the following command.

If your linux boot partition is /dev/hda1 and your WinXP partition is mounted on /winxp/

# dd if=/dev/hda1 of=/winxp/bootsect.lnx bs=512 count=1

2. Then, edit /winxp/boot.ini and add this line:

C:\bootsect.lnx="Linux"

3. Reboot, you should be able to select and start linux from your Windows boot menu.

For Rescue Disks, check this page:
http://www.ibiblio.org/pub/Linux/system/recovery/!INDEX.html

Hope this helps you, good luck !
-Garisoain.
0
 

Expert Comment

by:paultje3181
ID: 8008257
You can just download a mini-distro to get into linux. Then edit your lilo.conf file so that you can boot with lilo.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:delphet
ID: 8027173
Hi,

Thanks for all the messages from you. I tried them but they don't work. There is no /winxp directory in my machine so garisoain's suggestion can't work. According to Cygnus78's message, I should write someting to the floppy (/dev/fd0 is the floppy drive). I don't think that can help and it really didn't. I guess I may not describe my problem clearly. I had a dual boot system (RedHat and Winxp) before. When I reinstalled XP, I can't get GRUB boot loader run when booting the machine. It goes directly to XP. I don't want to reinstall RedHat. So my question is how I can recover the existing GRUB and make it work again. Hope that makes my situation clear.

Thanks again.

-delphet
0
 

Expert Comment

by:CleanupPing
ID: 9087911
delphet:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9259402
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is to:

Be PAQ'd/Points No Refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Paul
EE Cleanup Volunteer
0
 

Accepted Solution

by:
YensidMod earned 0 total points
ID: 9325519
PAQed per request/recommendation - No Refund

YensidMod
Community Support Moderator
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question