LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-30-2006, 03:17 AM   #1
Stevecook
Member
 
Registered: Nov 2004
Location: Huddersfield
Distribution: FC2
Posts: 62

Rep: Reputation: 15
Lost my Grub menu


I recently installed a 2nd HDD and used my XP disk to format it NTFS, after rebooting my Grub menu has disappeared and it goes into my Windows menu (I have W98, XP and FC2 on my 1st HDD). I have copied my Grub.conf file using Explorefs.exe:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,5)
# kernel /vmlinuz-version ro root=/dev/hda7
# initrd /initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd0,5)/grub/splash.xpm.gz
title Fedora Core (2.6.10-1.771_FC2)
root (hd0,5)
kernel /vmlinuz-2.6.10-1.771_FC2 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.10-1.771_FC2.img
title Linux (2.6.5-1.358)
root (hd0,5)
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.5-1.358.img
title Windows
rootnoverify (hd0,0)
chainloader +1

Can anyone tell me if modifying this file will reinstate my Grub menu or if not, what do I need to do please?
I haven't worked with Linux for some time and am extremely rusty so talk to me as if I'm an idiot please.
 
Old 07-30-2006, 03:43 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680
You will need to boot up using a rescue or install disk. Did you also install windows? Perhaps when windows updated the partition table it also rewrote the entire MBR.

If the disk you boot up with has a grub menu, you could enter the grub shell and load in the kernel and initrd file manually, and then boot up to your normal system. At this point, you can reinstall the boot loader.
 
Old 07-30-2006, 04:32 AM   #3
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
You can also boot from a livecd then chroot from there. After boot, do
Code:
mount /dev/hda6 /mnt/anydir; chroot /mnt/anydir /bin/bash
you can then install grub just like how you install grub in your installed linux system. do 'info grub' if you want to recall the steps on how to install grub.
 
Old 08-01-2006, 10:01 AM   #4
Stevecook
Member
 
Registered: Nov 2004
Location: Huddersfield
Distribution: FC2
Posts: 62

Original Poster
Rep: Reputation: 15
Sorry guys - you are going way over my head.
Can you break it down into simple steps for me please?
 
Old 08-01-2006, 10:27 AM   #5
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
(a) boot your computer from a livecd
(b) when your reach the shell's prompt, enter the ff commands:
Code:
mkdir -p /mnt/system
mount /dev/hda6 /mnt/system
chroot /mnt/system /bin/bash
(c) you are now accessing your fedora filesystem. reinstall grub from here. for the simplest reinstallation, you can run
Code:
grub-install /dev/hda
but if that won't work you can always have the info on how to use grub by executing 'info grub'
(d) reboot

i'll be back tomorrow. good luck.

Last edited by konsolebox; 08-01-2006 at 08:13 PM.
 
Old 08-01-2006, 11:03 AM   #6
Stevecook
Member
 
Registered: Nov 2004
Location: Huddersfield
Distribution: FC2
Posts: 62

Original Poster
Rep: Reputation: 15
Booted into PClinux, opened a terminal and ran the above commands but I got the messages: /bin/bash and grub-install were not recognised as commands.

I can access my FC2 files from my XP partition using Explore2fs.exe, is there any way I can get my Grub menu back from there?
 
Old 08-01-2006, 08:13 PM   #7
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
please make sure you're properly mounting the right partition. i'm not sure if its hda6. just replace it with the proper partition.
 
Old 08-02-2006, 10:55 AM   #8
Stevecook
Member
 
Registered: Nov 2004
Location: Huddersfield
Distribution: FC2
Posts: 62

Original Poster
Rep: Reputation: 15
I got into my FC2 using UBCD from http://www.ultimatebootcd.com/ and ran grub-install /dev/hda, rebooted and all is well - my grub loader is back and I can access all my partitions once again.
Thanks for your help konsolebox.
 
Old 08-02-2006, 05:50 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680
In post #5, add this to step b:
mkdir -p /mnt/system
mount /dev/hda6 /mnt/system
chroot /mnt/system /bin/bash -l
mount -a


That will mount the other filesystems. If you have more than one partition, they should be mounted before running "grub-install".
The "-l" option will make start the login shell. This will run roots normal .profile which will set up the paths correctly.
 
Old 08-04-2006, 04:05 PM   #10
Stevecook
Member
 
Registered: Nov 2004
Location: Huddersfield
Distribution: FC2
Posts: 62

Original Poster
Rep: Reputation: 15
The UBCD allowed me to log on as root in my FC2 partition so I didn't mount anything - just ran the grub-install and my grubloader is restored,
Thanks for your help jschiwal.
I am however unable to access the Internet now, although my Speedtouch 330 modem is showing 2 green LEDs the Network config is unable to activate the pppoe adapter, also I am unable to start Firestarter (firewall and IC sharing prog).
 
  


Reply


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
Grub 0.97 issues on slackware - grub-install is very slow, & updating menu.lst fails dieyouspammer Linux - Software 1 02-27-2006 01:06 PM
Lost menu Xfce Taigrr Linux - Newbie 4 02-03-2006 05:26 PM
Lost boot/grub/menu.lst MRDucks Linux - Newbie 12 12-17-2005 01:44 PM
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 08:01 PM
I've lost programs from the menu toadbark Mandriva 8 06-23-2005 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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