Difference between revisions of "Boot loaders"

From ArchWiki
Jump to: navigation, search
m (GRUB Legacy)
m (Kernel parameters)
Line 12: Line 12:
  
 
=== Kernel parameters ===
 
=== Kernel parameters ===
Kernel command line parameters are often supplied by the bootloader.
+
Kernel command line parameters are often supplied by the bootloader. Here we are adding the parameters {{ic|quiet splash}} to [[GRUB]], [[GRUB Legacy]], [[LILO]] and [[Syslinux]].
  
 
==== [[GRUB]] ====
 
==== [[GRUB]] ====
Line 21: Line 21:
 
{{bc|# grub-mkconfig -o /boot/grub/grub.cfg}}
 
{{bc|# grub-mkconfig -o /boot/grub/grub.cfg}}
  
The resulting {{ic|/boot/grub/grub.cfg}} will be:
+
The resulting line in {{ic|/boot/grub/grub.cfg}} will look like:
{{hc|/boot/grub/grub.cfg|2=<nowiki>
+
{{hc|/boot/grub/grub.cfg|2=
[...]
+
linux /vmlinuz-linux root=/dev/sda3 quiet splash}}
 
+
menuentry 'Arch GNU/Linux, with Linux core repo kernel' [...] {
+
[...]
+
set root='hd0,msdos1'
+
[...]
+
linux /vmlinuz-linux root=/dev/sda3 quiet splash
+
initrd /initramfs-linux.img
+
 
+
[...]
+
</nowiki>}}
+
  
 
==== [[GRUB Legacy]] ====
 
==== [[GRUB Legacy]] ====
 +
{{hc|/boot/grub/menu.lst|2=
 +
kernel /vmlinuz-linux root=/dev/sda3 ro quiet splash}}
  
{{hc|/boot/grub/menu.lst
+
==== [[LILO]] ====
|2=<nowiki>
+
{{hc|/etc/lilo.conf|2=
...
+
image=/boot/vmlinuz-linux
 
+
        [...]
# (0) Arch Linux
+
        quiet splash}}
title  Arch Linux  [/boot/vmlinuz-linux]
+
root  (hd0,0)
+
kernel /vmlinuz-linux root=/dev/sda3 ro quiet splash
+
initrd /initramfs-linux.img
+
 
+
...
+
</nowiki>}}
+
  
 
==== [[Syslinux]] ====
 
==== [[Syslinux]] ====
APPEND root=UUID=988d4e11-8237-4af3-5ab6-77627128g9d0 ro vga=current quiet splash
+
{{hc|/boot/syslinux/syslinux.cfg|2=
 +
APPEND root=UUID=988d4e11-8237-4af3-5ab6-77627128g9d0 ro vga=current quiet splash}}

Revision as of 11:20, 16 July 2012

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: This page is created to ease the transition from Grub to Grub2. (Discuss in Talk:Boot loaders#)

The boot loader is responsible for loading the kernel and initial ramdisk before initiating the boot process. You can use different kinds of bootloaders in Arch, such as GRUB(2), Syslinux, LILO or GRUB Legacy.

This page will only contain short introduction and most used configurations users will touch. For detailed information, please see corresponding pages of each boot loader.

Configuration

Configuration files

Different boot loader use different files for configuration. Here is a short list:

  • GRUB: /boot/grub/grub.cfg
  • GRUB Legacy: /boot/grub/menu.lst

Kernel parameters

Kernel command line parameters are often supplied by the bootloader. Here we are adding the parameters quiet splash to GRUB, GRUB Legacy, LILO and Syslinux.

GRUB

Edit the file /etc/default/grub and append your kernel options to the line GRUB_CMDLINE_LINUX_DEFAULT="":

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="ro quiet splash"

Re-generate grub.cfg with:

# grub-mkconfig -o /boot/grub/grub.cfg

The resulting line in /boot/grub/grub.cfg will look like:

/boot/grub/grub.cfg
linux	/vmlinuz-linux root=/dev/sda3 quiet splash

GRUB Legacy

/boot/grub/menu.lst
kernel /vmlinuz-linux root=/dev/sda3 ro quiet splash

LILO

/etc/lilo.conf
image=/boot/vmlinuz-linux
        [...]
        quiet splash

Syslinux

/boot/syslinux/syslinux.cfg
APPEND root=UUID=988d4e11-8237-4af3-5ab6-77627128g9d0 ro vga=current quiet splash