LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-09-2006, 09:39 PM   #1
preeth45
Member
 
Registered: Nov 2006
Location: Chennai, India
Distribution: Centos, Debian, Archlinux, Mandriva
Posts: 43

Rep: Reputation: 15
XP installed on top of LINUX


Hello I have installed XP on Linux now my MBR is re-written by XP's default BOOTMANAGER but now I want to install GRUB. Is there any possible way of installin GRUB through Live-CD and moreover I have made a seperate partition for boot. Pls help me in installin in grub.
 
Old 12-09-2006, 10:09 PM   #2
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
Depending on the distribution your using the steps to recover with a live-cd are different. If its a RedHat distro your using, boot up with the first CD. Type linux rescue at the boot: prompt.

You'll be asked some questions about setting up the network configuration (not needed) and which keyboard type your using. You will then be asked if you want to mount existing linux installations. Answer 'ok' to this one.

Once fully booted type chroot /mnt/sysimage. This will change you to the root directory (/) of your linux installation.
Next type grub-install /dev/hda. change the /dev entry to reflect the settings on your PC. This should re-install grub in the MBR.
 
Old 12-09-2006, 10:11 PM   #3
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Easiest way to restore grub is

1. Boot with a live CD. Login and open an (X) terminal as root.
2. Mount your installed Linux partition. Then chroot to the Linux partition (where you originally installed grub from.)
3. run grub-install /dev/hda (subsitute this with where the MBR is located) from the chroot'ed environment.

The full manual can be found here, please also check it out before your proceed
http://www.gnu.org/software/grub/man...l#Installation

Hope that helps.
 
Old 12-11-2006, 12:39 AM   #4
preeth45
Member
 
Registered: Nov 2006
Location: Chennai, India
Distribution: Centos, Debian, Archlinux, Mandriva
Posts: 43

Original Poster
Rep: Reputation: 15
MR.Slackdaemon I did wat u said but now the error is "/sbin/grub"- not found.
 
Old 12-11-2006, 03:43 AM   #5
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
What distro are you using?
 
Old 12-11-2006, 10:25 AM   #6
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
Since you claim XP has been installed on top of the Linux I assume you no longer have the Linux.

Grub is normally packaged inside a Linux and so installing Grub without the Linux is possible but takes a bit of understanding of Grub.

The following thread 1 and 2 (Section C) have examples of installing Grub in a data-only partition.

Yes you can source Grub from a Live CD.

Thread 1 is interesting because I made XP to boot Grub without installing a Linux. Don't think it has been done before.

Last edited by saikee; 12-11-2006 at 10:30 AM.
 
Old 12-12-2006, 02:19 AM   #7
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
Quote:
Originally Posted by preeth45
MR.Slackdaemon I did wat u said but now the error is "/sbin/grub"- not found.
When you chrooted to /mnt/sysimage did you get any warning messages? It seems that the chroot did not work so your PATH searches are relative to the root of the CD instead of /mnt/sysimage.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows on top of Linux vivekian Linux - Software 11 03-03-2005 05:23 PM
Linux on top of Windows... BlackEcho Linux - General 5 12-20-2003 10:44 PM
My top 5 reasons to use Linux Solean Linux - Newbie 15 05-03-2003 11:23 PM
linux on top of windows keirobyn Linux - Newbie 6 02-12-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:47 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