LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-04-2007, 01:52 PM   #1
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Linux Mint, FreeBSD, Android
Posts: 356

Rep: Reputation: 32
after F7 upgrade, only get grub prompt


Hi all,

I just upgraded my FC6 system to F7 from the DVD. Everything appeared to go well, but now when I try to boot, the initial bootup sequence just drops me into a grub prompt.

I booted the DVD with the rescue option. It mounted the F7 partition
and I could verify that /boot/grub/menu.1st appeared ok: it listed
both the last FC6 kernel as well as the new 2.6.21 version.

What's perplexing me at this point is that when I boot from the F7 DVD, it gives me drives different dev names than when booting from disk. Normally, my boot drive is /dev/sdd, but when booting from the CD fdisk lists it as /dev/sdc.

I've tried both /dev/sdd and /dev/sdc on the #boot line in menu.lst to no avail; it keeps dropping me back in the grub prompt. I've tried booting from the grub prompt; it accepts the kernel and initrd commands, then I type boot, but I get kernel panic becauase it can't find the root partition.

At this point, I have absolutely no idea what to do, mainly because I have no idea what is going wrong. Any suggestions would be most welcome.

Last edited by Kropotkin; 06-04-2007 at 03:38 PM.
 
Old 06-04-2007, 03:19 PM   #2
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Rep: Reputation: 58
Do you remember what your drives were in fc6?
 
Old 06-04-2007, 03:41 PM   #3
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Linux Mint, FreeBSD, Android
Posts: 356

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by nomb
Do you remember what your drives were in fc6?
Yes, sda, sdb, sdc were (are) a single LVM partition containing data. sdd was my boot drive.

When I installed F7, I had several USB drives online, and the installer seems to have seen them first, hence my install drive became sdg. I have now taken them offline, but the boot DVD still doesn't see the boot drive as sdd, as it was originally.

What exactly did I do wrong and how do I fix this mess?

TIA

Last edited by Kropotkin; 06-04-2007 at 04:06 PM.
 
Old 06-05-2007, 10:23 AM   #4
Booboo
LQ Newbie
 
Registered: Apr 2005
Distribution: Fedora
Posts: 22

Rep: Reputation: 0
I've done an upgrade myself to from FC6 to F7 and in my copy of FC6 (I had win partitions mounted) partitions where mounted as : hdb1, hdb5 and so on
But in F7 hdb1 had become sdb1 and hdb5 has become sdb5
In FC6 sda, sdb, sdc ... and so on, where my usb flash disks (thumb drives)
In F7 they seem to have changed the naming of the devices
 
Old 06-05-2007, 11:05 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Quote:
In F7 they seem to have changed the naming of the devices
Its not just Fedora. The device name change is due to a change in kernel 2.6.21 where IDE and SATA drives now both use libsata.
 
Old 06-05-2007, 04:04 PM   #6
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Linux Mint, FreeBSD, Android
Posts: 356

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Booboo
I've done an upgrade myself to from FC6 to F7 and in my copy of FC6 (I had win partitions mounted) partitions where mounted as : hdb1, hdb5 and so on
But in F7 hdb1 had become sdb1 and hdb5 has become sdb5
In FC6 sda, sdb, sdc ... and so on, where my usb flash disks (thumb drives)
In my case, I don't have any internal IDEs, just four SATAs. The weird thing is that Anaconda gives them different device names. In FC6, my root was sdd3, F7 sees it as sdc3. I did notice that having a couple of USB drives online during the install only complicated things; anaconda assigned them device names first before the internal HDs.

I've been trying to boot from the grub prompt by entering the kernel, initrd, and boot commands, which works up to a point. The system starts to boot, then at a certain moment I get kernel panic; it can't mount root, no matter what parameter I use for kernel, ie: kernel /vm... root=LABEL=/ or root=/dev/sdc3

Root is definitely there; I can chroot to it from the DVD in rescue mode, but I can't get grub to find it.

At this point, I may try a fresh install, but I am holding off in case I can find what I assume must be a simple fix.

At the moment, the MBR is on sda, while the OS is on sdc, where I used to have the MBR as well. Is there any easy way of moving the MBR back to sdc?
TIA

Last edited by Kropotkin; 06-05-2007 at 05:27 PM.
 
Old 06-05-2007, 05:10 PM   #7
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560

Rep: Reputation: 56
A good way to get around this problem is to use partition labels rather than device names in your grub.conf and /etc/fstab files. Check out the Upgrade Related Issues section of the Release Notes.

Bill
 
Old 06-05-2007, 05:31 PM   #8
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Linux Mint, FreeBSD, Android
Posts: 356

Original Poster
Rep: Reputation: 32
Bill, I've checked with e2label: my root partition is labelled "/", so AFAICT labelling doesn't seem to solve the particular issue I am having.
 
Old 06-06-2007, 08:47 AM   #9
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560

Rep: Reputation: 56
My apologies... Sometimes I post a little too quickly without reading through everything. The first time I read your post I did not see that you were/are using LVM. With LVM the root= part of the kernel line will point to something like /dev/VolGroup00/LogVol00. With LVM you don't use physical locations like /dev/sda1 or a label.

There are obviously some problems with your grub.conf or menu.lst if you prefer. Follow these steps and we'll see if we can't straighten it out.

1) Boot up and get to the grub command line. At the command line type the following.
Code:
find /vmlinuz-2.6.21-1.3194.fc7
It should return something like (hd0,0). This represents the (drive,partition) where your kernel, initrd.img and grub.conf are located. This will become the first command after the title of the entry you want to boot. For example, root (hd0,0). Do not confuse this with the root of your filesystem.

2) Boot up using the rescue CD. At the command line type lvscan. This will tell us what your Volume Groups and Logical Partitions look like. You should end up with something like...
Code:
ACTIVE            '/dev/VolGroup00/LogVol00' [18.00 GB] inherit
ACTIVE            '/dev/VolGroup00/LogVol01' [512.00 MB] inherit
The largest one is most likely the logical volume for the root of your filesystem. In my case it is /dev/VolGroup00/LogVol00. root=/dev/VolGroup00/LogVol00 will become the entry after the kernel inside grub.conf. The other one is the logical volume for my swap area.

3) Now let's put this all together inside grub.conf.
Code:
title Fedora (2.6.21-1.3194.fc7)
        root (hd0,0)
        kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.21-1.3194.fc7.img
4) In one of your posts you asked about moving the MBR. The easiest way to do this is by using the command grub-install <device>. In your case it would be grub-install /dev/sdc. After that your BIOS would need to point to that drive for booting. It won't hurt anything to leave the other MBR where it is.

If you still have trouble booting, post your grub.conf and the results of the above commands I listed. Either way, let me know how you make out.

Bill

Last edited by wmakowski; 06-06-2007 at 08:49 AM.
 
Old 06-06-2007, 09:02 AM   #10
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Rep: Reputation: 58
Very good response Bill.
 
Old 06-06-2007, 09:36 AM   #11
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Linux Mint, FreeBSD, Android
Posts: 356

Original Poster
Rep: Reputation: 32
Solved

Hi again everyone,

Thanks for your suggestions Bill. For my part, I should have made clear I am indeed using LVM but only for a large data partition; root is on a normal ext3 partition.

In any case, I solved the problem in the following way:

First, I took my USB drives offline

Then, I booted from the DVD in rescue mode, chrooted to my root partition, and deleted the kernel with rpm -e --nodeps kernel.

Next, I rebooted and went to the installer, and reinstalled F7 (just the kernel in this case; took about three minutes) I made sure to install the MBR on my root disk (sdc); the first time around I let anaconda install it on sda, which I think was a mistake.

Finally, I made sure the disk order was correct in the BIOS (sdc was the first disk).

F7 then booted OK.

I am not exactly sure what went wrong, except that anaconda seems not to be very robust about handling unorthodox (?) device name sequences, ie, it got confused with the USB drives online, which it saw before the internal SATAs.
 
Old 06-06-2007, 10:42 AM   #12
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560

Rep: Reputation: 56
Glad to hear things turned out for the better and you didn't have to do a complete reinstall. Thus far I would have to say F7 was the most complicated install I have ever done except for maybe my first attempt at Gentoo. It was caused by a combination of the new kernel and my older hardware. The system I installed it on would not boot from any of the spins. I ended up building my own boot CD using the kernel and a modified version of the initrd.img from the FC6 install CD. After installing I had to build my own kernel because the one delivered with F7 continued to have issues with my hardware. It was a complicated process, but very satisfying in the end. I learned a lot about how initrd works and how to build a boot CD. Even filed a bug report on bugzilla.

Bill
 
  


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
how to remove grub from the grub prompt haroon110 Fedora - Installation 7 12-22-2005 12:57 PM
How do I use GRUB to boot linux at grub prompt? Trillseker Linux - Newbie 3 12-11-2005 09:26 PM
How do I use GRUB to boot linux at grub prompt? Mustbox Linux - General 2 02-15-2005 02:01 PM
Why grub prompt after installing Grub inder Debian woody 3.0r2? velan Debian 1 04-20-2004 05:55 AM
How do I use GRUB to boot linux at grub prompt? Trillseker Linux - General 5 06-19-2003 07:23 PM

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

All times are GMT -5. The time now is 06:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration