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) |
- PATCH sent upstream to support options "-h" "-v"
- explain GRUB_SERIAL_COMMAND, GRUB_PRELOAD_MODULES GRUB_DRIVE_BOOT and GRUB_DEVICE
now the "update-grub" page is more about the "/etc/default/grub" variables rather than the update-grub script. That's a bit confusing.
- reformat, using VARIABLE=XXX
- verify GRUB_DEFAULT is counted from 0
- improve description.
(8)UPDATE-GRUB - Generate grub.cfg.
SYNOPSIS
update-grub [-h] [-v]
DESCRIPTION
The command update-grub generates the file /boot/grub/grub.cfg (or /grub/grub.cfg for *BSD systems), according to :
The file /etc/default/grub contains some variables to customize scriptlets variables.
The scriptlets in /etc/grub.d/, each one generated a portion of grub.cfg.
-h, --help
- Print help page and exit
-v, --version
- Print the version information and exit
The following variables can be defined in /etc/default/grub to customize generated file :
GRUB_DEFAULT=NUM
The menu entry NUM will automatically be be booted after GRUB_TIMEOUT seconds if the user haven't chosen a menu entry.
NUM must be specified as the row number to boot, first line is row 0. You probably have to run update-grub two time : the first to build the menu, and know the wanted menu-entry position, then set GRUB_DEFAULT=, then re-run update-grub).
GRUB_CMDLINE_LINUX=KERNEL_PARAM
- Parameter(s) KERNEL_PARAM are appended to all Linux kernel command lines (equivalent to the grub v1 "kopt" variable).
GRUB_TIMEOUT=SECONDS
- Grub will boot the default entry after SECONDS, if the user remained inactive.
GRUB_TERMINAL
Define the terminal to use. This is most useful to plain-PC user that want graphical console (gfxterm) or serial console (serial). Otherwise, the script should use make valid auto-detection (ofconsole or console).
GRUB_SERIAL_COMMAND
If you set GRUB_TERMINAL=serial, this variable should contain the command should contain the serial command, with arguments. (default=serial, more information about [serial] in (7)grub_modules and (5)grub.cfg)
GRUB_DISTRIBUTOR
- This variable is usually pre-defined by the distributor, with it's name.
SAMPLE
GRUB_DEFAULT=0 GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR=Debian GRUB_CMDLINE_LINUX=quiet
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 |
(8)UPDATE-GRUB |
LICENSE |
This page is dual licensed under GPL + GFDL. |