Bootloader

This section is about LILO and GRUB.

LILO (Linux Loader)

The lilo configuration file is /etc/lilo.conf. For your new kernel, it could look like this:

# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# ---------------       `install-mbr(8)', `/usr/share/doc/lilo/'
#                       and `/usr/share/doc/mbr/'.
# +---------------------------------------------------------------+
# |                        !! Reminder !!                         |
# |                                                               |
# | Don't forget to run `lilo' after you make changes to this     |
# | conffile, `/boot/bootmess.txt', or install a new kernel.  The |
# | computer will most likely fail to boot if a kernel-image      |
# | post-install script or you don't remember to run `lilo'.      |
# |                                                               |
# +---------------------------------------------------------------+
	
# [...]

# Boot Linux standardmäßig
#
default=Linux

image="/boot/bzImage"
label="Linux"
restricted
# append="hdc=ide-scsi"
# weitere Kernel-Optionen

image="/boot/bzImage.old"
label="LinuxOLD"
restricted

Further information on LILO can be found on lilo.org

> go up <

GRUB (Grand Unified Bootloader)

At first, you should ensure there is an already complete installation of GRUB on your hard disk.

To write GRUB to a floppy you want to boot from, please do the following:

$ su

# cd /usr/share/grub/i386-pc
or at different distros:
# cd /usr/lib/grub/i386-pc

# dd if=stage1 of=/dev/fd0 bs=512 count=1
1+0 records in
1+0 records out
# dd if=stage2 of=/dev/fd0 bs=512 seek=1
153+1 records in
153+1 records out

 

There is a GRUB option that lets you boot from a floppy while the kernel itself is read from hard disk. This is done like this:

# grub
grub> root (hd0,0)
grub> setup(fd0)
grub> quit

 

To install GRUB permanently on your hard disk, use this command:

# grub-install /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/hdb
[...]

Depending on your configuration, you'll have to select the correct hardware type (/dev/hda).
A warning: Using grub install to install on several hard disks sometimes leads to problems!
To write GRUB to a partition, you would enter:

# grub
grub> root (hd0,0)
grub> find /boot/grub/stage1
grub> setup (hd0) (MBR-Installation)
grub> setup (hd0,0) (Installation in Bootsektor von '0')

To start GNU/Linux directly, enter the folloing commands at the boot prompt:

grub> kernel /bzImage root=/dev/hda1
grub> boot

Or create a permanent GRUB configuration that lets you choose from a boot menu.
This file is named menu.lst and should be in your /boot directory (/boot/grub/menu.lst). It could look like this:

#
# Sample boot menu configuration file
#

# Standardmäßig, starte den ersten Eintrag
default 0

# Starte automatisch nach 30 Sekunden
timeout 30

# Falls -warum auch immer- der erste Eintrag nicht funktioniert,
# benutze den zweiten
fallback 1

# Für GNU/Hurd (von der ersten Festplatte, zweite Partition)
title GNU/Hurd
root (hd0,1)
kernel /boot/gnumach.gz root=hd0s1
module /boot/serverboot.gz

# Für GNU/Linux (von der zweiten Festplatte)
title GNU/Linux
kernel (hd1,0)/bzImage root=/dev/hdb1

# Für Windows NT oder Windows95 (von der ersten Festplatte)
title Windows NT / Windows 95 boot menu
root (hd0,0)
makeactive
chainloader +1
# Für DOS, wenn Windows NT installiert ist
# chainload /bootsect.dos

More information can be found on gnu.org/software/grub/manual

> go up <

Valid XHTML 1.0! Valid CSS! Made with Cascading Style Sheets best viewed with any browser Debian GNU/Linux

http://kernel-project.kickino.org/index_moz_en.php?action=boot
Last Change: 2011-05-04 21:17:57