473,582 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Where's my GRUB?

AmberJain
884 Recognized Expert Contributor
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 4506
micmast
144 New Member
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 Recognized Expert Contributor
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 Recognized Expert Contributor
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 New Member
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 Recognized Expert Contributor
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- "installati on 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 Recognized Expert Contributor
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
3600
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 sources. Usage could be something like: >>> res = where: >>> def f(x):
3
21990
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 TELL ME IF IT IS POSSIBLE TO USE IT IN WHERE CLAUSE AND SOME ALTERNATIVE. QUERY: SELECT
3
2737
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 not booting in to winxp it is showing Grub> prompt with black screen pls help me......
1
1749
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. So it doesn't show operating system selection menu. I thought grub is corrupted. Please help me in this situation how to install grub. I have ubuntu...
11
6185
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 installation refused to start. Both live CD and install routine initiated till a certain point then nothing happened for atleast 1 hour (I tried this many...
1
4437
by: gaurav92K | last post by:
sir , please tell me what is the greate difference in lilo & grub boot loader. please tell me.
0
1262
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 anything? so 1/2 of what I am looking for is something that already knows what the rules are. What I really want to parse is pxelinux.cfg/default file...
1
2664
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 (http://syslinux.zytor.com/).
3
5319
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 on this PC while running the Ubuntu one. - Both Linux Disks give a grub failed to install error at 95% - I have a RAID 0 array
0
7886
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7809
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8312
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7920
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8183
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6569
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3809
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.