Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-06-2004, 01:47 PM   #1
LQ Newbie
Registered: Apr 2004
Posts: 15

Rep: Reputation: 0
GRUB and FC2

Okay, so I admit I'm still on the learning curve with Linux. Been an M$ lifer since the Windows 3.x days and have only been playing around with RedHat 9.0 for about the last 6 mos - 1 year.

I have learned a lot playing around with RH9, but alas lately I've realized that I need to move on to FC2 if I want to keep up with what's being supported by most software projects.

So I burned all the FC2 ISO's last night and ran the installation on an old Comqrap desktop that I use just to play with. Installation runs fine and when it comes to the bootloader set up screen, I leave everything as default and make no changes.

Sure enough, as I experienced with RH9, defaulting to GRUB just takes me to the GRUB prompt when I reboot and from there, I have no clue what I'm doing. I do not get a menu or splash screen, just the prompt. Somehow, I don't think this is right... but obviously, I have no clue.

Previously with RH9, I did a full re-install and selected LILO, which worked find and served its purpose. With FC2, LILO doesn't exist as an option.


Much thanks in advance...

Old 10-06-2004, 02:24 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Booting a system from the GRUB prompt:

Booting the system from a GRUB prompt is simple and straight-forward. You will specify options in the same order that they are listed in the menu.lst examples, with an extra step to get it all going. For example, to boot a Linux system from the GRUB prompt, you would enter commands as in the following example. The example would be for a system with Linux installed on the first partition of the first drive, with the /boot/grub directory located off / and not in its own partition.

grub>root (hd0,0)

grub>kernel = /boot/vmlinuz-pc97-2.2.14-modular root=/dev/hda1


The first line, root (hd0,0) tells GRUB where the root is located._ Note once again that this is the root for GRUB, and not the filesystem root /. This is the location of the Stage 1, 1.5 and 2 image files.

The second line, kernel = /boot/vmlinuz-pc97-2.2.14-modular_ root=/dev/hda1, is the location of your kernel, and any options that need to be passed to the kernel. For example, if the root of the OS (/) was located on a different partition that /boot/grub, you would specify it on this line. Other options such as noapic, nosmp, debug=2 and vga=normal would also be specified on this line.

The third line, boot, is the magic command that gets the whole thing_ going. It uses the information specified before it to boot the OS. In this example, it would try to load the kernel from /boot and use
/dev/hda1 as the root filesystem.

Other OS's would be similar, using the options required for the particular OS entered on the GRUB command line before the boot command is given.
Installing GRUB on your system.
Installation of GRUB on your system is also simple and_ straight-forward. Once at the GRUB prompt, enter the following to install GRUB.

grub>root (hd0,0)

This is the location of the root for GRUB, NOT the root of your filesystem. This is the drive and partition that have your stage1, 1.5 and stage 2 files (located in /boot/grub). With GRUB treating all hard drives, IDE SCSI and others all the same, it can become confusing which drive actually contains the grub root. Luckily, there is a very simple way to find where these files are located. From the GRUB command prompt, type the following command:
grub>find /boot/grub/stage1

This will return a response similar to the following:

grub> find /boot/grub/stage1

If you have multiple drives that contain this file, it will list all locations that it was found at.

Once this is set, type the following:

grub>setup (hd0)
This is the location that you want the stage1 image to load to._ (hd0) would load stage1 to the MBR of the first hard drive. This is the desired option for booting multiple OS's, using GRUB as the primary bootloader/menu. If for example you want to load GRUB to the first partition of the first drive, you would issue the command:

grub>setup (hd0,0)

This would be the preferred option if you either do not want to use the MBR for GRUB, or you are using another bootloader such as Boot Magic to boot the system, and want to chainload GRUB from that other

Typing this command will return something similar to the following:

grub> setup (hd0)

Run "embed /boot/grub/e2fs_stage1_5 (hd0)"

16 sectors are embedded.

Run "install /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2"

This will have successfully loaded grub, although it does have a problem. It will not have installed GRUB to use your menu.lst file. The solution to this is simple. Since GRUB has now provided you with all the necessary options for the stage1, 1.5 and 2 installation, simply duplicate the following portion of the last line:

install /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2

and add (hd0,0)/boot/grub/menu.lst to the end so that the line would read:
install /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 (hd0,0)/boot/grub/menu.lst
This will install GRUB so that it uses the /boot/grub/menu.lst file for your boot options. Note that the install lines shown above are all on one line, although they may wrap due to length as they did in the formatting of this document.

Once this is completed, type quit to exit the GRUB menu, and restart your system. You should now boot using GRUB, with the options specified in your menu.lst file presented to you on boot.

The forgoing is an excerpt from "Zen and the Art of Using Grub". Note that it will work on SuSE because SuSE uses /boot/grub/menu.lst as the config file. I believe that FC uses /boot/grub/grub.conf instead. So adjust accordingly.
Old 10-06-2004, 03:10 PM   #3
LQ Newbie
Registered: Apr 2004
Posts: 15

Original Poster
Rep: Reputation: 0
I tried using some of those commands posted above (after doing some research on my own before resorting to posting for help on here) and all I got was errors.

This may seem like a silly question and perhaps this is an incorrect assumption on my part, but shouldn't I get a splash screen giving me the option to choose FC2?? Or am I going to have to boot the OS from the command line every time --- that seems rather annoying and cumbersome. At least with LILO on RH9, it would automatically boot to a default if left on its own.

Anyone experienced anything similar to this? From what I can remember, the automatic partitioning of the installer put /boot in its own partition.... is this part of the problem?



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 recover GRUb of FC2 ??? executive Linux - General 1 04-18-2005 04:58 AM
Fc2 - Grub Error LZ5 Eagle Fedora 12 11-18-2004 10:24 PM
GRUB to LILO on FC2 sevi Linux - Newbie 21 08-25-2004 12:39 PM
FC2 on SATA no GRUB! obiwanshinobi Fedora - Installation 6 07-30-2004 09:59 AM
GRUB problem (FC2) darkranger Linux - Newbie 3 05-30-2004 10:27 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration