GRUB loader lost - how to reactivate it?

Status
Not open for further replies.

VicRic

Posts: 37   +0
Hi,

I'm sure this question has been asked hundreds of times before but I couldn't quite find the answer I wanted while Searching; so here it goes again:

I have a desktop machine with dual boot:
1) Linux Fedora Core 6
2) Windows

Actually I had it working fine before; using the GRUB Linux loader it gave me the option to boot either Fedora or Windows. The Windows o.s. was then Windows 2000 Server installed on C drive.

Then just today, loading first Windows 2000, I installed Windows Vista Home Premium onto E drive.

Now the only loader available is the Windows one which gives me the option to load either Windows Vista or Windows 2000.

I know the GRUB sector is still there waiting to be activated again but I forgot now how to do it.

Here's a copy of my disk partition map:

https://www.techspot.com/gallery/data/500/DiskMangmt.jpg

I'm quite sure the GRUB loader must be in the "102Mb sector" depicted on the previous image.

What is the proper way to reactivate it?
Should I use the Fedora Core 6 install DVD -which I do have- or should I do it from the Vista Disk Management?

BRgds
 
Boot with Fedora DVD, type linux rescue on the boot prompt.

When you get to the command line in the rescue mode, type:

grub

Then in GRUB's command line:

root (hd0,0) - this tells GRUB that the boot partition is the first one on the first disk

setup (hd0) - this writes the boot sector on the first disk

quit - guess what this does

Then exit to reboot.
 
Thanks Mictlantecuhtli,

how about creating a LILO boot disk on another machine, could I use it on my problem machine?

I have access to another machine that has Fedore Core 6 as well; would I find there any option to create a LILO boot disk? It would have to be a boot CD because my problem machine doesn't have a floppy drive.

Is there such a thing as a GRUB boot disk (as in diskette or CD)?

BRgds
 
Hello I got almos the same problem, but i think i did not install grub correctly,

I got a new dell inspiron 1501 delivered yesterday and saw that vista took 51% of the ram in standby and so on and was thinking about debian already when i order it. So yesterday I downloaded Debian 4.0 for amd64 and installed but there was some problems occured in the install becous I did not create a swap and I got to the grub installer found windows vista and continued, then it announced a error and skipped the step and I installed LILO and now I think my windows is lost, is thgere any way I could install grub correctly and find windows now? I tried
Code:
apt-get install grub
But it only gave me "0 new packages 0 updated 2 untuched.

Anyone got any help for me how to get it properly, should I try to install debian from scratch again and make a swap partition from the partition its installed now?

Only thing I done since I installed debian is
Code:
apt-get install kde 
apt-get install x-window-system
apt-get install firefox
 
Assuming your issue is configuration:
http://www.cyberciti.biz/faq/grubconf-for-windows-vista-or-xp-dual-boot/
title Microsoft Windows Vista
root (hd0,1)
savedefault
makeactive
chainloader +1
Assuming your grub is toast:
http://www.cyberciti.biz/tips/howto-fix-dual-boot-windows-vista-linux.html
Step # 1: Boot from Fedora Core Linux 1st CD or DVD

Set BIOS to boot from CD/DVD rom. At boot: prompt type command linux rescue
boot: linux rescue

Just follow on screen instructions, when prompted let installer search Linux installation. If the search operation is successful, your old Linux installation will be available at special directory called /mnt/sysimage.
Step # 2: Prepare system for GRUB reinstallation

Type the following commands at shell prompt:
# chroot /mnt/sysimage
# cd /boot/grub

chroot command allows to run rest of all *COMMAND* with root directory set to NEWROOT called /mnt/sysimage. Without chroot environment you will not able to restore GRUB on Fedora Core 6.
Step # 3: Find out your GRUB bootloader installation location

If you have only one IDE hard disk default should be /dev/hda. You can use any of the following command to determine your device name:
# grep '#boot' grub.confOuput:

#boot=/dev/sda

Above output clearly point out that /dev/sda device where my GRUB bootloader was previously installed.

You can also try out fdisk -l command to list partitions and disk information:
# fdisk -l
Step # 4: Reinstall GRUB

Use grub-install command to install GRUB on your drive /dev/sda
# grub-install /dev/sda

Please note that if above command returned any error return with –recheck option to probe a device map even if it already exists
# grub-install --recheck /dev/sda
Step # 5: Reboot system

Exit from chrooted environment and reboot Linux:
# sync;sync;exit;exit
# reboot

Side note - if you aren't familiar with vi or vim, I'd recommend using pico or nano. They are pretty straight forward to use for basic text editing. Also, if you are editing your grub config in a graphical environment, gksudo gedit (for Gnome) or gksudo kate (for KDE) work well too. You may already know this, but if you don't, now you do! :)
 
Status
Not open for further replies.
Back