LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-09-2007, 06:01 PM   #1
creon
LQ Newbie
 
Registered: May 2007
Posts: 18

Rep: Reputation: 0
grub doesn't boot fedora 7


Hello, I've been trying to run Fedora on my USB HDD for quiet a long time now and still couldn't succeed. Here is what i did:
I first installed fedora on my USB HDD. There are three partitions on the usb hdd, two being ntfs. I installed fedora to the third partition which fedora recognizes as sdb1,3,4 (boot,root,swap). On boot loader configuration, ichanged the drive order and made sdb first drive, and installed grub to /dev/sdb1. i completed the installation. Checked my grub.conf file. everything looks ok. device.map says (hd0) is /dev/sdb and that is what i see on grub.conf. So everything seems ok.
When I reboot my PC and edit bios settings to boot from usb hdd, it loads grub. But in stead of the familiar grub screen, a command screen pops up saying "minimal bash-like editing supported etc.etc. etc. .... grub>". I tried to boot linux manually by typing boot and it says "kernel must beloaded first". Then i type "kernel (hd0,0)/vm->TAB" and it loads the kernel. Then i say boot and it reboots the pc and everything starts from the beginning. Please share with me if you know what to do and help me out. Thanks.
 
Old 06-10-2007, 01:40 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by creon
But in stead of the familiar grub screen, a command screen pops up saying "minimal bash-like editing supported etc.etc. etc. .... grub>".
I think it is not finding your grub.conf file. When it puts you at the grub prompt, try typing

find /grub/grub.conf

This will search all of your partitions for this file. Also note that on some installations the configuration file is called menu.lst rather than grub.conf. I have read that the older RHs made menu.lst a symlink to grub.conf.

Quote:
I tried to boot linux manually by typing boot and it says "kernel must beloaded first". Then i type "kernel (hd0,0)/vm->TAB" and it loads the kernel. Then i say boot and it reboots the pc and everything starts from the beginning.
I think you probably need to specify an initrd, and maybe some other things to get a proper boot. You can use grub.conf as a guide.
 
Old 06-10-2007, 04:04 AM   #3
creon
LQ Newbie
 
Registered: May 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by blackhole54
I think it is not finding your grub.conf file. When it puts you at the grub prompt, try typing

find /grub/grub.conf

This will search all of your partitions for this file. Also note that on some installations the configuration file is called menu.lst rather than grub.conf. I have read that the older RHs made menu.lst a symlink to grub.conf.


I think you probably need to specify an initrd, and maybe some other things to get a proper boot. You can use grub.conf as a guide.
Thanks a lot for your reply. well i think you are right about my problem. i did as you say (find) and it returns nothing. my usb hdd is (hd0) and when i say for example "find /initrd-2.1.blabla" it finds the initrd. and it does find the kernel and everything else in the boot directory. But when i try to find something in /grub/, it doesn't. It just behaves like grub folder is not there. But i know it is. I ran grub-install again and the result didn't change. Any ideas?

and for the second part, i entered all boot parameters manually. just like in grub.conf:
>root (hd0,0)
>kernel /vmlinuz-.... ro root=/dev/Vol.....
>initrd /initrd-2.....
>boot

and it just reboots the computer and everything starts from the beginning. Am i doing something wrong? any ideas now?

Last edited by creon; 06-10-2007 at 06:29 AM.
 
Old 06-10-2007, 06:32 AM   #4
creon
LQ Newbie
 
Registered: May 2007
Posts: 18

Original Poster
Rep: Reputation: 0
well i am having more trouble now. a few reboots later i lost the grub command line also and just get a "GRUB _". so i reinstalled fedora and did everything exactly the same. now i can't even load the kernel. when i try to load i get an error 13. in grub manual it says:
"13 : Invalid or unsupported executable format
This error is returned if the kernel image being loaded is not recognized as Multiboot or one of the supported native formats (Linux zImage or bzImage, FreeBSD, or NetBSD)."
but i couldn't find what to do about it. Please somebody help!
 
Old 06-10-2007, 07:00 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by creon
There are three partitions on the usb hdd, two being ntfs. I installed fedora to the third partition which fedora recognizes as sdb1,3,4 (boot,root,swap). On boot loader configuration, ichanged the drive order and made sdb first drive, and installed grub to /dev/sdb1. i completed the installation.
First, the 3rd partition would not be identified as "sdb1,3,4". It is not clear from this what partitions you now have. Can you boot from the Fedora CD and run "fdisk -l".

Second, what is booting this system? What bootloader is in the MBR of the first drive? (If you put GRUB in sdb1, then it is in the boot sector of that partition, and not in the MBR---there always must be boot code on the MBR of the first drive (or on a floppy))
 
Old 06-10-2007, 07:25 AM   #6
creon
LQ Newbie
 
Registered: May 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pixellany
First, the 3rd partition would not be identified as "sdb1,3,4". It is not clear from this what partitions you now have. Can you boot from the Fedora CD and run "fdisk -l".

Second, what is booting this system? What bootloader is in the MBR of the first drive? (If you put GRUB in sdb1, then it is in the boot sector of that partition, and not in the MBR---there always must be boot code on the MBR of the first drive (or on a floppy))
i only have windows running now so i cant copy the fdisk -l output but i'll write what it says. My hdd is 500 GB and there are 2 ntfs partitions on it also. There is /dev/sdb1 which is /boot, /dev/sdb2 is an extended volume (i guess it is called so) which holds 2 ntfs partitions (i am certain with this) and doesn't bother me right now. And /dev/sdb3 is root partition (/). On sda there is no bootloader. i installed grub to /dev/sdb. That is how i do it: on installation fedora asks me where i want grub loaded. I check "configure advanced bootloader options" box. So it asks me if i want to load it to /dev/sda (MBR) or /dev/sdb1 (first sector of the boot partition). I change the drive order and move my usb hdd to first place. and then the list changes to /dev/sdb (MBR) or /dev/sdb1 (first sector of the boot partition). I choose the first option (/dev/sdb (MBR)) and proceed with the installation. And get the issues i mentioned above. Choosing the second option (/dev/sdb1) doesn't change the result.

i am quiet a newbie and don't really know what inforation to give. please guide me with this. thanks

Last edited by creon; 06-10-2007 at 07:26 AM.
 
Old 06-10-2007, 08:07 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Can you boot up from the Fedora CD? Go into a terminal and look at the contents of the drive.

first, to verify the partition references:
fdisk -l
Then, to look at the "/boot" partition (what you called sdb1), look in /mnt (cd /mnt) to see if a mount point is already there. If not:
mkdir fedora
mount /dev/sdb1 fedora
cd fedora
ls

you should see a grub directory
cd grub
look for a file named "menu.lst" or "grub.conf" Tell us what is in the first entry that looks something like this:
Code:
title Fedora7
root (hd0,9)
kernel /boot/vmlinuz root=/dev/sda10
initrd /boot/initrd
boot
(Don't post anything starting with "#"--those lines are comments

Finally, this is bugging me:
Quote:
So it asks me if i want to load it to /dev/sda (MBR) or /dev/sdb1 (first sector of the boot partition). I change the drive order and move my usb hdd to first place. and then the list changes to /dev/sdb (MBR) or /dev/sdb1 (first sector of the boot partition). I choose the first option (/dev/sdb (MBR)) and proceed with the installation.
If you change the drive order before attempting to install, then the Fedora installer should report that drive as sda. Your post seems to be saying that you somehow changed the order DURING the Fedora install???

Finally, how about putting GRUB on the first (internal?) drive? (The one that was appearing as sda before you switched the order)
 
Old 06-10-2007, 08:36 AM   #8
creon
LQ Newbie
 
Registered: May 2007
Posts: 18

Original Poster
Rep: Reputation: 0
i've installed fedora core 6 while waiting and everything i said before is still the same. only sda became hda and sdb became sda. Below is what you asked.
here it is:
Code:
>fdisk -l
Disk /dev/hda: 80.0 GB .....................
...
Device        Boot ......... Id ...... System
/dev/hda1       *             7       HPFS/NTFS 
/dev/hda4                     f     W95 Ext'd (LBA)
/dev/hda5                     7       HPFS/NTFS

Disk /dev/sda : 500.1 GB .....................
...
Device        Boot ......... Id ...... System
/dev/sda1       *             83        Linux
/dev/sda2                     f     W95 Ext'd (LBA)
/dev/sda3                     8e       Linux LVM
/dev/sda4              (i forgot what it says here, will look if you ask (must be swap)) 
/dev/sda5                     7       HPFS/NTFS 
/dev/sda6                     7       HPFS/NTFS

>df
Filesystem ..........................................mounted on
/dev/VolGroup00/LogVol00
                                                      /
/dev/sda1                                             /boot

>vi device.map

(hd1) /dev/hda
(hd0) /dev/sda

>vi grub.conf

default = 0
timeout = 5
splashimage = (hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.18-1.2798.fc6)
     root (hd0,0)
     kernel /vmlinuz-2.6..... ro root=/dev/VolGroup00/LogVol00
     initrd /initrd-2.....
i need this to work in diffrent computers so i need the bootloader to be on the usb disk. And for what you asked: i didn't do anything diffrent. I just followed the installation steps. And when it is asked, i did as i said before. With fedora core 6, internal hdd is hda and usb disk is sda. I hope i did gave enough information. Thanks again for your time.

Last edited by creon; 06-10-2007 at 08:39 AM.
 
Old 06-10-2007, 09:32 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
The only thing I can think of is that GRUB is getting installed pointing to the wrong partition. I think this will happen if you change the boot order after installing GRUB.

Try this:
Set the BIOS to boot the Linux drive
Boot from the live CD, go to a terminal and open a GRUB shell like so:
grub
geometry (hd0)
geometry (hd1)
(These will show which drive (in grub-speak) has the Linux installation. Assuming the BIOS is set to boot the Linux drive, it should show up as hd0)

THEN:
root (hdX,Y) X and Y are the drive and partition numbers for the partition where /boot is--eg hd0,0 for the first partition of the first drive--grub counts form zero
setup (hd0) Installs grub to the mbr of the drive that GRUB sees as #1

Now, reboot and see if it works.
 
Old 06-10-2007, 10:15 AM   #10
creon
LQ Newbie
 
Registered: May 2007
Posts: 18

Original Poster
Rep: Reputation: 0
i did so. here is what i get:

Code:
#grub
grub>geometry (hd0)
drive 0x80: C......,/dev/hda
partition num: 0 , Filesystem type unknown, partition type 0x7
....
grub>geometry (hd1)
drive 0x80: C......,/dev/sda
partition num: 0 , Filesystem type is ext2fs, partition type 0x83
partition num: 2 , Filesystem type unknown, partition type 0x8e
partition num: 4 , Filesystem type unknown, partition type 0x7
partition num: 5 , Filesystem type unknown, partition type 0x7

grub> setup (hd1)
everything goes "ok", i reboot my PC and get an error 2 which is "2 : Bad file or directory type
This error is returned if a file requested is not a regular file, but something like a symbolic link, directory, or FIFO." according to GRUB manual. I think that is the same problem I had before.
When I make grub find anything in the /boot/grub directory, it doesn't. It finds everything in the /boot directory, but not /boot/grub. I can navigate to /boot/grub directory and open and view everything in it, but grub says it isn't there. I think this causes the problem. Do you know why this happens?
 
Old 06-10-2007, 11:41 AM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
It looks like you did not include the root command
 
Old 06-10-2007, 11:44 AM   #12
creon
LQ Newbie
 
Registered: May 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pixellany
It looks like you did not include the root command
oops. sorry i did include it. i just forgot to write it here. but i did include it
 
Old 06-10-2007, 11:55 AM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I think the problem of /boot/grub and /grub is Red Hat-related. This distro family, which Fedora belongs, tries very hard to sell LVM to every user.

A LVM is not recognised by any Linux boot loader and so a Red Hat distro, in pushing hard for the LVM, has to create a different partition for /boot in Type 83 with a filing system both Lilo and Grub can read.

Thus inisde a Red Hat distro the filing tree is complete with /boot, /root, /home etc but its /boot is on a separate partition which must be mounted. When Grub reads /boot as a separate partition it can only find /grub because the kernel has not been loaded and so the /boot has not been mounted by /etc/fstab.

Hope the above explains the confusion of /boot/grub in Linux and /grub in Grub prompt.

If a Red Hat user doesn't want the complication of a LVM all he/she needs to do is to give only one partition for its installation. That will force the installer to install every directory inside it as a normal Linux.
 
Old 06-10-2007, 11:58 AM   #14
creon
LQ Newbie
 
Registered: May 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by saikee
I think the problem of /boot/grub and /grub is Red Hat-related. This distro family, which Fedora belongs, tries very hard to sell LVM to every user.

A LVM is not recognised by any Linux boot loader and so a Red Hat distro, in pushing hard for the LVM, has to create a different partition for /boot in Type 83 with a filing system both Lilo and Grub can read.

Thus inisde a Red Hat distro the filing tree is complete with /boot, /root, /home etc but its /boot is on a separate partition which must be mounted. When Grub reads /boot as a separate partition it can only find /grub because the kernel has not been loaded and so the /boot has not been mounted by /etc/fstab.

Hope the above explains the confusion of /boot/grub in Linux and /grub in Grub prompt.

If a Red Hat user doesn't want the complication of a LVM all he/she needs to do is to give only one partition for its installation. That will force the installer to install every directory inside it as a normal Linux.
thanks. so you say i should make only one root partition and nothing else? no swap either?
 
Old 06-10-2007, 12:30 PM   #15
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Swap is always needed as a separate partition.

On record I have installed every of my Linux in a single partition, Red Hat 9 and Fc2 to FC6 included.

Red Hat is server-orientated distro and multiple partitions may be useful to the administrator who wants to play tunes with the read/write access for the users.

For a desktop machine you will find single partition Linux is easier to boot, to maintain, to diagnose, to resize and ultimately to migrate.
 
  


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
Dual-boot XP and Fedora using GRUB? Peter6000 Linux - Newbie 11 12-28-2006 07:32 AM
Unable To Boot To Fedora When Grub Installed in /boot Partition FedoraNewbie Linux - Newbie 4 09-26-2006 03:46 AM
Messed with grub file, now can't boot Fedora 5 wildmtncrazy Linux - General 10 06-08-2006 06:02 PM
fedora core 4 with grub problem..won't boot TheDude05 Linux - General 5 08-16-2005 02:26 PM
Fedora 3 Won't Boot with GRUB Rick Zollner Red Hat 6 12-13-2004 10:59 AM

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

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