473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Where's my GRUB?

AmberJain
884 Expert 512MB
Well,
I installed Red hat linux a few days ago and recently I tried to repair my XP installation on same machine. It displayed the following message when I expected it to repair my XP-"Setup is performing requested operations on your hard disk" or something similar (I don't actually remember the message displayed). But instead of repairing XP it did something unexpected. My GRUB boot loader got lost into nowhere.

When I tried booting with DamnSmallLinux LiveCD and searched for older Linux parttions on my PC, then I found that both Linux and Linux Swap partitions are fine and all files are in order. I have set of Redhat bootable CD's .

I want to bring GRUB back so that I can boot into Redhat linux installed on my PC.

Hope I have given enough information and if you expert need more information, tell me so that I can provide them to you.

THANKS in advance..............

============
AmbrNewlearner
============
Jun 26 '08 #1
6 4482
micmast
144 100+
You gave enough info, you could have also said I tried to repair XP after installing any linux distro...

Microsoft doesn't care that you have grub/lilo or any other bootloader installed and will simply remove it and install the windows bootloader. There are a few solutions to solve this problem.

The first is use the SuperGrub Boot Disk: http://www.supergrubdisk.org/

Another option, but a bit more difficult, is using a liveCD (I would say ubuntu or something, or maybe even fedora/redhat, but I haven't tried those). When you use a liveCD you have to follow the following steps:
(I assume everything below is done as root in a terminal)

1. mount your linux partition; for example: mount /dev/sda2 /mnt/sda2
2. Mount /dev, /proc and /sys to the correct directories of your original system
mount --bind /dev /mnt/sda2/dev
mount --bind /proc /mnt/sda2/proc
mount --bind /sys /mnt/sda2/sys

3. The next step is going back to your orginal machine.
chroot /mnt/sda2

Now everything you do, will be applied to the linux version on your sda2 device instead of on the CDROM.

4. Reinstall grub
grub-install

5. If you want to leave the chroot environment, you have to do the following steps:

umount /proc (Not 100% sure this is required)
CTRL+D (The keycombination)
umount /mnt/sda2/dev
umount /mnt/sda2/proc
umount /mnt/sda2/sys

That should reinstall the grub on your MBR. But the supergrubdisk is a lot quicker & easier :D

Hope this helps
Jun 26 '08 #2
AmberJain
884 Expert 512MB
THANKS micmast......I will try as you advised me to do and then I will reply back with the result.

============
AmbrNewlearner
============
Jun 27 '08 #3
AmberJain
884 Expert 512MB
You gave enough info, you could have also said I tried to repair XP after installing any linux distro...

Microsoft doesn't care that you have grub/lilo or any other bootloader installed and will simply remove it and install the windows bootloader. There are a few solutions to solve this problem.

The first is use the SuperGrub Boot Disk: http://www.supergrubdisk.org/

Another option, but a bit more difficult, is using a liveCD (I would say ubuntu or something, or maybe even fedora/redhat, but I haven't tried those). When you use a liveCD you have to follow the following steps:
(I assume everything below is done as root in a terminal)

1. mount your linux partition; for example: mount /dev/sda2 /mnt/sda2
2. Mount /dev, /proc and /sys to the correct directories of your original system
mount --bind /dev /mnt/sda2/dev
mount --bind /proc /mnt/sda2/proc
mount --bind /sys /mnt/sda2/sys

3. The next step is going back to your orginal machine.
chroot /mnt/sda2

Now everything you do, will be applied to the linux version on your sda2 device instead of on the CDROM.

4. Reinstall grub
grub-install

5. If you want to leave the chroot environment, you have to do the following steps:

umount /proc (Not 100% sure this is required)
CTRL+D (The keycombination)
umount /mnt/sda2/dev
umount /mnt/sda2/proc
umount /mnt/sda2/sys

That should reinstall the grub on your MBR. But the supergrubdisk is a lot quicker & easier :D

Hope this helps
Instead of going with supergrubdisk, I tried manual recovery of GRUB as you advised.
I booted into damn small linux live cd and then I did as you advised. Everything went fine till following command.
chroot /mnt/hdd2

When I executed above command, I got on to bash of my hdd2 partitions linux.
Then I entered following at the terminal--->
grub-install

But I get a error- "Format of install_device not recognised". I tried various combinations for install_device but couldnot find the appropriate one. So what should I do now.

THANKS for your help....
Jul 4 '08 #4
micmast
144 100+
o sorry, I made a small error
it should be: grub-install /dev/<your harddrive>

That should install it.
Jul 4 '08 #5
AmberJain
884 Expert 512MB
o sorry, I made a small error
it should be: grub-install /dev/<your harddrive>

That should install it.
Hello,
I did as you advised but still GRUB doesnot comes up.......
_______________
grub-install /dev/hdd5

I have enclosed below a screenshot of terminal when I executed the commands at Damn Small Linux terminal. (point your mouse pointer over the image so that you can view the enlarged and original image).



It says- "installation finished-No errors reported". But my GRUB sill don't appear when I boot my PC i.e. IBM/Windows bootloader is still the defaullt bootloader.

What is wrong now.
THANKS for your help in advance.........
Jul 4 '08 #6
AmberJain
884 Expert 512MB
SUCCESS.......
problem solved. I made a mistake. I typed

grub-install /dev/hdd5
instead of

grub-install /dev/hdd.

THANKS for help...........
Jul 5 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

47
by: Andrey Tatarinov | last post by:
Hi. It would be great to be able to reverse usage/definition parts in haskell-way with "where" keyword. Since Python 3 would miss lambda, that would be extremly useful for creating readable...
3
by: A.V.C. | last post by:
Hello, I found members of this group very helpful for my last queries. Have one problem with CASE. I can use the column name alias in Order By Clause but unable to use it in WHERE CLAUSE. PLS...
3
by: dadapeer | last post by:
hai In my computer i am having dual boot operating system one is winxpsp2 another one is linux red hat 3 i removed the the redhat partition (deleated). arter i rebooted the system system is...
1
by: sasimca007 | last post by:
Hello friends, At first, I installed windows-xp and after ubuntu. My windows-xp has encountered a problem that registry files are corrupted, then i re-installed windows-xp....
11
AmberJain
by: AmberJain | last post by:
Hello, From many few days whenever I tried installing Xubuntu on my PC, I failed as Xubuntu installer simply couldnot startup. Whenever I booted from Xubuntu Cd both Live CD and Xubuntu...
1
by: gaurav92K | last post by:
sir , please tell me what is the greate difference in lilo & grub boot loader. please tell me.
0
by: CarlFK | last post by:
I need some code that will read in grubs menu.lst file, and give me a list of dicts: I am not really sure what the rules are, like does it have to have a title, and do blank lines mean...
1
by: Albert Hopkins | last post by:
On Mon, 2008-11-17 at 10:27 -0800, CarlFK wrote: Why take a chance when you can get it right the first time? There is documentation on the syslinux config formats at their web site...
3
by: P4ZP47Z | last post by:
Here is my situation: - My windows install/apps/games were eaten by a virus that replicates into and wrecks .exe files - I made an Ubuntu 9.10 CD on my friends pc, and a Xubuntu 9.10 DVD...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.