Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 03-26-2006, 11:20 PM   #1
Registered: Oct 2004
Posts: 43

Rep: Reputation: 15
Is it possible to install grub in windows ?

Hi folks,

I am running a dual-boot system (windows and linux/suse10 community) and current find myself need to recover my windows partition with the recovery CDs. I am fully aware of that grub will be eraced from mbr by this recovery action, but I have absolutely no idea how to install grub from a windows based system.

Could someone kindly teach me how to get it done or at least point me a direction?
In addition, telling me how to jump to "install grub" step like in fedora or debian would also be helpful.

Old 03-27-2006, 12:55 AM   #2
Registered: Mar 2006
Location: Ekaterinburg, Russia
Distribution: Debian, Ubuntu
Posts: 709

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
If you have a floppy drive, then you have no problems -- create GRUB boot floppy.
See `info grub' -> installing. Here is a short extraction from there (section `Creating a GRUB boot floppy'):

# 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

Once you've boot from a GRUB floppy, run command like `setup (hd0)' if you want
to install GRUB on the MBR in the first drive [i.e. hda]. To install GRUB into the "boot sector" of a partition instead of the MASTER Boot Sector, specify a partition into which you want to install GRUB: `setup (hd0,0)'. If this doesn't work, try to look for 'stages' on your hd. For example:
grub> find /boot/grub/stage1
This will search for the file name `/boot/grub/stage1' and show the devices which contain the file.
grub> root (hd0,0)
Set GRUB's root device (change hd0,.. to result of prev. command)
grub> setup (hd0)
--install GRUB.

P.S. Before doing all this see file `/boot/grub/menu.lst'
Good luck!
Old 03-27-2006, 01:03 AM   #3
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
Actually you have no reason to use Windows to reinstall grub. Download a Live-CD (like Knoppix) and use it.

I've done similar restoration a couple of time and here's roughly how it goes:

1. Boot the LiveCD

2. Change yourself to "root" (with "su")

3. Make a temporary directory to the root dir "/", for example "/suseroot"

4. Mount your Suse's root partition, "/", to this partition. You can do it with "mount -t auto /dev/hdX /suseroot". Replace "X" with your partition number. If you have SATA or SCSI drive the replace the whole "hdX" with appropriate device name. This example is for IDE drives.

Check /etc/fstab in you working Suse installation if you can't remember what your physical partition your root partition uses.

5. Issue "chroot /suseroot". Now you should be logged into your Suse's enviroment where you can install Grub. If you have a different "/boot" -partition, then mount it now, not before.

6. Install grub. Check "man grub" for more info, it's been I while since I did this myself.

Tell me if you run into any troubles.
Old 03-27-2006, 01:05 AM   #4
Senior Member
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Rep: Reputation: 45
don't worry if your windows boot loader erase grub from MBR.
you can retrive that that through the following steps:



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cant install grub after intalled windows xp... twysm Linux - Newbie 4 12-21-2005 02:34 PM
Accidental Install of Windows Second....Install GRUB? Brnzwngs Linux - Newbie 6 08-12-2005 01:10 PM
GRUB problem after Windows re-install kilroy155 Linux - Newbie 2 10-25-2004 09:44 PM
GRUB + Windows Install =What!? It's not Overwritten? ellakano Linux - Software 7 09-12-2004 05:57 PM
How to install GRUB from within Windows XP dubl59zy Linux - General 1 08-13-2004 11:10 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:00 AM.

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