News | About | Get Frugalware | Packages | Documentation | Discussion Forums | Bug Tracker | Wiki | Community | Development

GRUB

From FrugalWiki

Jump to: navigation, search


Contents

GRUB

GNU GRUB is a multiboot bootloader. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn.

Briefly, the bootloader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.

Currently, GRUB is the de facto standard bootloader of Linux, and is expected to be superseded by GRUB2 in the near future. When this happens, "GRUB" will become "GRUB Legacy".

Installation

The GRUB package is installed by default when you install Arch Linux. If you previously selected not to install this package, you can install now via:

Root terminal 48px.png
# pacman-g2 -S grub


Additionally, GRUB must be installed to the boot sector of a drive or partition to serve as a bootloader.

Configuration

The configuration file is located at /boot/grub/menu.lst. Edit this file to suit your needs.

  • timeout # -- time to wait (in seconds) before the default operating system is automatically loaded.
  • default # -- the default boot entry that is chosen when the timeout has expired.

An example configuration:

File: /boot/grub/menu.lst
#
# /boot/grub/menu.lst - configuration file for GRUB
# This file is generated automatically by grubconfig
#

default=0
timeout=5
gfxmenu (hd0,0)/boot/grub/message

title Frugalware 1.3.1392.ga5d3992 (Haven) - 2.6.35-fw3
	kernel (hd0,0)/boot/vmlinuz root=/dev/sda1 ro quiet resume=/dev/sda2

Graphical boot

For those desiring eye candy, install gfxboot.

Root terminal 48px.png
# pacman-g2 -S gfxboot


Restore GRUB

  • Grubconfig

Grubconfig is a command from fwsetup, it will probe and restore a new menu.lst

Root terminal 48px.png
# grubconfig


  • Super Grub Disk

This is an helpfull live cd http://supergrub.forjamari.linex.org/?section=home

Dual booting with Windows

Add the following to the end of your /boot/grub/menu.lst (assuming that your Windows partition is on the first partition of the first drive):

title Windows
rootnoverify (hd0,0)
makeactive #if you use Windows7 this line should be commented out
chainloader +1
Note: Windows 2000 and later versions do NOT need to be on the first partition to boot (contrary to popular belief). If the Windows partition changes (i.e. if you add a partition before the Windows partition), you will need to edit the Windows boot.ini file to reflect the change (see this article for details on how to do that).

If Windows is located on another hard disk, the map command must be used. This will make your Windows install think it is actually on the first drive. Assuming that your Windows partition is on the first partition of the second drive:

title Windows
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive #if you use Windows7 this line should be commented out
chainloader +1

External resources

Personal tools
Namespaces
Variants
Actions