Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Linux Planet
Linux Today
More Free Newsletters

Be a Commerce Partner


















internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article

   LinuxPlanet / Tutorials



Getting Some GRUB For Linux
Installation

Carla Schroder
Monday, April 26, 2004 03:06:54 PM

First, install GRUB. Build from sources, install from packages, I care not, just install it however you choose. So far, you are not fully committed — just installing it to your system does not install it to the MBR.

Next, find out where in the heck your particular Linux parked the GRUB boot image files. The official location is /usr/lib/grub/$ARCH. Red Hat does /usr/share/grub/$ARCH. Like herding cats, is Linux. This is where you find all those stage1, stage1_5, and stage2 thingies.

Installation From A GRUB Floppy

This is the way to install GRUB to the MBR, and create a boot floppy at the same time. Change to your /grub/$ARCH directory, and copy the stage1 and stage2 boot images to a floppy disk:
# dd if=stage1 of=/dev/fd0 bs=512 count=1
# dd if=stage2 of=/dev/fd0 bs=512 seek=1

Now reboot to the floppy disk. You should be greeted by the nice blue GRUB screen:

 GRUB version 0.93  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]

 grub>

First, find the location of the boot files:

grub> find /boot/grub/stage1
(hd0,0)

Now set the root device:

grub> root (hd0,0)

A Digression Into Partition Numbering

GRUB uses its own unique partition numbering scheme; it starts from 0. hd0,0 means the first partition of the first drive, or hda1. Both SCSI and IDE drives are represented by hd. GRUB numbers sequentially, from zero:

hda2     hd0,1
hda3     hd0,2
hda4     hd0,3

But that's not all. Remember, the standard Linux partition table is like this:

1-4      primary partitions
5-up      extended partitions

In GRUB, it's like this:

0-3      primary partitions
4-up      extended partitions

Additional drives are hd1, hd2, etc.

Next: Completing the Installation »

Skip Ahead

1 Preparation
2 Installation
3 Completing the Installation
4 Root Devices and Root Filesystems
5 Easily Restoring LILO





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers