LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 04-22-2006, 08:29 AM   #1
egreg
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Rep: Reputation: 0
GRUB doesnt see FC5


I have just upgraded my FC4 to FC5 (on a Dell laptop), choosing only to update GRUB. Anaconda told me that the install was successful. However upon reboot, GRUB does not give me the option of booting up FC5 (or any linux for that matter). It only offers Windows XP.

I have (had!) a dual-boot system with grub offering a choice of older linux kernels, and windows XP. Now only XP.

I have tried running the installer again and choosing install new boot loader rather than update GRUB, but as the kernel is not upgraded, it says there is nothing to be done to GRUB, and the state remains the same.

I had the same problem when I upgraded FC3->FC4, but that time it could still find the old FC3 kernels and boot them. Only after I did the first web up2date kernel upgrade did it seem to find my FC5 kernels.

How can I get GRUB to find linux again?

Help!

-Eric
 
Old 04-22-2006, 08:56 AM   #2
Mistreated
Member
 
Registered: Aug 2004
Location: Latvia, Riga
Distribution: Gentoo
Posts: 109

Rep: Reputation: 15
You can log to GRUB's command-line and try to modify boot options. Choose correct device and try to boot to your FC5. If you remember the settings for GRUB, when you had FC4, you can use them, i think settings should be the same.
 
Old 04-22-2006, 09:18 AM   #3
egreg
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Do you know how I would do that? Ive got to the GRUB command line, but am a bit clueless about syntax and what I should type there. I guess I didnt look much at grub when it was working, so dont really know what the settings
might have been (or even where to find 'settings').

Im feeling like a genuine newbie.
 
Old 04-22-2006, 05:44 PM   #4
Mistreated
Member
 
Registered: Aug 2004
Location: Latvia, Riga
Distribution: Gentoo
Posts: 109

Rep: Reputation: 15
When the boot screen is displayed and your GRUB is not protected with password. You can press 'e' and edit boot settings for each option that is displayed in the menu, you've got only Windows XP in that menu. Also you can press 'c' and enter GRUB's command-line and work there.
If you protected GRUB with a password, you have to press 'p', enter the password in the prompt, and then you can press either 'e' or 'c'.
I think 'c' should be your choice. From command-line you can do almost anything. GRUB has it's own set of commands with which you can operate. Type help, to get list of all commands and short description of each. Type help <command_name> to get more detailed description of the command, e.g. help find. If you will need a GRUB's manual i would recommend you the following
http://www.gnu.org/software/grub/manual/grub.html it's official and i find it good enough and quite easy to understand.
It should be quite easy to boot your FC5. Hope you remember on which drive and partition your FC5 is installed.
First of all you have to know that GRUB has it's own way of naming hard drive devices. First partition on the first drive which in Linux would be /dev/hda1 in GRUB's notation is (hd0,0) and for example /dev/hdb3, which stands for third partition on the second drive in GRUB's notation is (hd1,2). First number is the drive number and second is the number of partition like this (hd<drive_number>,<partition_number>). Enumeration begins with 0.
So when you are at the command-line enter the following command:
root (hd0,0)
it will tell the GRUB where your FC5 is installed, so don't forget to replace (hd0,0) with your correct drive and partition number.
Then you will have to tell the GRUB where is your Linux kernel located. You can do it with the following command:
kernel /boot/vmlinuz root=/dev/hda1
/boot/vmlinuz is the full path to your kernel and root=/dev/hda1 is the parameter for the kernel which defines where the rood directory is mounted (it's the kernel's option and has nothing to do with GRUB). You can provide other options for the kernel if you like or not to specify them at all. If don't remember where's the kernel located, you can use find command first to find it. It could be located in the root directory, or in the /boot directory, and it's name should be vmlinuz or vmlinuz-XXXXX, where XXXXX is your's kernel version.
Then after kernel command you need to execute initrd command:
initrd /boot/initrd-XXXXX
/boot/initrd-XXXXX is the full path to your initrd file, XXXX is the version of your kernel. initrd file usually is located in the same directory where the kernel is. You can also try to find it with GRUB's find command.
If you are lucky and you did everything right you can enter the last command:
boot
It should load your FC5.
One more thing. When you are in Linux go to /boot/grub/grub.conf and add few lines to it, it almost the same you have entered in the command-line (# - is the comment, everything after that symbol will be ignored by GRUB):
#FC5 boot
title Fedora Core 5 # Title that will be displayed in boot menu
root (hd0,0) # should be the same as you entered in command-line
kernel /boot/vmlinuz root=/dev/hda1 # should be the same as you entered in command-line
initrd /boot/initrd-XXXXX # should be the same as you entered in command-line

That's should do it.
 
Old 04-22-2006, 05:52 PM   #5
Mistreated
Member
 
Registered: Aug 2004
Location: Latvia, Riga
Distribution: Gentoo
Posts: 109

Rep: Reputation: 15
I've just thought.. Maybe if you can load your Windows XP you can do all the stuff more easy. Just find the program that can access ext3 partitions from windows (i had one some time ago, it was for ext2, but also perfectly worked for ext3). Then you can observe your partition in more easy way and find all files you need vmlinuz and inird.
Also you can modify your /boot/grub/grub.conf file with this, so next time you boot, you will have "Fedora Core 5" option in your GRUB's boot menu.
Good luck!

P.S. if you wonder where can you find a windows tool for ext2 access, just search the Google. You can find any thing with that!
 
Old 04-24-2006, 06:31 AM   #6
egreg
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Hey, thanks for the useful info! Im not there yet but am making progress, I think.

I found the kernel in (hd0,4)

so I tried:

root (hd0,4)

kernel /boot/vmlinuz-2.6.15-1.2045_FC5 root=/dev/hdc5

initrd /boot/initrd-2.6.15-1.2045_FC5.img

boot

And it looks promising, like it is booting, but after a bit I get a kernel panic --- messages in part say stuff like
...
"
no fstab.sys, mounting internal defaults
Switching to new root and running init
unmounting old /dev
unmounting old /proc
unmounting old /sys

Kernel panic - not synching :Attempting to kill init
"
then some hex codes

I notice that if I boot in rescue mode, I see that have the following in /boot:

grub/
initrd-2.6.15-1.2045_FC5.img
system.map-2.6.15-1.2045_FC5.img
config-2.6.15-1.2045_FC5.img
vmlinuz-2.6.15-1.2045_FC5.img

Should I be doing anything with the config and system.map files?
 
Old 04-24-2006, 07:54 AM   #7
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
First of all try to learn what the device name is for your HD. Is it /dev/hdc or /dev/hda or ... ?

Boot into the rescue mode and run the command 'fdisk -l /dev/hdc' presuming /dev/hdc is the disk you are booting from. Now looking at the list you should be able to figure out which of the partitions is your root device, and which one is the boot and so on. If you want to make sure which is which, you can do so by mounting the partition on some mountpoint and issue an 'ls' command. For eg. if you want to see if /dev/hdc5 is your root partition, mount it like this:

mount /dev/hdc5 /mnt

Change to the directory /mnt and issue an 'ls' command. This would tell you what the partition contains.

Once having found out about the partitions, booting should be fairly simple. Remember, from GRUB's point of view, partition numbers start from 0. Thus /dev/hdc5 would be (hd0,4) from GRUB's point of view, provided /dev/hdc is the disk you're boooting from.

Quote:
root (hd0,4)

kernel /boot/vmlinuz-2.6.15-1.2045_FC5 root=/dev/hdc5
The above says /dev/hdc5 which is (hd0,4) from GRUB's point of view is the root partition i.e. / and also holds /boot in it. This is allright if you do no have a seperate partition for /boot.
 
Old 04-25-2006, 06:03 PM   #8
egreg
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Original Poster
Rep: Reputation: 0
I am still not there.
I tried the fdisk -l /dev/hdc and got:

/dev/hdc1 ..... Dell Utility
/dev/hdc2 ..... HPFS/NTFS
/dev/hdc3 ..... CP/M/CTOS
/dev/hdc4 ..... W95 Extd
/dev/hdc5 ..... LINUX
/dev/hdc6 ..... LINUX SWAP
/dev/hdc7 ..... W95 FAT32

which seems to confirm that /dev/hdc5 is right

Then I discovered i still had an old grub.conf copy laying around, dating from them machine's FC3 days it has (in part):

# 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,4)
# kernel /boot/vmlinuz-version ro root=/dev/hdc5
# initrd /boot/initrd-version.img
#boot=/dev/hdc
default=0
timeout=5
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$Hwxd/fea$S3ak6sCqQZDyJyDr3ABOY0
title Fedora Core (2.6.12-1.1372_FC3)
root (hd0,4)
kernel /boot/vmlinuz-2.6.12-1.1372_FC3 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.12-1.1372_FC3.img
---------------------------

(except with better formatting)


So this time I tried:

root (hd0,4)

kernel /boot/vmlinuz-2.6.15-1.2045_FC5 ro root=LABEL=/ rhgb

initrd /boot/initrd-2.6.15-1.2045_FC5.img

boot



I get exactly ther same output including kernel panic. The tail is:

...
Loading ext3.ko module
Trying to resume from LABEL=SWAP-hdc6
No suspend signature on swap, not resuming
Creating root device
Mounting root filesystem
Synaptics touchpad model:1 fw 5.9, id 0x256eb1 caps 0x804713/0x0
kjournalstarting Commit interval 5 seconds
EXT3-fs mountied filesystem with ordered data mode
Setting other file systems
Setting up root fs
input Syn PS/2Synapticstouchpad as /class/input/input-
no fstab.sys, mounting internal defaults
Switching to new root and running init
unmounting old /dev
unmounting old /proc
unmounting old /sys
Kernel panic -not synching:Attempted to kill init!
[<c011a23e>] panic+0x3e/0x170 [<c011cede>]do-exit+0x71/0x6c8
[<c0145fe5>]do_munmap+0x184/0x19c
[<c011d5b9>]sys_exit_group+0x0/0xd
[<c0102bc1>]sys_call_call+0x7/0x6


Any ideas what I might be doing wrong???
 
Old 04-26-2006, 02:02 AM   #9
egreg
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Original Poster
Rep: Reputation: 0
I dont know if it helps, but this is what my /etc/fstab looks like at the moment. Seems to be dynamically generated.


# This file is edited by fstab-sync - see 'man fstab-sync' for details

LABEL=/.........../..............ext3 defaults 1 1
/dev/hdc7........./data..........vfat defaults 0 0
none............../dev/pts.......devpts gid=5,mode=620 0 0
none............../dev/shm.......tmpfs defaults 0 0
none............../proc..........proc defaults 0 0
none............../sys...........sysfs defaults 0 0
LABEL=SWAP-hdc6....swap..........swap defaults 0 0
/dev/hdc2........../mnt/windows_xp ntfs users,owner,ro,umask=000 0 0
/dev/hda.........../media/cdrecorder. auto pamconsole,exec,noauto,managed 0 0


('....'s added for formatting)
 
Old 04-26-2006, 04:10 AM   #10
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
Don't understand why the cdrecorder get the drive letter hda !! Do you have the CD drive set up as the primary master ? And, the hard disk as the secondary master ? Not sure, if this could be the reason ! May be not !

Would you like to try and set up them up the other way - HD as the primary master and CD as the Secondary master or on any other slot. Change the entries in /etc/fstab accordingly and try boot off.

In the meanwhile, try passing the argument pci=conf2 to the kernel. See if it works.

Does it recognize your harddisk and lists the partitions correctly ? I mean - check the boot messages.
 
Old 04-26-2006, 08:49 AM   #11
egreg
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Original Poster
Rep: Reputation: 0
I think the /etc/fstab is generated dynamically, by what rules I dont know. I wonder if the cdrecorder being hda has anything to to with me grabbing this copy of fstab whil I had the machine booted from a rescue disk in the cd drive.

Do you suggest editing fstab so that all instances of hdc -> hda and vice versa?

What does pci=conf2 do?

Regarding the boot messages, what I quoted above, I just transcribed into a notebook. Is there some way to retrieve the log of a failed boot, if I boot up in rescue mode?
 
  


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
New FC5 Installation: grub error 15 rps63ifid Fedora 10 05-30-2009 07:48 AM
FC5 and GRUB JLuv3k7 Fedora - Installation 15 03-29-2006 10:22 PM
FC5 Grub error 17 captainpete Fedora 3 03-28-2006 10:10 PM
Manual GRUB configuration for FC5 BobNutfield Fedora 5 03-28-2006 12:56 AM
My Grub Doesnt Work. Tolentino Linux - Software 1 02-18-2002 01:26 AM

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

All times are GMT -5. The time now is 12:43 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
Open Source Consulting | Domain Registration