LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-09-2005, 01:03 PM   #1
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Rep: Reputation: 30
No longer booting into GRUB


Dear All,

I recently installed Fedora Core 3 onto my laptop, dualbooting with Windows Xp Pro. It has been running smoothly for a few weeks, and as I had left some free space on my hd for my extra files on windows, I decided to partition that free space using the Windows Installation CD. When I had created the new [raw] partition, I rebooted the computer to go into Windows and see if it recognised the new partition. I expected the GRUB window to come up as usual, asking me whether I wanted to boot into FC3 or Windows, but my computer just went straight from my BIOS password to Windows!

I have looked at the GRUB file from my live KNOPPIX cd, and there doesn't seem to be anything wrong with it, but something must have got screwed up when I put in the Windows cd. Can someone please tell me how, if there is any way possible, to get the GRUB screen to come up again on boot, instead of going straight into Windows, because I can't get into Fedora now! Thanks in advance,

J_K9
 
Old 03-09-2005, 01:38 PM   #2
joesbox
Member
 
Registered: Feb 2003
Location: hampton va
Distribution: ubuntu
Posts: 502

Rep: Reputation: 30
windows is notorious for overwriting the boot sector when you need to re-install and you already have linux booting using lilo or grub... maybe when you booted to the disc it did the same. if you have the boot floppy you can still get to your linux partition. i also know that there is a way to fix grub and boot back into it but i don't know how... you may need to search around here and look for a thread.
 
Old 03-09-2005, 02:35 PM   #3
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
Thanks joesbox for your reply. I never made the boot floppy, because my laptop doesn't have a floppy drive! At least I now know that there is still some hope...does anyone else please know how to fix grub to boot back into it?

Thanks in advance,

J_K9
 
Old 03-09-2005, 03:07 PM   #4
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Here's my notes.

1. Boot your machine from your boot media (cdrom1) and select linux rescue to install to the command prompt.

2. Redhat displays a message “If you would like to make your system the root environment, run the command: chroot /mnt/sysimage”. Go ahead and do that.

3. At the prompt, type rdev and make a note of the output. For example, if it looks like this... " /dev/hda2 / " . This indicates that the Redhat root partition is on the first drive and second partition. You need that info for the next step.

4. Get into the grub configuration utility with the command: grub.
At the prompt grub> type the command: root (hd0,1) ; this will tell grub that the linux files it needs are on the first hard disk (hd0) and the second partition (1) of that drive. Change this to meet your configuration needs. For instance, if the linux files are on the second hard disk (hd1), first partition (0) of that drive then type root (hd1,0).
If you selected the correct location (where linux is installed), you should see a message as follows.... Filesystem type is Ext2fs, partition type is 0x83.
Then issue the following command: setup (hd0) ; this will install grub in the MBR of your first hard disk. You could change that to use the /boot partition if desired.
Exit the grub utility with the command: quit

You can also try to use grub-install /dev/hda to install grub on your first hard drive's MBR, but that doesn't always work.
 
Old 03-09-2005, 03:44 PM   #5
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
Thank you very much for your help. homey, but is the "boot media (cdrom1)" my Fedora Core 3 installation DVD or is it something else, because when I installed Fedora I didn't make any recovery disks of any kind whatsoever. Again, thank in advance,

J_K9
 
Old 03-09-2005, 03:53 PM   #6
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Guess that should learn me to read the post. Anyway, things have just become better as FC3 is a bit more automated in rescue mode.
Boot up with the DVD or cdrom1 and type: linux rescue.
FC3 should autodetect your system and automatically mount /mnt/sysimage.
So all you have to do after that is type: chroot /mnt/sysimage
Then type: grub-install /dev/hda
Then type reboot
 
Old 03-09-2005, 04:08 PM   #7
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
homey, I tried exactly what you said, and everything went smoothly, even the grub installation reported no errors, but I have just restarted my computer and it has booted straight into windows yet again. Do you know of anything else I can do to fix it? Thank you very much for your help so far.

J_K9
 
Old 03-09-2005, 04:22 PM   #8
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Can you post the results of the command: fdisk -l also the grub.conf ?
 
Old 03-10-2005, 01:32 AM   #9
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
Thanks, but should I try the fdisk -l in the "linux rescue" of the DVD, and then move onto KNOPPIX and read the grub.conf (/boot/grub/grub.conf), or should I do both in KNOPPIX?

J_K9
 
Old 03-10-2005, 02:34 AM   #10
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
Here is the result of fdisk -l:
Code:
Disk /dev/hda: 40.0 GB, 40007761920
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225200 bytes

Device		Boot	Start		End		Blocks		Id		System
/dev/hda1	*	1		1824		14651248+	7		HPFS/NTFS
/dev/hda2		1825		2270		3582495		83		Linux
/dev/hda3		2271		3035		6144862+	83		Linux
/dev/hda4		3036		4864		14691442+	5		Extended
/dev/hda5		3036		3162		1020096		82		Linux swap
/dev/hda6		3163		4863		13663251	b		W95 FAT32
I will display the grub.conf in a few hours' time because I don't have time now! Thanks in advance,

J_K9

Last edited by J_K9; 03-10-2005 at 07:56 AM.
 
Old 03-10-2005, 08:41 AM   #11
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
Sorry for triple-posting!!

Sorry for triple-posting! (lol), but here's my grub.conf file:

Code:
#grub.conf generated by anaconda
#
#Note that you do not have to rerun grub after making changes to this file
#NOTICE:          You do not have a /boot partition. This means that
#                 all kernel and initrd paths are relative to /, eg.
#                 root (hd0,1)
#                 kernel /boot/vmlinuz-version ro root=/dev/hda2
#                 initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.9-1.667)
            root (hd0,1)
            kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
            initrd /boot/initrd-2.6.9-1.667.img
title Other
            rootnoverify (hd0,0)
            chainloader +1
The "Other" is Win XP Pro. Thanks in advance, and sorry for triple-posting!

J_K9
 
Old 03-10-2005, 10:10 AM   #12
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Quote:
Boot up with the DVD or cdrom1 and type: linux rescue.
FC3 should autodetect your system and automatically mount /mnt/sysimage.
So all you have to do after that is type: chroot /mnt/sysimage
Then type: grub-install /dev/hda
Then type reboot
Ok, so maybe plan B will work.

Boot up with the DVD or cdrom1 and type: linux rescue.
FC3 should autodetect your system and automatically mount /mnt/sysimage.
So all you have to do after that is type: chroot /mnt/sysimage
Then type: grub
#that should get you to a prompt like this ... grub> , so enter root (hd0,1)
grub> root (hd0,1)
#you should see a message like this ... Filesystem type is Ext2fs, partition type is 0x83.
#If you saw a message to that, good! now enter setup (hd0)
grub> setup (hd0)
grub> quit
then reboot
 
Old 03-10-2005, 11:23 AM   #13
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
Thank you so much homey! GRUB now boots and I can choose whether to go into Fedora Core 3 or Win XP Pro! I have definitely learnt a lesson today...

Thanks again,

J_K9
 
Old 03-10-2005, 11:40 AM   #14
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Thumbs up

You're welcome!
 
  


Reply



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
Booting of raw ISO from GRUB/LILO (though preferably GRUB) Orkie Linux - Software 28 12-15-2013 09:37 PM
How to remove grub + linux partition from drive? No longer needed. Boggit Linux - General 7 11-09-2008 12:29 AM
Cannot See the Grub while booting Morpheus Linux - Hardware 2 01-17-2005 08:51 AM
linux answer no longer links to the main grub post aus9 LQ Suggestions & Feedback 5 09-12-2004 05:09 PM
ran grub-install, no longer sure how to boot windows Golovko Linux - General 6 07-23-2003 11:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:41 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