O'Reilly logo

Linux in a Nutshell, 6th Edition by Robert Love, Stephen Figgins, Ellen Siever, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Installing GRUB

Installing GRUB involves two stages. First, you install the GRUB files on your system, either by compiling and installing the source tarball or from a package. That puts the GRUB files in the correct locations on your system. The second step is to install the GRUB software as your boot manager. This is the step we describe in this section.

If you installed GRUB as part of your Linux installation, the distribution’s installation program took care of both stages of installing GRUB, and you’ll see the GRUB menu when you boot Linux. If you didn’t install GRUB as part of your Linux installation, you have two choices. The easiest way to install GRUB is with the grub-install shell script that comes with GRUB. If grub-install doesn’t work, or if you want to do the installation manually, you can run the grub command and issue the installation commands yourself.

The following sections describe how to create a GRUB boot CD, a GRUB boot floppy, and how to install GRUB. You can create a GRUB boot disk for everyday use or to have for an emergency.

Creating a GRUB boot CD

The following instructions make a CD that boots to GRUB:

  1. Make a directory that will hold the GRUB iso image to be written to CD:

    $ mkdir -p grubiso/boot/grub     # make parent dirs if needed
  2. Copy the file stage2_eltorito[3] to the new directory from the directory where GRUB was installed (in this example /usr/lib/grub/x86_64-pc):

    $ cp /usr/lib/grub/x86_64-pc grubiso/boot/grub

    You can move other files to the directory as well, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required