LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation
User Name
Password
Fedora - Installation This forum is for the discussion of installation issues with Fedora.

Notices


Reply
  Search this Thread
Old 06-02-2004, 11:34 AM   #1
confidential007
Member
 
Registered: May 2004
Location: Ohio, USA
Distribution: Red Hat Linux, Fedora Core, Knoppix, tomsrtbt
Posts: 37

Rep: Reputation: 15
Grub not installing correctly


Recently, I recieved some help from marghorp (see http://www.linuxquestions.org/questi...hreadid=185768 for the full thread) on how to get FC 2 to boot. I quickly tired of the floppy boot disk and how slow it was, so I decided to put grub in the MBR on hdb, my Linux drive. I did this so a) I would not have to worry about the kernel 2.6 hard disk geometry bug that tends to hose XP installs and b) so I could boot with greater speed. I followed the instructions that marghorp gave me, but installed to hdb instead of hda (my XP drive). After booting with the rescue CD, in the shell:
Code:
chroot /mnt/sysimage
/sbin/grub-install /dev/hdb
grub-install informed me that it had completed without errors and that the device map was hdb=hd1 and the floppy thing. (I forgot to write down the exact text.)

I then rebooted my computer to see if grub would work. I told the BIOS to boot from IDE-1, my Linux drive. The screen quickly flashed that grub was loading and then went blank, with only the blinking underscore cursor in the upper left-hand corner. After about five seconds, the message
Code:
  Booting 'Fedora Coce 2.6.5-1.258 '

root  hd1,0
 Filesystem type unknown, partition type 0x44
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet

Error 17: Cannot mount selected partition

Press any key to continue...
appeared on the screen amid a bunch of white and black static-like pattern on all of the blank spaces. I pressed a key and the grub screen appeared, except it was in black and white and was almost completely illegible. I recognized it from a RHL 7.3 install I have on another computer and pressed enter to have it boot FC 2, the only OS on the grub menu. When I pressed enter, however, the same error message appreaed again, except artifacts from the bad grub screen were left behind. The boot loppy still works, but grub refuses to work correctly.
 
Old 06-03-2004, 12:05 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Take a look at the grub.cnf file and see if there is anything missing - check that all the correct partitions are identified there.
(I take it the diskette boot still works?)
Simon
 
Old 06-03-2004, 09:33 AM   #3
confidential007
Member
 
Registered: May 2004
Location: Ohio, USA
Distribution: Red Hat Linux, Fedora Core, Knoppix, tomsrtbt
Posts: 37

Original Poster
Rep: Reputation: 15
I'm not exactly sure if my grub.conf file is correct. Here is the outputs of /sbin/fdisk -l and the contents of my /boot/grub/grub.conf:
Code:
sh-2.05b# /sbin/fdisk -l

Disk /dev/hda: 122.9 GB, 122942324736 bytes
16 heads, 63 sectors/track, 238216 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id System
/dev/hda1   *           1      238186   120045681   44 Unknown

Disk /dev/hdb: 40.0 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id System
/dev/hdb1   *           1          13      104391   83 Linux
/dev/hdb2              14        4740    37969627+  83 Linux
/dev/hdb3            4741        4870     1044225   82 Linux swap
Code:
sh-2.05b# cat /boot/grub/grub.conf

# 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 (hd1,0)
#         kernel /vmlinuz-version ro root=/dev/hdb2
#         initrd-version.img
#boot=/dev/hdb1
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
password --md5 $1$ubSo3O1Y$gLsCdU6Mz4awdH34Gpfco0
title Fedora Core (2.6.5-1.358)
        root (hd1,0)
        kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.5-1.358.img
Can someone tell me if this is correct? I have two harddrives, hda is XP, hdb is FC 2. I also fave a floppy drive, a DVD drive, and a CD-RW.
 
Old 06-03-2004, 05:34 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
(Boxed code reproduced from original post)

Code:
sh-2.05b# /sbin/fdisk -l

Disk /dev/hda: 122.9 GB, 122942324736 bytes
16 heads, 63 sectors/track, 238216 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id System
/dev/hda1   *           1      238186   120045681   44 Unknown

Disk /dev/hdb: 40.0 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id System
/dev/hdb1   *           1          13      104391   83 Linux
/dev/hdb2              14        4740    37969627+  83 Linux
/dev/hdb3            4741        4870     1044225   82 Linux swap
As advertised, hda is your win partition - I'm not sure if the system should be identified here since I've never used a win partition... and, hdb is devoted to linux. I take it that hdb1 is boot, hdb2 is root and hdb3 is swap? (The default setup usually likes to keep boot and swap as far apart as possible!)

Code:
sh-2.05b# cat /boot/grub/grub.conf

# 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 (hd1,0)
#         kernel /vmlinuz-version ro root=/dev/hdb2
#         initrd-version.img
#boot=/dev/hdb1
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
password --md5 $1$ubSo3O1Y$gLsCdU6Mz4awdH34Gpfco0
title Fedora Core (2.6.5-1.358)
        root (hd1,0)
        kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.5-1.358.img
What I *think* is happening, is that GRUB gets to the "kernel" line and goes looking for the root partition. It is looking in each partition in order until it finds the "/" symbol or gets confused. It gets confused looking at hda because that is nothing it recognises at this stage then it winges to you about it.

Try this:
1. copy this file into the same directory with the name boot.conf.old or boot.conf.faulty or some such.
2. replace the kernel id line (kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet) with the following:
kernel /vmlinuz-2.6.5-1.358 ro root=/dev/hdb2
3. save the altered file as grub.conf (replacing the old one)
4. reboot

The idea here is to tell GRUB that your root partition is *definately* in hdb2.
(I had the same problem with two drives where hda1 was boot, hda2 was empty, hda3 was swap and hbd1 was a whole drive of root. making the alteration suggested is what rescued me )

Simon

BTW: let us know how it went.
 
Old 06-05-2004, 01:49 PM   #5
gamu829
Member
 
Registered: Sep 2002
Location: Portland, OR, US
Distribution: Fedora 2
Posts: 47

Rep: Reputation: 15
The partition type of your XP partition is WRONG. In fact, fdisk does not even list 44 as a valid type. Dunno how it got that way or how you're gonna fix it w/o reinstalling XP. Here is the fdisk summary for my system that dual boots FC2/XP:

Disk /dev/hda: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 32 257008+ 83 Linux
/dev/hda2 33 1278 10008495 7 HPFS/NTFS
/dev/hda3 1279 1372 755055 82 Linux swap
/dev/hda4 1373 4982 28997325 5 Extended
/dev/hda5 1373 2481 8908011 83 Linux
/dev/hda6 2482 4982 20089251 83 Linux
 
Old 06-05-2004, 01:51 PM   #6
gamu829
Member
 
Registered: Sep 2002
Location: Portland, OR, US
Distribution: Fedora 2
Posts: 47

Rep: Reputation: 15
Sorry about the formatting above... I'll try again:


<code>
Disk /dev/hda: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 32 257008+ 83 Linux
/dev/hda2 33 1278 10008495 7 HPFS/NTFS
/dev/hda3 1279 1372 755055 82 Linux swap
/dev/hda4 1373 4982 28997325 5 Extended
/dev/hda5 1373 2481 8908011 83 Linux
/dev/hda6 2482 4982 20089251 83 Linux
</code>
 
Old 06-16-2004, 08:33 PM   #7
confidential007
Member
 
Registered: May 2004
Location: Ohio, USA
Distribution: Red Hat Linux, Fedora Core, Knoppix, tomsrtbt
Posts: 37

Original Poster
Rep: Reputation: 15
I tryed changing the kernel line to have the root point at /dev/hdb2 instead of LABEL=/, but I still receive the same error as I did before.

About the partition type, I now realize that 44 is an invalid partition type, but to change it to the correct value, I believe that you would have to rewrite the partition table using fdisk, and in the process nuke my XP partition. One thing I wonder about is that I actually have five NTFS partitions on /dev/hda, but fdisk only lists one. Is this another byproduct of the incorrect partition type that fdisk sees? Is the incorrect partition type a byproduct of the 2.6 kernels new hard disk geometry detection?

BTW: You use brackets to enclose formatting tags in these forums, not chevrons

Last edited by confidential007; 06-17-2004 at 07:07 PM.
 
Old 07-10-2004, 04:14 PM   #8
rnicolson
Member
 
Registered: Jul 2004
Location: Winnipeg
Distribution: Slackware 11
Posts: 74

Rep: Reputation: 15
I was having a very similar problem. When I first did the install Grub defaulted to my XP partition and would not boot either OS with the error "Unable to load Operating System" After removing GRUB to be able to boot Windows again I tried installing GRUB to /dev/hdb and that would boot if I said in the BIOS to boot from HD1 in the sense that I got the same problem as you. My XP partition however was 0x7 which is a correct format for NTFS.

Once I ran into your problem I tried some of the solutions given here however I was only able to get Fedora to boot if I changed GRUB to look have all instances of (hd1,0) changed to (hd0,0) and left the line

kernel /boot/vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet

As is. I also remarked out the XP portion of the loader and have not tried to boot it yet. I need to make sure all my XP info is better backed up before I mess with it. It just means I am using the system BIOS to change my boot OS instead of GRUB for now. I will post again if I try this out and things work.

I hope this helps.
 
  


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
gentoo : grub: The file /boot/boot/grub/stage1 not read correctly Boudewijn Linux - Software 3 05-21-2008 03:13 AM
grub problems.... again.... not loading correctly? kahn Linux - Software 1 09-03-2005 10:34 AM
Help me install GRUB Correctly eNightmare Arch 4 05-03-2005 09:07 PM
Not only can I not get the grub installed correctly... Hunter69 Fedora - Installation 2 03-06-2005 06:35 PM
GRUB is impossible for me to install correctly Bruce Hill Linux - Newbie 8 11-03-2003 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation

All times are GMT -5. The time now is 11:34 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration