LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-07-2008, 01:19 AM   #1
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Rep: Reputation: 30
How to install GRUB in MBR?


XP in first partition.
Installed FC8 in second partition with GRUB in /dev/sda2.
As expected, I can't boot into Linux. But I tried taking first 512 bytes and putting those in boot.ini. That doesn't work.


Is there a way I can boot into linux rescue mode and install GRUB in MBR? I can take it from there.
 
Old 03-07-2008, 01:35 AM   #2
vedang
Member
 
Registered: May 2006
Posts: 89

Rep: Reputation: 15
Grub on MBR.

Hi,

I your case there is no need to go to rescue mode.

#grub
>root (hd0,0)
>setup (hd0)
exit.

first type grub on command prompt then you will enter in grub menu. Type rest two commands and exit.
This will write grub on MBR.
But i am not sure whether it will work for dual boot. If it doesn't replace Grub on MBR with Windows bootstrap loader on MBR.

If it works for dual booting please let me know.
 
Old 03-07-2008, 01:36 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
If you have the Fedora dvd or rescue cd (its small and can be downloaded from any Fedora mirror), you can boot from that and enter "linux rescue" at the boot prompt. The live cd will boot and then you will be asked for details about your / (root) partition. Enter that information and when you see a shell prompt enter
Code:
chroot /mnt/sysimage
grub-install /dev/sda
If the commands were successful, reboot the system.

Last edited by reddazz; 03-07-2008 at 01:38 AM.
 
Old 03-07-2008, 02:32 AM   #4
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Original Poster
Rep: Reputation: 30
reddazz: When I log into 'rescue mode', and try to install grub, I get error msgs: file read incorrectly. Not sure what that means.

vedang: If I can't launch into rescue, not sure what mode you are talking about. As I said, I can't launch into FC8.
 
Old 03-07-2008, 02:37 AM   #5
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Original Poster
Rep: Reputation: 30
How to install GRUB, btw?
 
Old 03-07-2008, 02:48 AM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally Posted by concoran View Post
reddazz: When I log into 'rescue mode', and try to install grub, I get error msgs: file read incorrectly. Not sure what that means.
If grub-install failed, run the command grub and enter something like
Code:
#grub
#grub> root (hd0,1)
#grub> setup (hd0)
#grub> quit
 
Old 03-07-2008, 04:06 AM   #7
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Original Poster
Rep: Reputation: 30
Hi reddazz,
did it, but it won't boot into Linux.
If I choose 'other', I can get into XP.

anyways, too late in the night here. I really need to log off now. Appreciate your help. will talk later. BFN.
 
Old 03-07-2008, 04:43 AM   #8
Stéphane Ascoët
Member
 
Registered: Feb 2004
Location: Fleury-les-Aubrais, 120 km south of Paris
Distribution: Devuan, Debian, Mandrake, Freeduc (the one I used to work on), Slackware, MacOS X
Posts: 251

Rep: Reputation: 49
Smile

Quote:
Originally Posted by concoran View Post
Installed FC8 in second partition with GRUB in /dev/sda2.
Just set sda2 as bootable!
 
Old 03-07-2008, 06:11 AM   #9
andreas_skw
Member
 
Registered: Jan 2008
Location: Indonesia, tanah air beta
Distribution: Knoppix v5
Posts: 97

Rep: Reputation: 15
look at andreaslm.wordpress.com, Grub missing part (Linux)
 
Old 03-08-2008, 12:30 AM   #10
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Original Poster
Rep: Reputation: 30
Well, I finally managed to install grub into MBR. I'll take it from here. Thanks everybody. Have a great day, night, weekend, or whatever is appropriate for you. Enjoy!
 
  


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
How do I re-install Grub onto the MBR? satyakb Mandriva 5 04-11-2008 10:50 AM
Grub won't install in MBR PB0711 Linux - Software 4 05-02-2007 01:12 AM
How to install Grub other than MBR? terryxela Ubuntu 1 04-08-2007 04:31 PM
how do i install grub in the mbr? spyghost Linux - Newbie 2 11-07-2003 09:52 AM
GRUB Install on MBR JakeFarley Linux - Newbie 3 10-22-2002 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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