ACC SHELL

Path : /usr/share/doc/manual/opensuse-manuals_en/manual/
File Upload :
Current File : //usr/share/doc/manual/opensuse-manuals_en/manual/cha.grub.html

<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 17. The Boot Loader GRUB</title><link rel="stylesheet" href="susebooks.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Documentation"><link rel="up" href="part.reference.system.html" title="Part IV. System"><link rel="prev" href="cha.boot.html" title="Chapter 16. Booting and Configuring a Linux System"><link rel="next" href="cha.suse.html" title="Chapter 18. Special System Features"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" border="0" class="bctable"><tr><td width="80%"><div class="breadcrumbs"><p><a href="index.html"> Documentation</a><span class="breadcrumbs-sep"> &gt; </span><a href="book.opensuse.reference.html">Reference</a><span class="breadcrumbs-sep"> &gt; </span><a href="part.reference.system.html">System</a><span class="breadcrumbs-sep"> &gt; </span><strong><a accesskey="p" title="Chapter 16. Booting and Configuring a Linux System" href="cha.boot.html"><span>&#9664;</span></a>  <a accesskey="n" title="Chapter 18. Special System Features" href="cha.suse.html"><span>&#9654;</span></a></strong></p></div></td></tr></table></div><div class="chapter" title="Chapter 17. The Boot Loader GRUB"><div class="titlepage"><div><div><h2 class="title"><a name="cha.grub"></a>Chapter 17. The Boot Loader GRUB<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#cha.grub">¶</a></span></h2></div></div></div><div class="toc"><p><b>Contents</b></p><dl><dt><span class="sect1"><a href="cha.grub.html#sec.grub.basic">17.1. Booting with GRUB</a></span></dt><dt><span class="sect1"><a href="cha.grub.html#sec.boot.yast2.config">17.2. Configuring the Boot Loader with YaST</a></span></dt><dt><span class="sect1"><a href="cha.grub.html#sec.grub.entfernen">17.3. Uninstalling the Linux Boot Loader</a></span></dt><dt><span class="sect1"><a href="cha.grub.html#sec.grub.bootcd">17.4. Creating Boot CDs</a></span></dt><dt><span class="sect1"><a href="cha.grub.html#sec.boot.screen">17.5. The Graphical SUSE Screen</a></span></dt><dt><span class="sect1"><a href="cha.grub.html#sec.grub.probs">17.6. Troubleshooting</a></span></dt><dt><span class="sect1"><a href="cha.grub.html#sec.grub.info">17.7. For More Information</a></span></dt></dl></div><a class="indexterm" name="id462600"></a><a class="indexterm" name="id462609"></a><div class="abstract" title="Abstract"><p class="title"><b>Abstract</b></p><p>
   This chapter describes how to configure GRUB (Grand Unified Bootloader),
   the boot loader used in openSUSE®. A special YaST module is
   available for configuring all settings. If you are not familiar with the
   subject of booting in Linux, read the following sections to acquire some
   background information. This chapter also describes some of the problems
   frequently encountered when booting with GRUB and their solutions.
  </p></div><p>
  This chapter focuses on boot management and the configuration of the boot
  loader GRUB. The boot procedure as a whole is outlined in
  <a class="xref" href="cha.boot.html" title="Chapter 16. Booting and Configuring a Linux System">Chapter 16, <i>Booting and Configuring a Linux System</i></a>. A boot loader represents the interface between
  the machine (BIOS) and the operating system (openSUSE). The
  configuration of the boot loader directly impacts the start of the
  operating system.
 </p><p>
  The following terms appear frequently in this chapter and might need some
  explanation:
 </p><div class="variablelist"><dl><dt><span class="term">MBR (Master Boot Record)<a class="indexterm" name="id462654"></a><a class="indexterm" name="id462662"></a><a class="indexterm" name="id462667"></a><a class="indexterm" name="id462676"></a><a class="indexterm" name="id462684"></a></span></dt><dd><p>
     The structure of the MBR is defined by an operating
     system&#8211;independent convention. The first 446 bytes are
     reserved for the program code. They typically hold part of a boot loader
     program or an operating system selector. The next 64 bytes provide
     space for a partition table of up to four entries. The partition table
     contains information about the partitioning of the hard disk and the file
     system types. The operating system needs this table for handling the hard
     disk. With conventional generic code in the MBR, exactly one partition
     must be marked <span class="emphasis"><em>active</em></span>. The last two bytes of the MBR
     must contain a static <span class="quote">&#8220;<span class="quote">magic number</span>&#8221;</span>
     (<code class="literal">AA55</code>). An MBR containing a different value is
     regarded as invalid by some BIOSes, so is not considered for booting.
    </p></dd><dt><span class="term">Boot Sectors<a class="indexterm" name="id462725"></a><a class="indexterm" name="id462734"></a><a class="indexterm" name="id462739"></a></span></dt><dd><p>
     Boot sectors are the first sectors of hard disk partitions with the
     exception of the extended partition, which merely serves as a
     <span class="quote">&#8220;<span class="quote">container</span>&#8221;</span> for other partitions. These boot sectors have
     512 bytes of space for code used to boot an operating system
     installed in the respective partition. This applies to boot sectors of
     formatted DOS, Windows, and OS/2 partitions, which also contain some
     basic important data of the file system. In contrast, the boot sectors
     of Linux partitions are initially empty after setting up a file system
     other than XFS. Therefore, a Linux partition is not bootable by itself,
     even if it contains a kernel and a valid root file system. A boot
     sector with valid code for booting the system has the same magic number
     as the MBR in its last two bytes (<code class="literal">AA55</code>).
    </p></dd></dl></div><div class="sect1" title="17.1. Booting with GRUB"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.grub.basic"></a>17.1. Booting with GRUB<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.basic">¶</a></span></h2></div></div></div><a class="indexterm" name="id462781"></a><a class="indexterm" name="id462790"></a><a class="indexterm" name="id462798"></a><a class="indexterm" name="id462807"></a><a class="indexterm" name="id462815"></a><a class="indexterm" name="id462824"></a><p>
   GRUB comprises two stages. Stage 1 consists of 512 bytes and its
   only task is to load the second stage of the boot loader. Subsequently,
   stage 2 is loaded. This stage contains the main part of the boot loader.
  </p><p>
   In some configurations, an intermediate stage 1.5 can be used, which
   locates and loads stage 2 from an appropriate file system. If possible,
   this method is chosen by default on installation or when initially
   setting up GRUB with YaST.
  </p><p>
   Stage 2 is able to access many file systems. Currently, ext2, ext3,
   ReiserFS, Minix, and the DOS FAT file system used by Windows are
   supported. To a certain extent, XFS, and UFS and FFS used by BSD systems
   are also supported. Since version 0.95 GRUB is also able to boot from a
   CD or DVD containing an ISO 9660 standard file system pursuant to the
   <span class="quote">&#8220;<span class="quote">El Torito</span>&#8221;</span> specification. Even before the system is booted,
   GRUB can access file systems of supported BIOS disk devices (floppy
   disks or hard disks, CD drives and DVD drives detected by the BIOS).
   Therefore, changes to the GRUB configuration file
   (<code class="filename">menu.lst</code>) do not require a new installation of the
   boot manager. When the system is booted, GRUB reloads the menu file
   with the valid paths and partition data of the kernel or the initial RAM
   disk (<code class="literal">initrd</code>) and locates these files.
  </p><p>
   The actual configuration of GRUB is based on four files that are
   described below:
  </p><div class="variablelist"><dl><dt><span class="term"><code class="filename">/boot/grub/menu.lst</code>
    <a class="indexterm" name="id462880"></a></span></dt><dd><p>
      This file contains all information about partitions or operating
      systems that can be booted with GRUB. Without this information, the
      GRUB command line prompts the user for how to proceed. For details,
      see <a class="xref" href="cha.grub.html#sec.grub.menu.change" title="17.1.1.3. Editing Menu Entries during the Boot Procedure">Section 17.1.1.3, &#8220;Editing Menu Entries during the Boot Procedure&#8221;</a>.
     </p></dd><dt><span class="term"><code class="filename">/boot/grub/device.map</code>
    <a class="indexterm" name="id462913"></a></span></dt><dd><p>
      This file translates device names from the GRUB and BIOS notation to
      Linux device names.
     </p></dd><dt><span class="term"><code class="filename">/etc/grub.conf</code>
    <a class="indexterm" name="id462939"></a></span></dt><dd><p>
      This file contains the commands, parameters and options the GRUB
      shell needs for installing the boot loader correctly.
     </p></dd><dt><span class="term"><code class="filename">/etc/sysconfig/bootloader</code>
    <a class="indexterm" name="id462966"></a></span></dt><dd><p>
      This file is read by the perl-bootloader library which is used when
      configuring the bootloader with YaST and every time a new kernel is
      installed. It contains configuration options (such as kernel
      parameters) that will be added by default to the bootloader
      configuration file.
     </p></dd></dl></div><p>
   GRUB can be controlled in various ways. Boot entries from an existing
   configuration can be selected from the graphical menu (splash screen).
   The configuration is loaded from the file <code class="filename">menu.lst</code>.
  </p><p>
   In GRUB, all boot parameters can be changed prior to booting. For
   example, errors made when editing the menu file can be corrected in this
   way. Boot commands can also be entered interactively at a kind of input
   prompt. For details, see <a class="xref" href="cha.grub.html#sec.grub.menu.change" title="17.1.1.3. Editing Menu Entries during the Boot Procedure">Section 17.1.1.3, &#8220;Editing Menu Entries during the Boot Procedure&#8221;</a>. GRUB
   offers the possibility of determining the location of the kernel and the
   <code class="filename">initrd</code> prior to booting. In this way, you can even
   boot an installed operating system for which no entry exists in the boot
   loader configuration.
  </p><p>
   GRUB actually exists in two versions: as a boot loader and as a normal
   Linux program in <code class="filename">/usr/sbin/grub</code>. The latter is
   referred to as the <span class="emphasis"><em>GRUB shell</em></span>. It provides an
   emulation of GRUB in the installed system and can be used to install
   GRUB or test new settings before applying them. The functionality to
   install GRUB as the boot loader on a hard disk or floppy disk is
   integrated in GRUB in the form of the command <span class="command"><strong>setup</strong></span>.
   This is available in the GRUB shell when Linux is loaded.
  </p><div class="sect2" title="17.1.1. The File /boot/grub/menu.lst"><div class="titlepage"><div><div><h3 class="title"><a name="sec.grub.menu"></a>17.1.1. The File <code class="filename">/boot/grub/menu.lst</code><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.menu">¶</a></span></h3></div></div></div><a class="indexterm" name="id463043"></a><a class="indexterm" name="id463051"></a><a class="indexterm" name="id463060"></a><p>
    The graphical splash screen with the boot menu is based on the GRUB
    configuration file <code class="filename">/boot/grub/menu.lst</code>, which
    contains all information about all partitions or operating systems that
    can be booted by the menu.
   </p><p>
    Every time the system is booted, GRUB loads the menu file from the
    file system. For this reason, GRUB does not need to be reinstalled
    after every change to the file. Use the YaST boot loader to modify the
    GRUB configuration as described in
    <a class="xref" href="cha.grub.html#sec.boot.yast2.config" title="17.2. Configuring the Boot Loader with YaST">Section 17.2, &#8220;Configuring the Boot Loader with YaST&#8221;</a>.
   </p><p>
    The menu file contains commands. The syntax is very simple. Every line
    contains a command followed by optional parameters separated by spaces
    like in the shell. For historical reasons, some commands permit an
    <code class="literal">=</code> in front of the first parameter. Comments are
    introduced by a hash (<code class="literal">#</code>).
   </p><p>
    To identify the menu items in the menu overview, set a
    <code class="literal">title</code> for every entry. The text (including any
    spaces) following the keyword <code class="literal">title</code> is displayed as a
    selectable option in the menu. All commands up to the next
    <code class="literal">title</code> are executed when this menu item is selected.
   </p><p>
    The simplest case is the redirection to boot loaders of other operating
    systems. The command is <code class="literal">chainloader</code> and the argument
    is usually the boot block of another partition, in GRUB block
    notation. For example:
   </p><pre class="screen">chainloader (hd0,3)+1</pre><p>
    The device names in GRUB are explained in
    <a class="xref" href="cha.grub.html#sec.grub.devices" title="17.1.1.1. Naming Conventions for Hard Disks and Partitions">Section 17.1.1.1, &#8220;Naming Conventions for Hard Disks and Partitions&#8221;</a>. This example specifies the first
    block of the fourth partition of the first hard disk.
   </p><p>
    Use the command <code class="literal">kernel</code> to specify a kernel image. The
    first argument is the path to the kernel image in a partition. The other
    arguments are passed to the kernel on its command line.
   </p><p>
    If the kernel does not have built-in drivers for access to the root
    partition or a recent Linux system with advanced hotplug features is
    used, <code class="filename">initrd</code> must be specified with a separate
    GRUB command whose only argument is the path to the
    <code class="filename">initrd</code> file. Because the loading address of the
    <code class="filename">initrd</code> is written into the loaded kernel image, the
    command <code class="literal">initrd</code> must follow after the
    <code class="literal">kernel</code> command.
   </p><p>
    The command <code class="literal">root</code> simplifies the specification of
    kernel and initrd files. The only argument of <code class="literal">root</code> is
    a device or a partition. This device is used for all kernel,
    <code class="filename">initrd</code>, or other file paths for which no device is
    explicitly specified until the next <code class="literal">root</code> command.
   </p><p>
    The <code class="literal">boot</code> command is implied at the end of every menu
    entry, so it does not need to be written into the menu file. However, if
    you use GRUB interactively for booting, you must enter the
    <code class="literal">boot</code> command at the end. The command itself has no
    arguments. It merely boots the loaded kernel image or the specified
    chain loader.
   </p><p>
    After writing all menu entries, define one of them as the
    <code class="literal">default</code> entry. Otherwise, the first one (entry
    <code class="literal">0</code>) is used. You can also specify a time-out in
    seconds after which the default entry should boot.
    <code class="literal">timeout</code> and <code class="literal">default</code> usually
    precede the menu entries. An example file is described in
    <a class="xref" href="cha.grub.html#sec.grub.menu.example" title="17.1.1.2. An Example Menu File">Section 17.1.1.2, &#8220;An Example Menu File&#8221;</a>.
   </p><div class="sect3" title="17.1.1.1. Naming Conventions for Hard Disks and Partitions"><div class="titlepage"><div><div><h4 class="title"><a name="sec.grub.devices"></a>17.1.1.1. Naming Conventions for Hard Disks and Partitions<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.devices">¶</a></span></h4></div></div></div><a class="indexterm" name="id463243"></a><a class="indexterm" name="id463252"></a><p>
     The naming convention GRUB uses for hard disks and partitions differ
     from that used for normal Linux devices. It more closely resembles the
     simple disk enumeration the BIOS does and the syntax is similar to that
     used in some BSD derivatives. In GRUB, the numbering of the
     partitions start with zero. This means that
     (<code class="filename">hd0,0</code>) is the first partition of the first hard
     disk. On a common desktop machine with a hard disk connected as primary
     master, the corresponding Linux device name is
     <code class="filename">/dev/sda1</code>.
    </p><p>
     The four possible primary partitions are assigned the partition numbers
     <code class="literal">0</code> to <code class="literal">3</code>. The logical partitions
     are numbered from <code class="literal">4</code>:
    </p><pre class="screen">(hd0,0)   first primary partition of the first hard disk
(hd0,1)   second primary partition
(hd0,2)   third primary partition
(hd0,3)   fourth primary partition (usually an extended partition)
(hd0,4)   first logical partition
(hd0,5)   second logical partition</pre><p>
     Being dependent on BIOS devices, GRUB does not distinguish between PATA
     (IDE), SATA, SCSI, and hardware RAID devices. All hard disks recognized
     by the BIOS or other controllers are numbered according to the boot
     sequence preset in the BIOS.
    </p><p>
     Unfortunately, it is often not possible to map the Linux device names
     to BIOS device names exactly. It generates this mapping with the help
     of an algorithm and saves it to the file
     <code class="filename">device.map</code>, which can be edited if necessary.
     Information about the file <code class="filename">device.map</code> is available
     in <a class="xref" href="cha.grub.html#sec.grub.map" title="17.1.2. The File device.map">Section 17.1.2, &#8220;The File device.map&#8221;</a>.
    </p><p>
     A complete GRUB path consists of a device name written in parentheses
     and the path to the file in the file system in the specified partition.
     The path begins with a slash. For example, the bootable kernel could be
     specified as follows on a system with a single PATA (IDE) hard disk
     containing Linux in its first partition:
    </p><pre class="screen">(hd0,0)/boot/vmlinuz</pre></div><div class="sect3" title="17.1.1.2. An Example Menu File"><div class="titlepage"><div><div><h4 class="title"><a name="sec.grub.menu.example"></a>17.1.1.2. An Example Menu File<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.menu.example">¶</a></span></h4></div></div></div><p>
     The following example shows the structure of a GRUB menu file. The
     example installation has a Linux boot partition under
     <code class="filename">/dev/sda5</code>, a root partition under
     <code class="filename">/dev/sda7</code> and a Windows installation under
     <code class="filename">/dev/sda1</code>.
    </p><pre class="screen">gfxmenu (hd0,4)/boot/message
color white/blue black/light-gray
default 0
timeout 8

title linux
   root (hd0,4)
   kernel /boot/vmlinuz root=/dev/sda7 vga=791 resume=/dev/sda9
   initrd /boot/initrd

title windows
   rootnoverify (hd0,0)
   chainloader +1

title floppy
   rootnoverify (hd0,0)
   chainloader (fd0)+1

title failsafe
   root (hd0,4)
   kernel /boot/vmlinuz.shipped root=/dev/sda7 ide=nodma \
   apm=off acpi=off vga=normal nosmp maxcpus=0 3 noresume
   initrd /boot/initrd.shipped</pre><p>
     The first block defines the configuration of the splash screen:
    </p><div class="variablelist"><dl><dt><span class="term">gfxmenu (hd0,4)/message</span></dt><dd><p>
        The background image <code class="literal">message</code> is located in the
        top directory of the <code class="filename">/dev/sda5</code> partition.
       </p></dd><dt><span class="term">color white/blue black/light-gray</span></dt><dd><p>
        Color scheme: white (foreground), blue (background), black
        (selection) and light gray (background of the selection). The color
        scheme has no effect on the splash screen, only on the customizable
        GRUB menu that you can access by exiting the splash screen with
        <span class="keycap">Esc</span>.
       </p></dd><dt><span class="term">default 0</span></dt><dd><p>
        The first menu entry <code class="literal">title linux</code> is the one to
        boot by default.
       </p></dd><dt><span class="term">timeout 8</span></dt><dd><p>
        After eight seconds without any user input, GRUB automatically
        boots the default entry. To deactivate automatic boot, delete the
        <code class="literal">timeout</code> line. If you set <code class="literal">timeout
        0</code>, GRUB boots the default entry immediately.
       </p></dd></dl></div><p>
     The second and largest block lists the various bootable operating
     systems. The sections for the individual operating systems are
     introduced by <code class="literal">title</code>.
    </p><div class="itemizedlist"><ul class="itemizedlist" type="bullet"><li class="listitem" style="list-style-type: disc"><p>
       The first entry (<code class="literal">title linux</code>) is responsible for
       booting openSUSE. The kernel (<code class="literal">vmlinuz</code>) is
       located in the first logical partition (the boot partition) of the
       first hard disk. Kernel parameters, such as the root partition and
       VGA mode, are appended here. The root partition is specified
       according to the Linux naming convention
       (<code class="filename">/dev/sda7/</code>) because this information is read by
       the kernel and has nothing to do with GRUB. The
       <code class="literal">initrd</code> is also located in the first logical
       partition of the first hard disk.
      </p></li><li class="listitem" style="list-style-type: disc"><p>
       The second entry is responsible for loading Windows. Windows is
       booted from the first partition of the first hard disk
       (<code class="filename">hd0,0</code>). The command <code class="literal">chainloader
       +1</code> causes GRUB to read and execute the first sector of
       the specified partition.
      </p></li><li class="listitem" style="list-style-type: disc"><p>
       The next entry enables booting from floppy disk without modifying the
       BIOS settings.
      </p></li><li class="listitem" style="list-style-type: disc"><p>
       The boot option <code class="literal">failsafe</code> starts Linux with a
       selection of kernel parameters that enables Linux to boot even on
       problematic systems.
      </p></li></ul></div><p>
     The menu file can be changed whenever necessary. GRUB then uses the
     modified settings during the next boot. Edit the file permanently using
     YaST or an editor of your choice. Alternatively, make temporary
     changes interactively using the edit function of GRUB. See
     <a class="xref" href="cha.grub.html#sec.grub.menu.change" title="17.1.1.3. Editing Menu Entries during the Boot Procedure">Section 17.1.1.3, &#8220;Editing Menu Entries during the Boot Procedure&#8221;</a>.
    </p></div><div class="sect3" title="17.1.1.3. Editing Menu Entries during the Boot Procedure"><div class="titlepage"><div><div><h4 class="title"><a name="sec.grub.menu.change"></a>17.1.1.3. Editing Menu Entries during the Boot Procedure<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.menu.change">¶</a></span></h4></div></div></div><a class="indexterm" name="id463565"></a><p>
     In the graphical boot menu, select the operating system to boot with
     the arrow keys. If you select a Linux system, you can enter additional
     boot parameters at the boot prompt. To edit individual menu entries
     directly, press <span class="keycap">Esc</span> to exit the splash screen and get
     to the GRUB text-based menu then press <span class="keycap">E</span>. Changes
     made in this way only apply to the current boot and are not adopted
     permanently.
    </p><div class="important"><table border="0" cellpadding="3" cellspacing="0" width="100%" summary="Important: Keyboard Layout during the Boot Procedure"><tr class="head"><td width="32"><img alt="[Important]" src="admon/important.png"></td><th align="left">Keyboard Layout during the Boot Procedure</th></tr><tr><td colspan="2" align="left" valign="top"><p>
      The US keyboard layout is the only one available when booting. See
      Figure &#8220;US Keyboard Layout&#8221; (&#8593;Start-Up).
     </p></td></tr></table></div><p>
     Editing menu entries facilitates the repair of a defective system that
     can no longer be booted, because the faulty configuration file of the
     boot loader can be circumvented by manually entering parameters.
     Manually entering parameters during the boot procedure is also useful
     for testing new settings without impairing the native system.
    </p><p>
     After activating the editing mode, use the arrow keys to select the
     menu entry of the configuration to edit. To make the configuration
     editable, press <span class="keycap">E</span> again. In this way, edit incorrect
     partitions or path specifications before they have a negative effect on
     the boot process. Press <span class="keycap">Enter</span> to exit the editing mode
     and return to the menu. Then press <span class="keycap">B</span> to boot this
     entry. Further possible actions are displayed in the help text at the
     bottom.
    </p><p>
     To enter changed boot options permanently and pass them to the kernel,
     open the file <code class="filename">menu.lst</code> as the user
     <code class="systemitem">root</code> and append the
     respective kernel parameters to the existing line, separated by spaces:
    </p><pre class="screen">title linux
   root(hd0,0)
     kernel /vmlinuz root=/dev/sda3 <em class="replaceable"><code>additional parameter</code></em>
   initrd /initrd</pre><p>
     GRUB automatically adopts the new parameters the next time the system
     is booted. Alternatively, this change can also be made with the YaST
     boot loader module. Append the new parameters to the existing line,
     separated by spaces.
    </p></div></div><div class="sect2" title="17.1.2. The File device.map"><div class="titlepage"><div><div><h3 class="title"><a name="sec.grub.map"></a>17.1.2. The File device.map<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.map">¶</a></span></h3></div></div></div><a class="indexterm" name="id463671"></a><p>
    The file <code class="filename">device.map</code> maps GRUB and BIOS device names
    to Linux device names. In a mixed system containing PATA (IDE) and SCSI
    hard disks, GRUB must try to determine the boot sequence by a special
    procedure, because GRUB may not have access to the BIOS information on
    the boot sequence. GRUB saves the result of this analysis in the file
    <code class="filename">/boot/grub/device.map</code>. Example
    <code class="filename">device.map</code> files for a system on which the boot
    sequence in the BIOS is set to PATA before SCSI could look as follows:
   </p><pre class="screen">(fd0)  /dev/fd0
(hd0)  /dev/sda
(hd1)  /dev/sdb</pre><p>
    or
   </p><pre class="screen">(fd0)  /dev/fd0
(hd0)  /dev/disk-by-id/<em class="replaceable"><code>DISK1 ID</code></em>
(hd1)  /dev/disk-by-id/<em class="replaceable"><code>DISK2 ID</code></em></pre><p>
    Because the order of PATA (IDE), SCSI and other hard disks depends on
    various factors and Linux is not able to identify the mapping, the
    sequence in the file <code class="filename">device.map</code> can be set manually.
    If you encounter problems when booting, check if the sequence in this file
    corresponds to the sequence in the BIOS and use the GRUB prompt to
    modify it temporarily, if necessary. After the Linux system has booted,
    the file <code class="filename">device.map</code> can be edited permanently with
    the YaST boot loader module or an editor of your choice.
   </p><p>
    After manually changing <code class="filename">device.map</code>, execute the
    following command to reinstall GRUB. This command causes the file
    <code class="filename">device.map</code> to be reloaded and the commands listed
    in <code class="filename">grub.conf</code> to be executed:
   </p><pre class="screen">grub --batch &lt; /etc/grub.conf</pre></div><div class="sect2" title="17.1.3. The File /etc/grub.conf"><div class="titlepage"><div><div><h3 class="title"><a name="sec.grub.conf"></a>17.1.3. The File /etc/grub.conf<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.conf">¶</a></span></h3></div></div></div><a class="indexterm" name="id463762"></a><a class="indexterm" name="id463770"></a><a class="indexterm" name="id463779"></a><p>
    The third important GRUB configuration file after
    <code class="filename">menu.lst</code> and <code class="filename">device.map</code> is
    <code class="filename">/etc/grub.conf</code>. This file contains the commands,
    parameters and options the GRUB shell needs for installing the boot
    loader correctly:
   </p><pre class="screen">setup --stage2=/boot/grub/stage2 --force-lba (hd0,1) (hd0,1)
   quit</pre><p>
    This command tells GRUB to automatically install the boot loader to
    the second partition on the first hard disk (hd0,1) using the boot
    images located on the same partition. The
    <code class="option">--stage2=/boot/grub/stage2</code> parameter is needed to
    install the <code class="filename">stage2</code> image from a mounted file
    system. Some BIOSes have a faulty LBA support implementation,
    <code class="option">--force-lba</code> provides a solution to ignore them.
   </p></div><div class="sect2" title="17.1.4. The File /etc/sysconfig/bootloader"><div class="titlepage"><div><div><h3 class="title"><a name="sec.grub.sysconfig"></a>17.1.4. The File <code class="filename">/etc/sysconfig/bootloader</code><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.sysconfig">¶</a></span></h3></div></div></div><a class="indexterm" name="id463839"></a><p>
    This configuration file is only used when configuring the bootloader
    with YaST and every time a new kernel is installed. It is evaluated by
    the perl-bootloader library which modifies the bootloader configuration
    file (for example <code class="filename">/boot/grub/menu.lst</code> for GRUB)
    accordingly. <code class="filename">/etc/sysconfig/bootloader</code> is not a
    GRUB specific configuration file - the values are applied to any
    bootloader installed on openSUSE.
   </p><div class="note"><table border="0" cellpadding="3" cellspacing="0" width="100%" summary="Note: Bootloader Configuration after a Kernel Update"><tr class="head"><td width="32"><img alt="[Note]" src="admon/note.png"></td><th align="left">Bootloader Configuration after a Kernel Update</th></tr><tr><td colspan="2" align="left" valign="top"><p>
     Every time a new kernel is installed, the perl bootloader writes a new
     bootloader configuration file (for example
     <code class="filename">/boot/grub/menu.lst</code> for GRUB) using the defaults
     specified in <code class="filename">/etc/sysconfig/bootloader</code>. If you are
     using a customized set of kernel parameters, make sure to adjust the
     relevant defaults in <code class="filename">/etc/sysconfig/bootloader</code>
     according to your needs.
    </p></td></tr></table></div><div class="variablelist"><dl><dt><span class="term"><code class="literal">LOADER_TYPE</code>
     </span></dt><dd><p>
       Specifies the bootloader installed on the system (e.g. GRUB or
       LILO). Do not modify&#8212;use YaST to change the bootloader as
       described in <a class="xref" href="cha.grub.html#pro.boot.yast2.config.loader" title="Procedure 17.6. Changing the Boot Loader Type">Procedure 17.6, &#8220;Changing the Boot Loader Type&#8221;</a>.
      </p></dd><dt><span class="term"><code class="literal">DEFAULT_VGA / FAILSAFE_VGA / XEN_VGA</code>
     </span></dt><dd><p>
       Screen resolution and color depth of the framebuffer used during
       booting are configured with the kernel parameter
       <code class="literal">vga</code>. These values define which resolution and
       color depth to use for the default boot entry, the failsafe and the
       XEN entry. The following values are valid:
      </p><div class="table"><a name="id463937"></a><p class="title"><b>Table 17.1. Screen Resolution and Color Depth Reference</b></p><div class="table-contents"><table summary="Screen Resolution and Color Depth Reference" border="1"><colgroup><col><col><col><col><col><col></colgroup><thead><tr><th>
           <p></p>
          </th><th>
           <p>
            640x480
           </p>
          </th><th>
           <p>
            800x600
           </p>
          </th><th>
           <p>
            1024x768
           </p>
          </th><th>
           <p>
            1280x1024
           </p>
          </th><th>
           <p>
            1600x1200
           </p>
          </th></tr></thead><tbody><tr><td>
           <p>
            8bit
           </p>
          </td><td>
           <p>
            0x301
           </p>
          </td><td>
           <p>
            0x303
           </p>
          </td><td>
           <p>
            0x305
           </p>
          </td><td>
           <p>
            0x307
           </p>
          </td><td>
           <p>
            0x31C
           </p>
          </td></tr><tr><td>
           <p>
            15bit
           </p>
          </td><td>
           <p>
            0x310
           </p>
          </td><td>
           <p>
            0x313
           </p>
          </td><td>
           <p>
            0x316
           </p>
          </td><td>
           <p>
            0x319
           </p>
          </td><td>
           <p>
            0x31D
           </p>
          </td></tr><tr><td>
           <p>
            16bit
           </p>
          </td><td>
           <p>
            0x311
           </p>
          </td><td>
           <p>
            0x314
           </p>
          </td><td>
           <p>
            0x317
           </p>
          </td><td>
           <p>
            0x31A
           </p>
          </td><td>
           <p>
            0x31E
           </p>
          </td></tr><tr><td>
           <p>
            24bit
           </p>
          </td><td>
           <p>
            0x312
           </p>
          </td><td>
           <p>
            0x315
           </p>
          </td><td>
           <p>
            0x318
           </p>
          </td><td>
           <p>
            0x31B
           </p>
          </td><td>
           <p>
            0x31F
           </p>
          </td></tr></tbody></table></div></div><br class="table-break"></dd><dt><span class="term"><code class="literal">DEFAULT_APPEND / FAILSAFE_APPEND / XEN_KERNEL_APPEND</code>
     </span></dt><dd><p>
       Kernel parameters (other than <code class="literal">vga</code>) that are
       automatically appended to the default, failsafe and XEN boot entries
       in the bootloader configuration file.
      </p></dd><dt><span class="term"><code class="literal">CYCLE_DETECTION / CYCLE_NEXT_ENTRY</code>
     </span></dt><dd><p>
       Configure whether to use boot cycle detection and if so, which
       alternative entry from <code class="filename">/boot/grub/menu.lst</code> to
       boot in case of a reboot cycle (e.g.
       <code class="systemitem">Failsafe</code>). See
       <code class="filename">/usr/share/doc/packages/bootcycle/README</code> for
       detailed information.
      </p></dd></dl></div></div><div class="sect2" title="17.1.5. Setting a Boot Password"><div class="titlepage"><div><div><h3 class="title"><a name="sec.grub.password"></a>17.1.5. Setting a Boot Password<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.password">¶</a></span></h3></div></div></div><a class="indexterm" name="id464270"></a><p>
    Even before the operating system is booted, GRUB enables access to
    file systems. Users without root permissions can access files in your
    Linux system to which they have no access once the system is booted. To
    block this kind of access or to prevent users from booting certain
    operating systems, set a boot password.
   </p><div class="important"><table border="0" cellpadding="3" cellspacing="0" width="100%" summary="Important: Boot Password and Splash Screen"><tr class="head"><td width="32"><img alt="[Important]" src="admon/important.png"></td><th align="left">Boot Password and Splash Screen</th></tr><tr><td colspan="2" align="left" valign="top"><p>
     If you use a boot password for GRUB, the usual splash screen is not
     displayed.
    </p></td></tr></table></div><p>
    As the user <code class="literal">root</code>, proceed as follows to set a boot
    password:
   </p><div class="procedure"><ol class="procedure" type="1"><li><p>
      At the root prompt, encrypt the password using grub-md5-crypt:
     </p><pre class="screen"># grub-md5-crypt
Password: ****
Retype password: ****
Encrypted: $1$lS2dv/$JOYcdxIn7CJk9xShzzJVw/</pre></li><li><p>
      Paste the encrypted string into the global section of the file
      <code class="filename">menu.lst</code>:
     </p><pre class="screen">gfxmenu (hd0,4)/message
color white/blue black/light-gray
default 0
timeout 8
password --md5 $1$lS2dv/$JOYcdxIn7CJk9xShzzJVw/</pre><p>
      Now GRUB commands can only be executed at the boot prompt after
      pressing <span class="keycap">P</span> and entering the password. However, users
      can still boot all operating systems from the boot menu.
     </p></li><li><p>
      To prevent one or several operating systems from being booted from the
      boot menu, add the entry <code class="literal">lock</code> to every section in
      <code class="filename">menu.lst</code> that should not be bootable without
      entering a password. For example:
     </p><pre class="screen">title linux
   kernel (hd0,4)/vmlinuz root=/dev/sda7 vga=791
   initrd (hd0,4)/initrd
   lock</pre><p>
      After rebooting the system and selecting the Linux entry from the boot
      menu, the following error message is displayed:
     </p><pre class="screen">Error 32: Must be authenticated</pre><p>
      Press <span class="keycap">Enter</span> to enter the menu. Then press
      <span class="keycap">P</span> to get a password prompt. After entering the
      password and pressing <span class="keycap">Enter</span>, the selected operating
      system (Linux in this case) should boot.
     </p></li></ol></div></div></div><div class="sect1" title="17.2. Configuring the Boot Loader with YaST"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.boot.yast2.config"></a>17.2. Configuring the Boot Loader with YaST<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.boot.yast2.config">¶</a></span></h2></div></div></div><a class="indexterm" name="id464420"></a><a class="indexterm" name="id464432"></a><p>
  The easiest way to configure the boot loader in your openSUSE system
  is to use the YaST module. In the YaST Control Center, select
  <span class="guimenu">System</span>+<span class="guimenu">Boot
  Loader</span>. As in
  <a class="xref" href="cha.grub.html#fig.yast.bootloader.config" title="Figure 17.1. Boot Loader Settings">Figure 17.1, &#8220;Boot Loader Settings&#8221;</a>, this shows the current
  boot loader configuration of your system and allows you to make changes.
 </p><div class="figure"><a name="fig.yast.bootloader.config"></a><p class="title"><b>Figure 17.1. Boot Loader Settings</b><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#fig.yast.bootloader.config">¶</a></span></p><div class="figure-contents"><div class="mediaobject"><table border="0" summary="manufactured viewport for HTML img" cellspacing="0" cellpadding="0" width="75%"><tr><td><img src="images/yast2_bootloader.png" width="100%" alt="Boot Loader Settings"></td></tr></table></div></div></div><br class="figure-break"><p>
  Use the <span class="guimenu">Section Management</span> tab to edit, change and
  delete boot loader sections for the individual operating systems. To add
  an option, click <span class="guimenu">Add</span>. To change the value of an
  existing option, select it with the mouse and click
  <span class="guimenu">Edit</span>. To remove an existing entry, select it and click
  <span class="guimenu">Delete</span>. If you are not familiar with boot loader
  options, read <a class="xref" href="cha.grub.html#sec.grub.basic" title="17.1. Booting with GRUB">Section 17.1, &#8220;Booting with GRUB&#8221;</a> first.
 </p><p>
  Use the <span class="guimenu">Boot Loader Installation</span> tab to view and change
  settings related to type, location and advanced loader settings.
 </p><p>
  Click <span class="guimenu">Other</span> to access advanced configuration options.
  The build-in editor lets you change the GRUB configuration files. For
  details, see <a class="xref" href="cha.grub.html#sec.grub.basic" title="17.1. Booting with GRUB">Section 17.1, &#8220;Booting with GRUB&#8221;</a>. You can also delete the
  existing configuration and <span class="guimenu">Start from Scratch</span> or let
  YaST <span class="guimenu">Propose a New Configuration</span>. It is also possible
  to write the configuration to disk or reread the configuration from the
  disk. To restore the original Master Boot Record (MBR) that was saved
  during the installation, choose <span class="guimenu">Restore MBR of Hard
  Disk</span>.
 </p><div class="sect2" title="17.2.1. Adjusting the Default Boot Entry"><div class="titlepage"><div><div><h3 class="title"><a name="sec.boot.yast2.config.default"></a>17.2.1. Adjusting the Default Boot Entry<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.boot.yast2.config.default">¶</a></span></h3></div></div></div><a class="indexterm" name="id464579"></a><p>
   To change the system that is booted by default, proceed as follows:
  </p><div class="procedure" title="Procedure 17.1. Setting the Default System"><a name="pro.boot.yast2.config.default"></a><p class="title"><b>Procedure 17.1. Setting the Default System</b><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#pro.boot.yast2.config.default">¶</a></span></p><ol class="procedure" type="1"><li><p>
     Open the <span class="guimenu">Section Management</span> tab.
    </p></li><li><p>
     Select the desired entry from the list.
    </p></li><li><p>
     Click <span class="guimenu">Set as Default</span>.
    </p></li><li><p>
     Click <span class="guimenu">OK</span> to activate these changes.
    </p></li></ol></div></div><div class="sect2" title="17.2.2. Modifying the Boot Loader Location"><div class="titlepage"><div><div><h3 class="title"><a name="sec.boot.yast2.config.blocation"></a>17.2.2. Modifying the Boot Loader Location<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.boot.yast2.config.blocation">¶</a></span></h3></div></div></div><a class="indexterm" name="id464669"></a><p>
   To modify the location of the boot loader, follow these steps:
  </p><div class="procedure" title="Procedure 17.2. Changing the Boot Loader Location"><a name="pro.boot.yast2.config.blocation"></a><p class="title"><b>Procedure 17.2. Changing the Boot Loader Location</b><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#pro.boot.yast2.config.blocation">¶</a></span></p><ol class="procedure" type="1"><li><p>
     Select the <span class="guimenu">Boot Loader Installation</span> tab and then
     choose one of the following options for <span class="guimenu">Boot Loader
     Location</span>:
    </p><div class="variablelist"><dl><dt><span class="term"><span class="guimenu">Boot from Master Boot Record</span>
      </span></dt><dd><p>
        This installs the boot loader in the MBR of the first disk
        (according to the boot sequence preset in the BIOS).
       </p></dd><dt><span class="term"><span class="guimenu">Boot from Root Partition</span>
      </span></dt><dd><p>
        This installs the boot loader in the boot sector of the
        <code class="filename">/</code> partition (this is the default).
       </p></dd><dt><span class="term"><span class="guimenu">Boot from Boot Partition</span>
      </span></dt><dd><p>
        This installs the boot loader in the boot sector of the
        <code class="filename">/boot</code> partition.
       </p></dd><dt><span class="term"><span class="guimenu">Boot from Extended Partition</span>
      </span></dt><dd><p>
        This installs the boot loader in the extended partition container.
       </p></dd><dt><span class="term"><span class="guimenu">Custom Boot Partition</span>
      </span></dt><dd><p>
        Use this option to specify the location of the boot loader manually.
       </p></dd></dl></div></li><li><p>
     Click <span class="guimenu">OK</span> to apply your changes.
    </p></li></ol></div></div><div class="sect2" title="17.2.3. Changing the Boot Loader Time-Out"><div class="titlepage"><div><div><h3 class="title"><a name="sec.boot.yast2.config.timeout"></a>17.2.3. Changing the Boot Loader Time-Out<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.boot.yast2.config.timeout">¶</a></span></h3></div></div></div><a class="indexterm" name="id464841"></a><p>
   The boot loader does not boot the default system immediately. During the
   time-out, you can select the system to boot or write some kernel
   parameters. To set the boot loader time-out, proceed as follows:
  </p><div class="procedure" title="Procedure 17.3. Changing the Boot Loader Time-Out"><a name="pro.boot.yast2.config.timeout"></a><p class="title"><b>Procedure 17.3. Changing the Boot Loader Time-Out</b><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#pro.boot.yast2.config.timeout">¶</a></span></p><ol class="procedure" type="1"><li><p>
     Open the <span class="guimenu">Boot Loader Installation</span> tab.
    </p></li><li><p>
     Click <span class="guimenu">Boot Loader Options</span>.
    </p></li><li><p>
     Change the value of <span class="guimenu">Time-Out in Seconds</span> by typing in
     a new value and clicking the appropriate arrow key with your mouse, or
     by using the arrow keys on the keyboard.
    </p></li><li><p>
     Click <span class="guimenu">OK</span> twice to save the changes.
    </p></li></ol></div></div><div class="sect2" title="17.2.4. Setting a Boot Password"><div class="titlepage"><div><div><h3 class="title"><a name="sec.boot.yast2.config.security"></a>17.2.4. Setting a Boot Password<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.boot.yast2.config.security">¶</a></span></h3></div></div></div><a class="indexterm" name="id464937"></a><a class="indexterm" name="id464949"></a><p>
   Using this YaST module, you can also set a password to protect booting.
   This gives you an additional level of security.
  </p><div class="procedure" title="Procedure 17.4. Setting a Boot Loader Password"><a name="pro.boot.yast2.config.security"></a><p class="title"><b>Procedure 17.4. Setting a Boot Loader Password</b><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#pro.boot.yast2.config.security">¶</a></span></p><ol class="procedure" type="1"><li><p>
     Open the <span class="guimenu">Boot Loader Installation</span> tab.
    </p></li><li><p>
     Click <span class="guimenu">Boot Loader Options</span>.
    </p></li><li><p>
     Activate the <span class="guimenu">Protect Boot Loader with Password</span>
     option with a click and type in your <span class="guimenu">Password</span> twice.
    </p></li><li><p>
     Click <span class="guimenu">OK</span> twice to save the changes.
    </p></li></ol></div></div><div class="sect2" title="17.2.5. Adjusting the Disk Order"><div class="titlepage"><div><div><h3 class="title"><a name="sec.boot.yast2.config.order"></a>17.2.5. Adjusting the Disk Order<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.boot.yast2.config.order">¶</a></span></h3></div></div></div><a class="indexterm" name="id465047"></a><p>
   If your computer has more than one hard disk, you can specify the boot
   sequence of the disks to match the BIOS setup of the machine (see
   <a class="xref" href="cha.grub.html#sec.grub.map" title="17.1.2. The File device.map">Section 17.1.2, &#8220;The File device.map&#8221;</a>). To do so, proceed as follows:
  </p><div class="procedure" title="Procedure 17.5. Setting the Disk Order"><a name="pro.boot.yast2.config.order"></a><p class="title"><b>Procedure 17.5. Setting the Disk Order</b><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#pro.boot.yast2.config.order">¶</a></span></p><ol class="procedure" type="1"><li><p>
     Open the <span class="guimenu">Boot Loader Installation</span> tab.
    </p></li><li><p>
     Click <span class="guimenu">Boot Loader Installation Details</span>.
    </p></li><li><p>
     If more than one disk is listed, select a disk and click
     <span class="guimenu">Up</span> or <span class="guimenu">Down</span> to reorder the
     displayed disks.
    </p></li><li><p>
     Click <span class="guimenu">OK</span> two times to save the changes.
    </p></li></ol></div></div><div class="sect2" title="17.2.6. Configuring Advanced Options"><div class="titlepage"><div><div><h3 class="title"><a name="sec.boot.yast2.config.advanced"></a>17.2.6. Configuring Advanced Options<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.boot.yast2.config.advanced">¶</a></span></h3></div></div></div><a class="indexterm" name="id465150"></a><p>
   Advanced boot options can be configured via <span class="guimenu">Boot
   Loader Installation</span>+<span class="guimenu">Boot Loader
   Options</span>. Normally, it should not be necessary to
   change the default settings.
  </p><div class="variablelist"><dl><dt><span class="term"><span class="guimenu">Set Active Flag in Partition Table for Boot
      Partition</span>
    </span></dt><dd><p>
      Activates the partition that contains the boot loader. Some legacy
      operating systems (such as Windows 98) can only boot from an active
      partition.
     </p></dd><dt><span class="term"><span class="guimenu">Write Generic Boot Code to MBR</span>
    </span></dt><dd><p>
      Replaces the current MBR with generic, operating system independent
      code.
     </p></dd><dt><span class="term"><span class="guimenu">Debugging Flag</span>
    </span></dt><dd><p>
      Sets GRUB in debug mode where it displays messages to show disk
      activity.
     </p></dd><dt><span class="term"><span class="guimenu">Hide Boot Menu</span>
    </span></dt><dd><p>
      Hides the boot menu and boots the default entry.
     </p></dd><dt><span class="term"><span class="guimenu">Use Trusted GRUB</span>
    </span></dt><dd><p>
      Starts the Trusted GRUB which supports trusted computing
      functionality.
     </p></dd><dt><span class="term"><span class="guimenu">Enable Acoustic Signals</span>
    </span></dt><dd><p>
      Enables or disables acoustic signals in GRUB.
     </p></dd><dt><span class="term"><span class="guimenu">Graphical Menu File</span>
    </span></dt><dd><p>
      Path to the graphics file used when displaying the boot screen.
     </p></dd><dt><span class="term"><span class="guimenu">Use Serial Console</span>
    </span></dt><dd><p>
      If your machine is controlled via a serial console, activate this
      option and specify which COM port to use at which speed. See
      <span class="command"><strong>info grub</strong></span> or
      <a class="ulink" href="http://www.gnu.org/software/grub/manual/grub.html#Serial-terminal" target="_top">http://www.gnu.org/software/grub/manual/grub.html#Serial-terminal</a>
     </p></dd></dl></div></div><div class="sect2" title="17.2.7. Changing Boot Loader Type"><div class="titlepage"><div><div><h3 class="title"><a name="sec.boot.yast2.config.loader"></a>17.2.7. Changing Boot Loader Type<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.boot.yast2.config.loader">¶</a></span></h3></div></div></div><a class="indexterm" name="id465345"></a><a class="indexterm" name="id465357"></a><a class="indexterm" name="id465366"></a><p>
   Set the boot loader type in <span class="guimenu">Boot Loader Installation</span>.
   The default boot loader in openSUSE is GRUB. To use LILO or
   ELILO, proceed as follows:
  </p><div class="warning"><table border="0" cellpadding="3" cellspacing="0" width="100%" summary="Warning: LILO is unsupported"><tr class="head"><td width="32"><img alt="[Warning]" src="admon/warning.png"></td><th align="left">LILO is unsupported</th></tr><tr><td colspan="2" align="left" valign="top"><p>
    Using LILO is not recommended&#8212;it is unsupported on
    openSUSE. Only use it in special cases.
   </p></td></tr></table></div><div class="procedure" title="Procedure 17.6. Changing the Boot Loader Type"><a name="pro.boot.yast2.config.loader"></a><p class="title"><b>Procedure 17.6. Changing the Boot Loader Type</b><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#pro.boot.yast2.config.loader">¶</a></span></p><ol class="procedure" type="1"><li><p>
     Select the <span class="guimenu">Boot Loader Installation</span> tab.
    </p></li><li><p>
     For <span class="guimenu">Boot Loader</span>, select <span class="guimenu">LILO</span>.
    </p></li><li><p>
     In the dialog box that opens, select one of the following actions:
    </p><div class="variablelist"><dl><dt><span class="term"><span class="guimenu">Propose New Configuration</span>
      </span></dt><dd><p>
        Have YaST propose a new configuration.
       </p></dd><dt><span class="term"><span class="guimenu">Convert Current Configuration</span>
      </span></dt><dd><p>
        Have YaST convert the current configuration. When converting the
        configuration, some settings may be lost.
       </p></dd><dt><span class="term"><span class="guimenu">Start New Configuration from Scratch</span>
      </span></dt><dd><p>
        Write a custom configuration. This action is not available during
        the installation of openSUSE.
       </p></dd><dt><span class="term"><span class="guimenu">Read Configuration Saved on Disk</span>
      </span></dt><dd><p>
        Load your own <code class="filename">/etc/lilo.conf</code>. This action is
        not available during the installation of openSUSE.
       </p></dd></dl></div></li><li><p>
     Click <span class="guimenu">OK</span> two times to save the changes.
    </p></li></ol></div><p>
   During the conversion, the old GRUB configuration is saved to the disk.
   To use it, simply change the boot loader type back to GRUB and choose
   <span class="guimenu">Restore Configuration Saved before Conversion</span>. This
   action is available only on an installed system.
  </p><div class="note"><table border="0" cellpadding="3" cellspacing="0" width="100%" summary="Note: Custom Boot Loader"><tr class="head"><td width="32"><img alt="[Note]" src="admon/note.png"></td><th align="left">Custom Boot Loader</th></tr><tr><td colspan="2" align="left" valign="top"><p>
    To use a boot loader other than GRUB or LILO, select <span class="guimenu">Do Not
    Install Any Boot Loader</span>. Read the documentation of your boot
    loader carefully before choosing this option.
   </p></td></tr></table></div></div></div><div class="sect1" title="17.3. Uninstalling the Linux Boot Loader"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.grub.entfernen"></a>17.3. Uninstalling the Linux Boot Loader<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.entfernen">¶</a></span></h2></div></div></div><a class="indexterm" name="id465590"></a><a class="indexterm" name="id465598"></a><a class="indexterm" name="id465607"></a><a class="indexterm" name="id465615"></a><p>
   YaST can be used to uninstall the Linux boot loader and restore the MBR
   to the state it had prior to the installation of Linux. During the
   installation, YaST automatically creates a backup copy of the original
   MBR and restores it upon request.
  </p><p>
   To uninstall GRUB, start YaST and click <span class="guimenu">System</span>+<span class="guimenu">Boot Loader</span> to
   start the boot loader module. Select <span class="guimenu">Other</span>+<span class="guimenu">Restore MBR of Hard Disk</span> and confirm with <span class="guimenu">Yes, Rewrite</span>.
  </p></div><div class="sect1" title="17.4. Creating Boot CDs"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.grub.bootcd"></a>17.4. Creating Boot CDs<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.bootcd">¶</a></span></h2></div></div></div><a class="indexterm" name="id465680"></a><p>
  If problems occur while booting your system using a boot manager or if the
  boot manager cannot be installed on your hard disk disk, it is also
  possible to create a bootable CD with all the necessary start-up files for
  Linux. This requires a CD writer be installed in your system.
 </p><p>
  Creating a bootable CD-ROM with GRUB merely requires a special form of
  <span class="emphasis"><em>stage2</em></span> called <code class="filename">stage2_eltorito</code>
  and, optionally, a customized <code class="filename">menu.lst</code>. The classic
  files <code class="filename">stage1</code> and <code class="filename">stage2</code> are not
  required.
 </p><div class="procedure" title="Procedure 17.7. Creating Boot CDs"><a name="id465719"></a><p class="title"><b>Procedure 17.7. Creating Boot CDs</b></p><ol class="procedure" type="1"><li><p>
    Change into a directory in which to create the ISO image, for example:
    <span class="command"><strong>cd</strong></span> <code class="filename">/tmp</code>
   </p></li><li><p>
    Create a subdirectory for GRUB and change into the newly created
    <code class="filename">iso</code> directory:
   </p><pre class="screen">mkdir -p iso/boot/grub &amp;&amp; cd iso</pre></li><li><p>
    Copy the kernel, the files <code class="filename">stage2_eltorito</code>,
    <code class="filename">initrd</code>, <code class="filename">menu.lst</code> and
    <code class="filename">message</code> to <code class="filename">iso/boot/</code>:
   </p><pre class="screen">cp /boot/vmlinuz boot/
cp /boot/initrd boot/
cp /boot/message boot/
cp /usr/lib/grub/stage2_eltorito boot/grub
cp /boot/grub/menu.lst boot/grub</pre></li><li><p>
    Replace the <code class="literal">root (hd<em class="replaceable"><code>x</code></em>,
    <em class="replaceable"><code>y</code></em>)</code> entries with <code class="literal">root
    (cd)</code> to point to the CD_ROM device. You may also need to
    adjust the paths to the message file, the kernel and the
    initrd&#8212;they need to point to <code class="filename">/boot/message</code>,
    <code class="filename">/boot/vmlinuz</code> and
    <code class="filename">/boot/initrd</code>, respectively. After having made the
    adjustments, <code class="filename">menu.lst</code> should look similar to the
    following example:
   </p><pre class="screen">timeout 8
default 0
gfxmenu (cd)/boot/message

title Linux
   root (cd)
   kernel /boot/vmlinuz root=/dev/sda5 vga=794 resume=/dev/sda1 \
   splash=verbose showopts
   initrd /boot/initrd</pre><p>
    Use <code class="option">splash=silent</code> instead of
    <code class="option">splash=verbose</code> to prevent the boot messages from
    appearing during the boot procedure.
   </p></li><li><p>
    Create the ISO image with the following command:
   </p><pre class="screen">genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot \
-boot-load-size 4 -boot-info-table -iso-level 2 -input-charset utf-8 \
-o grub.iso /tmp/iso</pre></li><li><p>
    Write the resulting file <code class="filename">grub.iso</code> to a CD using
    your preferred utility. Do not burn the ISO image as a data file, but
    use the option for burning a CD image in your burning utility.
   </p></li></ol></div></div><div class="sect1" title="17.5. The Graphical SUSE Screen"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.boot.screen"></a>17.5. The Graphical SUSE Screen<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.boot.screen">¶</a></span></h2></div></div></div><a class="indexterm" name="id465894"></a><a class="indexterm" name="id465902"></a><p>
   The graphical SUSE screen is displayed on the first console if the
   option <code class="option">vga=<em class="replaceable"><code>value</code></em></code> is used as a
   kernel parameter. If you install using YaST, this option is
   automatically activated in accordance with the selected resolution and
   the graphics card. There are three ways to disable the SUSE screen, if
   desired:
  </p><div class="variablelist"><dl><dt><span class="term">Disabling the SUSE Screen When Necessary</span></dt><dd><p>
      Enter the command <span class="command"><strong>echo 0 &gt;/proc/splash</strong></span> on the
      command line to disable the graphical screen. To activate it again,
      enter <span class="command"><strong>echo 1 &gt;/proc/splash</strong></span>.
     </p></dd><dt><span class="term">Disabling the SUSE screen by default</span></dt><dd><p>
      Add the kernel parameter <code class="option">splash=0</code> to your boot loader
      configuration. <a class="xref" href="cha.grub.html" title="Chapter 17. The Boot Loader GRUB">Chapter 17, <i>The Boot Loader GRUB</i></a> provides more information
      about this. However, if you prefer the text mode (the default in
      earlier versions) set <code class="option">vga=normal</code>.
     </p></dd><dt><span class="term">Completely Disabling the SUSE Screen</span></dt><dd><p>
      Compile a new kernel and disable the option <span class="guimenu">Use splash screen
      instead of boot logo</span> in <span class="guimenu">framebuffer
      support</span>. Disabling framebuffer support in the kernel
      automatically disables the splash screen, as well.
     </p><div class="warning"><table border="0" cellpadding="3" cellspacing="0" width="100%" summary="Warning: No Support"><tr class="head"><td width="32"><img alt="[Warning]" src="admon/warning.png"></td><th align="left">No Support</th></tr><tr><td colspan="2" align="left" valign="top"><p>
       SUSE cannot provide any support for your system if you run it with
       a custom kernel.
      </p></td></tr></table></div></dd></dl></div></div><div class="sect1" title="17.6. Troubleshooting"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.grub.probs"></a>17.6. Troubleshooting<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.probs">¶</a></span></h2></div></div></div><a class="indexterm" name="id466026"></a><p>
   This section lists some of the problems frequently encountered when
   booting with GRUB and a short description of possible solutions. Some
   of the problems are covered in articles in the
   <span>Support
   Database at
   <a class="ulink" href="http://en.opensuse.org/Portal:Support_database" target="_top">http://en.opensuse.org/Portal:Support_database</a></span>.
   Use the search dialog to search for keywords like
   <span class="emphasis"><em>GRUB</em></span>, <span class="emphasis"><em>boot</em></span> and <span class="emphasis"><em>boot
   loader</em></span>.
  </p><div class="variablelist"><dl><dt><span class="term">GRUB and XFS</span></dt><dd><p>
      XFS leaves no room for <code class="filename">stage1</code> in the partition
      boot block. Therefore, do not specify an XFS partition as the location
      of the boot loader. This problem can be solved by creating a separate
      boot partition that is not formatted with XFS.
     </p></dd><dt><span class="term">GRUB Reports GRUB Geom Error<a class="indexterm" name="id466090"></a></span></dt><dd><p>
      GRUB checks the geometry of connected hard disks when the system is
      booted. Sometimes, the BIOS returns inconsistent information and
      GRUB reports a GRUB Geom Error. In this case, update the BIOS.
     </p><p>
      GRUB also returns this error message if Linux was installed on an
      additional hard disk that is not registered in the BIOS.
      <span class="emphasis"><em>stage1</em></span> of the boot loader is found and loaded
      correctly, but <span class="emphasis"><em>stage2</em></span> is not found. This problem
      can be remedied by registering the new hard disk in the BIOS.
     </p></dd><dt><span class="term">System Containing Several Hard Disks Does Not Boot</span></dt><dd><p>
      During the installation, YaST may have incorrectly determined the
      boot sequence of the hard disks. For example, GRUB may regard the
      PATA (IDE) disk as <code class="filename">hd0</code> and the SCSI disk as
      <code class="filename">hd1</code>, although the boot sequence in the BIOS is
      reversed (SCSI <span class="emphasis"><em>before</em></span> PATA).
     </p><p>
      In this case, correct the hard disks during the boot process with the
      help of the GRUB command line. After the system has booted, edit
      <code class="filename">device.map</code> to apply the new mapping permanently.
      Then check the GRUB device names in the files
      <code class="filename">/boot/grub/menu.lst</code> and
      <code class="filename">/boot/grub/device.map</code> and reinstall the boot
      loader with the following command:
     </p><pre class="screen">grub --batch &lt; /etc/grub.conf</pre></dd><dt><span class="term">Booting Windows from the Second Hard Disk</span></dt><dd><p>
      Some operating systems, such as Windows, can only boot from the first
      hard disk. If such an operating system is installed on a hard disk
      other than the first hard disk, you can effect a logical change for
      the respective menu entry.
     </p><pre class="screen">...
title windows
   map (hd0) (hd1)
   map (hd1) (hd0)
   chainloader(hd1,0)+1
...</pre><p>
      In this example, Windows is started from the second hard disk. For
      this purpose, the logical order of the hard disks is changed with
      <code class="literal">map</code>. This change does not affect the logic within
      the GRUB menu file. Therefore, the second hard disk must be
      specified for <code class="literal">chainloader</code>.
     </p></dd></dl></div></div><div class="sect1" title="17.7. For More Information"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.grub.info"></a>17.7. For More Information<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.grub.info">¶</a></span></h2></div></div></div><p>
   Extensive information about GRUB is available at
   <a class="ulink" href="http://www.gnu.org/software/grub/" target="_top">http://www.gnu.org/software/grub/</a>. Also refer to the
   <span class="command"><strong>grub</strong></span> info page. <span>You can also search
   for the keyword <span class="quote">&#8220;<span class="quote">GRUB</span>&#8221;</span> in the Support Database at
   <a class="ulink" href="http://en.opensuse.org/Portal:Support_database/" target="_top">http://en.opensuse.org/Portal:Support_database/</a> to get
   information about special issues.</span>
  </p></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" border="0" class="bctable"><tr><td width="80%"><div class="breadcrumbs"><p><a href="index.html"> Documentation</a><span class="breadcrumbs-sep"> &gt; </span><a href="book.opensuse.reference.html">Reference</a><span class="breadcrumbs-sep"> &gt; </span><a href="part.reference.system.html">System</a><span class="breadcrumbs-sep"> &gt; </span><strong><a accesskey="p" title="Chapter 16. Booting and Configuring a Linux System" href="cha.boot.html"><span>&#9664;</span></a>  <a accesskey="n" title="Chapter 18. Special System Features" href="cha.suse.html"><span>&#9654;</span></a></strong></p></div></td></tr></table></div></body></html>

ACC SHELL 2018