Grub v2 manual
The pages contributed here (FranklinPiat/*) were an attempt to write some documentation for Grub2. This documentation isn't updated anymore (since grub2-1.96+20080203 approximately) |
TODO
- description
- review LVM and RAID paragraph.
- Can one boot on a degraded RAID 1 or 5?
- Is it possible to use configfile or source to make multilevel menus ?
- more modules ! (tga, png, memdisk...)
- blocklist
grub_modules(7) - list of grub v2 modules.
NAME
- grub v2 modules.
DESCRIPTION
Grub v2 has a modular design. When you install grub on a system with (8)grub-install, it actually creates a core.img file and put it where your computer expects to find the bootloader (on a PC, it's the MBR).
The core.img is a kind of concatenation of required modules (that were pre-compiled by the distributor) : An actual minimalist boot handler, the module to access the current boot disk, the module understand it's partitioning scheme, the module to understand the abstraction scheme [lvm|raid|none] and finally the module to understand the filesystem (sometime, more files are added, like a [memdisk]).
Once the grub bootloader is "started" it searches for the (5)grub.cfg file, which is a kind of scripts, which in turn can load extra modules and present a menu to the user.
To boot the select operating system, grub will either :
- load the chosen Operating System kernel file (s), then pass the hand.
or pass the hand to the Operating System's own bootloader.
disk module
biosdisk PC style biosdisk. [@i386:pc]
- This module allows to access disk supported by BIOS, including hard disks, floppy disks, cdrom, usbdisks (i.e biosdisk makes BIOS calls to access disk). PROs: if the disk is recognized by the BIOS, you can used it.
ofdisk Open Firmware disk access (ieee1275).
efidisk - EFI based system. TODO is this correct ?
and :
ata ATA disk access.
This is a driver to handle disk access (which effectively means that you bypass the BIOS). Naming: The disk will be named like (ata0), and the partition like (ata0,1). (ata2) is the IDE master on second chanel. Note: At the moment, only two IDE ports are supported (base ioaddress 0x1f0, 0x170 + 0x3f6, 0x376 ). It supports CDROM (it's not very useful, since iso9660 filesystem isn't support at the moment).
memdisk - Access embedded memory disk.
- This module allow to read file on memdisk.
Memdisks are virtual disk that are mainly embedded into core.img file (i.e used by (8)grub-mkimage).
host - Dummy disk driver to provide access to the hosts filesystem.
loopback
Loopback allow mounting a file as if it were a disk (i.e turn a disk image in a virtual device). check the loopback command implemented by this module, in (5)grub.cfg)
abstraction module
lvm Module to read Logical Volumes.
- This module allows to have the grub modules and/or your kernel (i.e /boot/*) on a LVM volume. Note that LVM module understand LVM module names.
raid - Module to read RAID arrays.
- This module allows to have the grub modules and/or your kernel (i.e /boot/*) on RAID 0,1 and 5 arrays.
partmap modules
pc - Read PC style partition tables.
acorn - Read Linux/ADFS partition tables.
amiga - Read amiga partition tables (RDB).
apple - Read macintosh partition tables.
gpt - Read GUID Partition Tables (GPT).
sun - Read SUN style partition tables.
FileSystem modules
fshelp - Filesystem helper functions. required by all FileSystem modules.
affs - Amiga Fast FileSystem.
ext2 - Second Extended filesystem (symlinks allowed).
fat - FAT filesystem (FAT12, FAT16 and FAT32).
hfs - HFS.
hfsplus - HFS+ Filesystem.
iso9660 - iso9660 implementation with extensions:
jfs - JFS (symlinks allowed).
minix - The minix filesystem, version 1 and 2 (symlinks allowed).
ntfs - NTFS filesystem.
ntfscomp - compression support for the NTFS filesystem
reiserfs - ReiserFS versions up to 3.6
sfs - Amiga Smart FileSystem (symlinks allowed??).
ufs - Unix File System (symlinks allowed).
xfs - XFS, btree and extents are supported. (symlinks allowed??).
TODO describe more :
cpiofs - cpio and tar filesystem.
This module allow to "mount" a tar or cpio file as loopback device (binary mode cpio and new format tar are supported. text mode cpio and old format tar is not supported). Compressed tar and cpio aren't supported... yet ! (work is in progress).
insmod cpio insmod loopback loopback aa (hd0,1)/foo.cpio ls (aa)/ loopback bb (hd0,1)/bar.tar ls (bb)/
hostfs - Dummy filesystem to provide access to the hosts filesystem. ????? TODO
gzio - Decompression support for gzip
- gzio is an iofilter that allow some commands to work with compressed files transparently. It's used by cat, cmp, hexdump, multiboot and a few other commands. To put it another way, you can work with a compressed file like if it wasn't.
Loaders modules
_chain - Boot another boot loader (known as chainloader).
_bsd - Boot BSDs kernels.
_linux - Boot a Linux kernel.
_multiboot - Boot a Multiboot compatible kernel.
AUTHOR
Program Written by Yoshinori K. Okuji, Robert Millan, Marco Gerards and others (see AUTHORS file).
Manpage Written by Franklin Piat.
BUGS
Report bugs to <bug-grub@gnu.org>.
COPYRIGHT
Copyright © 2008 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
grub2-1.96+20080203 |
January 2008 |
(7)GRUB_MODULES |
LICENSE |
This page is dual licensed under GPL + GFDL. |