~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to docs/grub.texi

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Evan Broder, Mario Limonciello
  • Date: 2010-11-24 13:59:55 UTC
  • mfrom: (1.17.6 upstream) (17.6.15 experimental)
  • Revision ID: james.westby@ubuntu.com-20101124135955-r6ii5sepayr7jt53
Tags: 1.99~20101124-1ubuntu1
[ Colin Watson ]
* Resynchronise with Debian experimental.  Remaining changes:
  - Adjust for default Ubuntu boot options ("quiet splash").
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Set a monochromatic theme for Ubuntu.
  - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
    recovery mode, quiet option, tweak how memtest86+ is displayed, and
    use UUIDs where appropriate.
  - Fix backslash-escaping in merge_debconf_into_conf.
  - Remove "GNU/Linux" from default distributor string.
  - Add crashkernel= options if kdump and makedumpfile are available.
  - If other operating systems are installed, then automatically unhide
    the menu.  Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus
    if available to check whether Shift is pressed.  If it is, show the
    menu, otherwise boot immediately.  If keystatus is not available, then
    fall back to a short delay interruptible with Escape.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Don't display introductory message about line editing unless we're
    actually offering a shell prompt.  Don't clear the screen just before
    booting if we never drew the menu in the first place.
  - Remove some verbose messages printed before reading the configuration
    file.
  - Suppress progress messages as the kernel and initrd load for
    non-recovery kernel menu entries.
  - Change prepare_grub_to_access_device to handle filesystems
    loop-mounted on file images.
  - Ignore devices loop-mounted from files in 10_linux.
  - Show the boot menu if the previous boot failed, that is if it failed
    to get to the end of one of the normal runlevels.
  - Don't generate /boot/grub/device.map during grub-install or
    grub-mkconfig by default.
  - Adjust upgrade version checks for Ubuntu.
  - Don't display "GRUB loading" unless Shift is held down.
  - Adjust versions of grub-doc and grub-legacy-doc conflicts to tolerate
    our backport of the grub-doc split.
  - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
  - Look for .mo files in /usr/share/locale-langpack as well, in
    preference.
  - Make sure GRUB_TIMEOUT isn't quoted unnecessarily.
  - Probe all devices in 'grub-probe --target=drive' if
    /boot/grub/device.map is missing.
  - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
  - Use qemu rather than qemu-system-i386.
  - Program vesafb on BIOS systems rather than efifb.
  - Add a grub-rescue-efi-amd64 package containing a rescue CD-ROM image
    for EFI-AMD64.
  - On Wubi, don't ask for an install device, but just update wubildr
    using the diverted grub-install.
  - When embedding the core image in a post-MBR gap, check for and avoid
    sectors matching any of a list of known signatures.
  - Disable video_bochs and video_cirrus on PC BIOS systems, as probing
    PCI space seems to break on some systems.
* Downgrade "ACPI shutdown failed" error to a debug message, since it can
  cause spurious test failures.

[ Evan Broder ]
* Enable lua from grub-extras.
* Incorporate the bitop library into lua.
* Add enum_pci function to grub module in lua.
* Switch back to gfxpayload=keep by default, unless the video hardware
  is known to not support it.

[ Mario Limonciello ]
* Built part_msdos and vfat into bootx64.efi (LP: #677758)

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
@subtitle The GRand Unified Bootloader, version @value{VERSION}, @value{UPDATED}.
47
47
@author Gordon Matzigkeit
48
48
@author Yoshinori K. Okuji
 
49
@author Colin Watson
 
50
@author Colin D. Bennett
49
51
@c The following two commands start the copyright page.
50
52
@page
51
53
@vskip 0pt plus 1filll
77
79
* Installation::                Installing GRUB on your drive
78
80
* Booting::                     How to boot different operating systems
79
81
* Configuration::               Writing your own configuration file
 
82
* Theme file format::           Format of GRUB theme files
80
83
* Network::                     Downloading OS images from a network
81
84
* Serial terminal::             Using GRUB via a serial line
82
85
* Vendor power-on keys::        Changing GRUB behaviour on vendor power-on keys
85
88
* Interface::                   The menu and the command-line
86
89
* Commands::                    The list of available builtin commands
87
90
* Security::                    Authentication and authorisation
 
91
* Supported kernels::           The list of supported kernels
88
92
* Troubleshooting::             Error messages produced by GRUB
89
93
* Invoking grub-install::       How to use the GRUB installer
90
94
* Invoking grub-mkconfig::      Generate a GRUB configuration file
105
109
@menu
106
110
* Overview::                    What exactly GRUB is and how to use it
107
111
* History::                     From maggot to house fly
 
112
* Changes from GRUB Legacy::    Differences from previous versions
108
113
* Features::                    GRUB features
109
 
* Changes from GRUB Legacy::    Differences from previous versions
110
114
* Role of a boot loader::       The role of a boot loader
111
115
@end menu
112
116
 
223
227
@item
224
228
A small amount of persistent storage is available across reboots, using the
225
229
@command{save_env} and @command{load_env} commands in GRUB and the
226
 
@command{grub-editenv} utility.
 
230
@command{grub-editenv} utility. For safety reasons this storage is only
 
231
available when installed on plain disk (no LVM or RAID), using non-checksumming
 
232
filesystem (no ZFS) and using BIOS or EFI functions (no ATA, USB or IEEE1275)
227
233
 
228
234
@item
229
235
GRUB 2 has more reliable ways to find its own files and those of target
555
561
@dfn{device map}, which you must fix if it is wrong. @xref{Device
556
562
map}, for more details.
557
563
 
 
564
On BIOS platforms GRUB has to use a so-called embedding zone. On msdos
 
565
partition tables, this is the space between the MBR and the first partition
 
566
(called the MBR gap or the boot track), while on GPT partition tables it
 
567
uses a BIOS Boot Partition (a partition with GUID
 
568
21686148-6449-6e6f-744e656564454649). If you use GRUB on a BIOS system, make
 
569
sure that the embedding zone is at least 31 KiB (512KiB or more
 
570
recommended).
 
571
 
558
572
If you still do want to install GRUB under a UNIX-like OS (such
559
573
as @sc{gnu}), invoke the program @command{grub-install} (@pxref{Invoking
560
574
grub-install}) as the superuser (@dfn{root}).
575
589
# @kbd{grub-install /dev/hd0}
576
590
@end example
577
591
 
578
 
If it is the first BIOS drive, this is the same as well:
579
 
 
580
 
@example
581
 
# @kbd{grub-install '(hd0)'}
582
 
@end example
583
 
 
584
 
Or you can omit the parentheses:
585
 
 
586
 
@example
587
 
# @kbd{grub-install hd0}
588
 
@end example
589
 
 
590
592
But all the above examples assume that GRUB should use images under
591
593
the root directory. If you want GRUB to use images under a directory
592
594
other than the root directory, you need to specify the option
618
620
quite careful. If the output is wrong, it is unlikely that your
619
621
computer will be able to boot with no problem.
620
622
 
 
623
Some BIOSes have a bug of exposing the first partition of a USB drive as a
 
624
floppy instead of exposing the USB drive as a hard disk (they call it
 
625
``USB-FDD'' boot). In such cases, you need to install like this:
 
626
 
 
627
@example
 
628
# @kbd{losetup /dev/loop0 /dev/sdb1}
 
629
# @kbd{mount /dev/loop0 /mnt/usb}
 
630
# @kbd{grub-install --boot-directory=/mnt/usb/bugbios --force --allow-floppy /dev/loop0}
 
631
@end example
 
632
 
 
633
This install doesn't conflict with standard install as long as they are in
 
634
separate directories.
 
635
 
621
636
Note that @command{grub-install} is actually just a shell script and the
622
637
real task is done by @command{grub-mkimage} and @command{grub-setup}.
623
638
Therefore, you may run those commands directly to install GRUB, without
625
640
familiar with the internals of GRUB. Installing a boot loader on a running
626
641
OS may be extremely dangerous.
627
642
 
628
 
 
629
643
@node Making a GRUB bootable CD-ROM
630
644
@section Making a GRUB bootable CD-ROM
631
645
 
828
842
nothing special about it. But do not forget that you have to specify a
829
843
root partition to the kernel.
830
844
 
831
 
FIXME: this section is incomplete.
832
 
 
833
845
@enumerate
834
846
@item
835
 
Run the command @command{boot} (@pxref{boot}).
 
847
Set GRUB's root device to the same drive as GNU/Hurd's.  The command
 
848
@code{search --file --set /boot/gnumach.gz} or similar may help you
 
849
(@pxref{search}).
 
850
 
 
851
@item 
 
852
Load the kernel and the modules, like this:
 
853
 
 
854
@example
 
855
@group
 
856
grub> @kbd{multiboot /boot/gnumach.gz root=device:hd0s1}
 
857
grub> @kbd{module  /hurd/ext2fs.static ext2fs --readonly \
 
858
                   --multiboot-command-line='$@{kernel-command-line@}' \
 
859
                   --host-priv-port='$@{host-port@}' \
 
860
                   --device-master-port='$@{device-port@}' \
 
861
                   --exec-server-task='$@{exec-task@}' -T typed '$@{root@}' \
 
862
                   '$(task-create)' '$(task-resume)'}
 
863
grub> @kbd{module /lib/ld.so.1 exec /hurd/exec '$(exec-task=task-create)'}
 
864
@end group
 
865
@end example
 
866
 
 
867
@item
 
868
Finally, run the command @command{boot} (@pxref{boot}).
836
869
@end enumerate
837
870
 
838
871
 
865
898
See the documentation in the Linux source tree for complete information on
866
899
the available options.
867
900
 
 
901
With @command{linux} GRUB uses 32-bit protocol. Some BIOS services like APM
 
902
or EDD aren't available with this protocol. In this case you need to use
 
903
@command{linux16}
 
904
 
 
905
@example
 
906
grub> @kbd{linux16 /vmlinuz root=/dev/sda1 acpi=off}
 
907
@end example 
 
908
 
868
909
@item
869
910
If you use an initrd, execute the command @command{initrd} (@pxref{initrd})
870
911
after @command{linux}:
873
914
grub> @kbd{initrd /initrd}
874
915
@end example
875
916
 
 
917
If you used @command{linux16} you need to use @command{initrd16}:
 
918
 
 
919
@example
 
920
grub> @kbd{initrd16 /initrd}
 
921
@end example
 
922
 
876
923
@item
877
924
Finally, run the command @command{boot} (@pxref{boot}).
878
925
@end enumerate
944
991
* Simple configuration::        Recommended for most users
945
992
* Shell-like scripting::        For power users and developers
946
993
* Embedded configuration::      Embedding a configuration file into GRUB
947
 
* Themes::                      Graphical menu themes
948
994
@end menu
949
995
 
950
996
 
988
1034
useful if @samp{GRUB_DEFAULT=saved}; it is a separate option because
989
1035
@samp{GRUB_DEFAULT=saved} is useful without this option, in conjunction with
990
1036
@command{grub-set-default} or @command{grub-reboot}.  Unset by default.
 
1037
The remarks of @pxref{Changes from GRUB Legacy} on the availability
 
1038
of @samp{save_env} apply.
991
1039
 
992
1040
@item GRUB_TIMEOUT
993
1041
Boot the default entry this many seconds after the menu is displayed, unless
1051
1099
Command-line arguments to add to menu entries for the Linux kernel.
1052
1100
 
1053
1101
@item GRUB_CMDLINE_LINUX_DEFAULT
1054
 
Unless @samp{GRUB_DISABLE_LINUX_RECOVERY} is set to @samp{true}, two menu
 
1102
Unless @samp{GRUB_DISABLE_RECOVERY} is set to @samp{true}, two menu
1055
1103
entries will be generated for each Linux kernel: one default entry and one
1056
1104
entry for recovery mode.  This option lists command-line arguments to add
1057
1105
only to the default menu entry, after those listed in
1074
1122
usually more reliable, but in some cases it may not be appropriate.  To
1075
1123
disable the use of UUIDs, set this option to @samp{true}.
1076
1124
 
1077
 
@item GRUB_DISABLE_LINUX_RECOVERY
1078
 
If this option is set to @samp{true}, disable the generation of recovery
1079
 
mode menu entries for Linux.
1080
 
 
1081
 
@item GRUB_DISABLE_NETBSD_RECOVERY
1082
 
If this option is set to @samp{true}, disable the generation of recovery
1083
 
mode menu entries for NetBSD.
 
1125
@item GRUB_DISABLE_RECOVERY
 
1126
If this option is set to @samp{true}, disable the generation of recovery
 
1127
mode menu entries.
1084
1128
 
1085
1129
@item GRUB_VIDEO_BACKEND
1086
1130
If graphical video support is required, either because the @samp{gfxterm}
1106
1150
 
1107
1151
@item GRUB_THEME
1108
1152
Set a theme for use with the @samp{gfxterm} graphical terminal.
1109
 
@xref{Themes}.
1110
1153
 
1111
1154
@item GRUB_GFXPAYLOAD_LINUX
1112
1155
Set to @samp{text} to force the Linux kernel to boot in normal text mode,
1206
1249
The backslash retains its special meaning only when followed by one of the
1207
1250
following characters: @samp{$}, @samp{"}, @samp{\}, or newline.  A
1208
1251
backslash-newline pair is treated as a line continuation (that is, it is
1209
 
removed from the input stream and effectively ignored).  A double quote may
1210
 
be quoted within double quotes by preceding it with a backslash.
 
1252
removed from the input stream and effectively ignored@footnote{Currently a
 
1253
backslash-newline pair within a variable name is not handled properly, so
 
1254
use this feature with some care.}).  A double quote may be quoted within
 
1255
double quotes by preceding it with a backslash.
1211
1256
 
1212
1257
@heading Variable expansion
1213
1258
 
1219
1264
Normal variable names begin with an alphabetic character, followed by zero
1220
1265
or more alphanumeric characters.
1221
1266
 
1222
 
Positional variable names consist of one or more digits.  These are reserved
1223
 
for future expansion.
 
1267
Positional variable names consist of one or more digits.  They represent
 
1268
parameters passed to function calls, with @samp{$1} representing the first
 
1269
parameter, and so on.
1224
1270
 
1225
1271
The special variable name @samp{?} expands to the exit status of the most
1226
 
recently executed command.
 
1272
recently executed command.  When positional variable names are active, other
 
1273
special variable names @samp{@@}, @samp{*} and @samp{#} are defined and they
 
1274
expand to all positional parameters with necessary quoting, positional
 
1275
parameters without any quoting, and positional parameter count respectively.
1227
1276
 
1228
1277
@heading Comments
1229
1278
 
1237
1286
command to be executed.  The remaining words are passed as arguments to the
1238
1287
invoked command.
1239
1288
 
1240
 
The return value of a simple command is its exit status.
 
1289
The return value of a simple command is its exit status.  If the reserved
 
1290
word @code{!} precedes the command, then the return value is instead the
 
1291
logical negation of the command's exit status.
1241
1292
 
1242
1293
@heading Compound commands
1243
1294
 
1284
1335
@xref{menuentry}.
1285
1336
@end table
1286
1337
 
 
1338
@heading Built-in Commands
 
1339
 
 
1340
Some built-in commands are also provided by GRUB script to help script
 
1341
writers perform actions that are otherwise not possible.  For example, these
 
1342
include commands to jump out of a loop without fully completing it, etc.
 
1343
 
 
1344
@table @asis
 
1345
@item break [@code{n}]
 
1346
Exit from within a @code{for}, @code{while}, or @code{until} loop.  If
 
1347
@code{n} is specified, break @code{n} levels.  @code{n} must be greater than
 
1348
or equal to 1.  If @code{n} is greater than the number of enclosing loops,
 
1349
all enclosing loops are exited.  The return value is 0 unless @code{n} is
 
1350
not greater than or equal to 1.
 
1351
 
 
1352
@item continue [@code{n}]
 
1353
Resume the next iteration of the enclosing @code{for}, @code{while} or
 
1354
@code{until} loop.  If @code{n} is specified, resume at the @code{n}th
 
1355
enclosing loop.  @code{n} must be greater than or equal to 1.  If @code{n}
 
1356
is greater than the number of enclosing loops, the last enclosing loop (the
 
1357
@dfn{top-level} loop) is resumed.  The return value is 0 unless @code{n} is
 
1358
not greater than or equal to 1.
 
1359
 
 
1360
@item return [@code{n}]
 
1361
Causes a function to exit with the return value specified by @code{n}.  If
 
1362
@code{n} is omitted, the return status is that of the last command executed
 
1363
in the function body.  If used outside a function the return status is
 
1364
false.
 
1365
 
 
1366
@item shift [@code{n}]
 
1367
The positional parameters from @code{n}+1 @dots{} are renamed to
 
1368
@code{$1}@dots{}.  Parameters represented by the numbers @code{$#} down to
 
1369
@code{$#}-@code{n}+1 are unset.  @code{n} must be a non-negative number less
 
1370
than or equal to @code{$#}.  If @code{n} is 0, no parameters are changed.
 
1371
If @code{n} is not given, it is assumed to be 1.  If @code{n} is greater
 
1372
than @code{$#}, the positional parameters are not changed.  The return
 
1373
status is greater than zero if @code{n} is greater than @code{$#} or less
 
1374
than zero; otherwise 0.
 
1375
 
 
1376
@end table
1287
1377
 
1288
1378
@node Embedded configuration
1289
1379
@section Embedding a configuration file into GRUB
1352
1442
The embedded configuration file may not contain menu entries directly, but
1353
1443
may only read them from elsewhere using @command{configfile}.
1354
1444
 
1355
 
 
1356
 
@node Themes
1357
 
@section Graphical menu themes
 
1445
@node Theme file format
 
1446
@chapter Theme file format
 
1447
@section Introduction
 
1448
The GRUB graphical menu supports themes that can customize the layout and
 
1449
appearance of the GRUB boot menu.  The theme is configured through a plain
 
1450
text file that specifies the layout of the various GUI components (including
 
1451
the boot menu, timeout progress bar, and text messages) as well as the
 
1452
appearance using colors, fonts, and images. Example is available in docs/example_theme.txt
 
1453
 
 
1454
@section Theme Elements
 
1455
@subsection Colors
 
1456
 
 
1457
Colors can be specified in several ways:
 
1458
 
 
1459
@itemize
 
1460
@item HTML-style ``#RRGGBB'' or ``#RGB'' format, where *R*, *G*, and *B* are hexadecimal digits (e.g., ``#8899FF'')
 
1461
@item as comma-separated decimal RGB values (e.g., ``128, 128, 255'')
 
1462
@item with ``SVG 1.0 color names'' (e.g., ``cornflowerblue'') which must be specified in lowercase.
 
1463
@end itemize
 
1464
@subsection Fonts
 
1465
The fonts GRUB uses ``PFF2 font format'' bitmap fonts.  Fonts are specified
 
1466
with full font names.  Currently there is no
 
1467
provision for a preference list of fonts, or deriving one font from another.
 
1468
Fonts are loaded with the ``loadfont'' command in GRUB.  To see the list of
 
1469
loaded fonts, execute the ``lsfonts'' command.  If there are too many fonts to
 
1470
fit on screen, do ``set pager=1'' before executing ``lsfonts''.
 
1471
 
 
1472
 
 
1473
@subsection Progress Bar
 
1474
 
 
1475
@float Figure, Pixmap-styled progress bar
 
1476
@c @image{Theme_progress_bar,,,,.png}
 
1477
@end float
 
1478
 
 
1479
@float Figure, Plain progress bar, drawn with solid color.
 
1480
@c @image{Theme_progress_bar_filled,,,,.png}
 
1481
@end float
 
1482
 
 
1483
Progress bars are used to display the remaining time before GRUB boots the
 
1484
default menu entry.  To create a progress bar that will display the remaining
 
1485
time before automatic boot, simply create a ``progress_bar'' component with
 
1486
the id ``__timeout__''.  This indicates to GRUB that the progress bar should
 
1487
be updated as time passes, and it should be made invisible if the countdown to
 
1488
automatic boot is interrupted by the user.
 
1489
 
 
1490
Progress bars may optionally have text displayed on them.  This is controlled
 
1491
through the ``show_text'' property, which can be set to either ``true'' or
 
1492
``false'' to control whether text is displayed.  When GRUB is counting down to
 
1493
automatic boot, the text informs the user of the number of seconds remaining.
 
1494
 
 
1495
 
 
1496
@subsection Circular Progress Indicator
 
1497
 
 
1498
@c @image{Theme_circular_progress,,,,.png}
 
1499
 
 
1500
The circular progress indicator functions similarly to the progress bar.  When
 
1501
given an id of ``__timeout__'', GRUB updates the circular progress indicator's
 
1502
value to indicate the time remaining.  For the circular progress indicator,
 
1503
there are two images used to render it:  the *center* image, and the *tick*
 
1504
image.  The center image is rendered in the center of the component, while the
 
1505
tick image is used to render each mark along the circumference of the
 
1506
indicator.
 
1507
 
 
1508
 
 
1509
@subsection Labels
 
1510
 
 
1511
Text labels can be placed on the boot screen.  The font, color, and horizontal
 
1512
alignment can be specified for labels.  If a label is given the id
 
1513
``__timeout__'', then the ``text'' property for that label is also updated
 
1514
with a message informing the user of the number of seconds remaining until
 
1515
automatic boot.  This is useful in case you want the text displayed somewhere
 
1516
else instead of directly on the progress bar.
 
1517
 
 
1518
 
 
1519
@subsection Boot Menu
 
1520
 
 
1521
@c @image{Theme_boot_menu,,,,.png}
 
1522
 
 
1523
The boot menu where GRUB displays the menu entries from the ``grub.cfg'' file.
 
1524
It is a list of items, where each item has a title and an optional icon.  The
 
1525
icon is selected based on the *classes* specified for the menu entry.  If
 
1526
there is a PNG file named ``myclass.png'' in the ``grub/themes/icons''
 
1527
directory, it will be displayed for items which have the class *myclass*.  The
 
1528
boot menu can be customized in several ways, such as the font and color used
 
1529
for the menu entry title, and by specifying styled boxes for the menu itself
 
1530
and for the selected item highlight.
 
1531
 
 
1532
 
 
1533
@subsection Styled Boxes
 
1534
 
 
1535
One of the most important features for customizing the layout is the use of
 
1536
 *styled boxes*.  A styled box is composed of 9 rectangular (and potentially
 
1537
empty) regions, which are used to seamlessly draw the styled box on screen:
 
1538
 
 
1539
@multitable @columnfractions 0.3 0.3 0.3
 
1540
@item Northwest (nw) @tab North (n)  @tab Northeast (ne)
 
1541
@item West (w)       @tab Center (c) @tab East (e)
 
1542
@item Southwest (sw) @tab South (s)  @tab Southeast (se)
 
1543
@end multitable
 
1544
 
 
1545
To support any size of box on screen, the center slice and the slices for the
 
1546
top, bottom, and sides are all scaled to the correct size for the component on
 
1547
screen, using the following rules:
 
1548
 
 
1549
@enumerate
 
1550
@item The edge slices (north, south, east, and west) are scaled in the direction of the edge they are adjacent to.  For instance, the west slice is scaled vertically.
 
1551
@item The corner slices (northwest, northeast, southeast, and southwest) are not scaled.
 
1552
@item The center slice is scaled to fill the remaining space in the middle.
 
1553
@end enumerate
 
1554
 
 
1555
As an example of how an image might be sliced up, consider the styled box
 
1556
used for a terminal view.
 
1557
 
 
1558
@float Figure, An example of the slices (in red) used for a terminal window. This drawing was created and sliced in Inkscape_, as the next section explains.
 
1559
@c @image{Box_slice_example_terminal,,,,.png}
 
1560
@end float
 
1561
   
 
1562
@subsection Creating Styled Box Images
 
1563
 
 
1564
The Inkscape_ scalable vector graphics editor is a very useful tool for
 
1565
creating styled box images.  One process that works well for slicing a drawing
 
1566
into the necessary image slices is:
 
1567
 
 
1568
@enumerate
 
1569
@item Create or open the drawing you'd like use.
 
1570
@item Create a new layer on the top of the layer stack.  Make it visible.  Select this layer as the current layer.
 
1571
@item Draw 9 rectangles on your drawing where you'd like the slices to be.  Clear the fill option, and set the stroke to 1 pixel wide solid stroke.  The corners of the slices must meet precisely; if it is off by a single pixel, it will probably be evident when the styled box is rendered in the GRUB menu.  You should probably go to File | Document Properties | Grids and enable a grid or create a guide (click on one of the rulers next to the drawing and drag over the drawing; release the mouse button to place the guide) to help place the rectangles precisely.
 
1572
@item Right click on the center slice rectangle and choose Object Properties. Change the "Id" to ``slice_c`` and click Set.  Repeat this for the remaining 8 rectangles, giving them Id values of ``slice_n``, ``slice_ne``, ``slice_e``, and so on according to the location.
 
1573
@item Save the drawing.
 
1574
@item Select all the slice rectangles.  With the slice layer selected, you can simply press Ctrl+A to select all rectangles.  The status bar should indicate that 9 rectangles are selected.
 
1575
@item Click the layer hide icon for the slice layer in the layer palette.  The rectangles will remain selected, even though they are hidden.
 
1576
@item Choose File | Export Bitmap and check the *Batch export 9 selected objects* box.  Make sure that *Hide all except selected* is unchecked. click *Export*.  This will create PNG files in the same directory as the drawing, named after the slices.  These can now be used for a styled box in a GRUB theme.
 
1577
@end enumerate
 
1578
 
 
1579
@section Theme File Manual
 
1580
 
 
1581
The theme file is a plain text file.  Lines that begin with ``#`` are ignored
 
1582
and considered comments.  (Note: This may not be the case if the previous line
 
1583
ended where a value was expected.)
 
1584
 
 
1585
The theme file contains two types of statements:
 
1586
@enumerate
 
1587
@item Global properties.
 
1588
@item Component construction.
 
1589
@end enumerate
 
1590
 
 
1591
@subsection Global Properties
 
1592
 
 
1593
@subsection Format
 
1594
 
 
1595
Global properties are specified with the simple format:
 
1596
@itemize
 
1597
@item name1: value1
 
1598
@item name2: "value which may contain spaces"
 
1599
@item name3: #88F
 
1600
@end itemize
 
1601
 
 
1602
In this example, name3 is assigned a color value.
 
1603
 
 
1604
 
 
1605
@subsection Global Property List
 
1606
 
 
1607
@multitable @columnfractions 0.3 0.6
 
1608
@item title-text @tab Specifies the text to display at the top center of the screen as a title.
 
1609
@item title-font @tab Defines the font used for the title message at the top of the screen.
 
1610
@item title-color @tab Defines the color of the title message.
 
1611
@item message-font @tab Defines the font used for messages, such as when GRUB is unable to automatically boot an entry.
 
1612
@item message-color @tab Defines the color of the message text.
 
1613
@item message-bg-color @tab Defines the background color of the message text area.
 
1614
@item desktop-image @tab Specifies the image to use as the background.  It will be scaled to fit the screen size.
 
1615
@item desktop-color @tab Specifies the color for the background if *desktop-image* is not specified.
 
1616
@item terminal-box @tab Specifies the file name pattern for the styled box slices used for the command line terminal window.  For example, ``terminal-box: terminal_*.png'' will use the images ``terminal_c.png`` as the center area, ``terminal_n.png`` as the north (top) edge, ``terminal_nw.png`` as the northwest (upper left) corner, and so on.  If the image for any slice is not found, it will simply be left empty.
 
1617
@end multitable
 
1618
 
 
1619
 
 
1620
@subsection Component Construction
 
1621
 
 
1622
Greater customizability comes is provided by components.  A tree of components
 
1623
forms the user interface.  *Containers* are components that can contain other
 
1624
components, and there is always a single root component which is an instance
 
1625
of a *canvas* container.
 
1626
 
 
1627
Components are created in the theme file by prefixing the type of component
 
1628
with a '+' sign:
 
1629
 
 
1630
@code{   + label @{ text="GRUB" font="aqui 11" color="#8FF" @} }
 
1631
 
 
1632
properties of a component are specified as "name = value" (whitespace
 
1633
surrounding tokens is optional and is ignored) where *value* may be:
 
1634
@itemize
 
1635
@item a single word (e.g., ``align = center``, ``color = #FF8080``),
 
1636
@item a quoted string (e.g., ``text = "Hello, World!"``), or
 
1637
@item a tuple (e.g., ``preferred_size = (120, 80)``).
 
1638
@end itemize
 
1639
 
 
1640
@subsection Component List
 
1641
 
 
1642
The following is a list of the components and the properties they support.
 
1643
 
 
1644
@itemize
 
1645
@item label
 
1646
   A label displays a line of text.
 
1647
   
 
1648
   Properties:
 
1649
   @multitable @columnfractions 0.2 0.7
 
1650
   @item text @tab The text to display.
 
1651
   @item font @tab The font to use for text display.
 
1652
   @item color @tab The color of the text.
 
1653
   @item align @tab The horizontal alignment of the text within the component. Options are ``left``, ``center``, and ``right``.
 
1654
   @end multitable
 
1655
 
 
1656
@item image
 
1657
   A component that displays an image.  The image is scaled to fit the
 
1658
   component, although the preferred size defaults to the image's original
 
1659
   size unless the ``preferred_size`` property is explicitly set.
 
1660
 
 
1661
   Properties:
 
1662
 
 
1663
   @multitable @columnfractions 0.2 0.7
 
1664
   @item file @tab The full path to the image file to load.
 
1665
   @end multitable
 
1666
 
 
1667
@item progress_bar
 
1668
   Displays a horizontally oriented progress bar.  It can be rendered using
 
1669
   simple solid filled rectangles, or using a pair of pixmap styled boxes.
 
1670
 
 
1671
   Properties:
 
1672
 
 
1673
   @multitable @columnfractions 0.2 0.7
 
1674
   @item fg_color @tab The foreground color for plain solid color rendering.
 
1675
   @item bg_color @tab The background color for plain solid color rendering.
 
1676
   @item border_color @tab The border color for plain solid color rendering.
 
1677
   @item text_color @tab The text color.
 
1678
   @item show_text @tab Boolean value indicating whether or not text should be displayed on the progress bar.  If set to *false*, then no text will be displayed on the bar.  If set to any other value, text will be displayed on the bar.
 
1679
   @item bar_style @tab The styled box specification for the frame of the progress bar. Example: ``progress_frame_*.png``
 
1680
   @item highlight_style @tab The styled box specification for the highlighted region of the progress bar. This box will be used to paint just the highlighted region of the bar, and will be increased in size as the bar nears completion. Example: ``progress_hl_*.png``.
 
1681
   @item text @tab The text to display on the progress bar.  If the progress bar's ID is set to ``__timeout__``, then GRUB will updated this property with an informative message as the timeout approaches.
 
1682
   @item value @tab The progress bar current value.  Normally not set manually.
 
1683
   @item start @tab The progress bar start value.  Normally not set manually.
 
1684
   @item end @tab The progress bar end value.  Normally not set manually.
 
1685
   @end multitable
 
1686
 
 
1687
@item circular_progress
 
1688
   Displays a circular progress indicator.  The appearance of this component
 
1689
   is determined by two images:  the *center* image and the *tick* image.  The
 
1690
   center image is generally larger and will be drawn in the center of the
 
1691
   component.  Around the circumference of a circle within the component, the
 
1692
   tick image will be drawn a certain number of times, depending on the
 
1693
   properties of the component.
 
1694
 
 
1695
   Properties:
 
1696
 
 
1697
   @multitable @columnfractions 0.3 0.6
 
1698
   @item center_bitmap
 
1699
      @tab The file name of the image to draw in the center of the component.
 
1700
   @item tick_bitmap
 
1701
      @tab The file name of the image to draw for the tick marks.
 
1702
   @item num_ticks
 
1703
      @tab The number of ticks that make up a full circle.
 
1704
   @item ticks_disappear
 
1705
      @tab Boolean value indicating whether tick marks should progressively appear,
 
1706
      or progressively disappear as *value* approaches *end*.  Specify
 
1707
      ``true`` or ``false``.
 
1708
   @item value
 
1709
      @tab The progress indicator current value.  Normally not set manually.
 
1710
   @item start
 
1711
      @tab The progress indicator start value.  Normally not set manually.
 
1712
   @item end
 
1713
      @tab The progress indicator end value.  Normally not set manually.
 
1714
   @end multitable
 
1715
@item boot_menu
 
1716
   Displays the GRUB boot menu.  It allows selecting items and executing them.
 
1717
 
 
1718
   Properties:
 
1719
 
 
1720
   @multitable @columnfractions 0.4 0.5
 
1721
   @item item_font
 
1722
      @tab The font to use for the menu item titles.
 
1723
   @item selected_item_font
 
1724
      @tab The font to use for the selected menu item, or ``inherit`` (the default)
 
1725
      to use ``item_font`` for the selected menu item as well.
 
1726
   @item item_color
 
1727
      @tab The color to use for the menu item titles.
 
1728
   @item selected_item_color
 
1729
      @tab The color to use for the selected menu item, or ``inherit`` (the default)
 
1730
      to use ``item_color`` for the selected menu item as well.
 
1731
   @item icon_width
 
1732
      @tab The width of menu item icons.  Icons are scaled to the specified size.
 
1733
   @item icon_height
 
1734
      @tab The height of menu item icons.
 
1735
   @item item_height
 
1736
      @tab The height of each menu item in pixels.
 
1737
   @item item_padding
 
1738
      @tab The amount of space in pixels to leave on each side of the menu item
 
1739
      contents.
 
1740
   @item item_icon_space
 
1741
      @tab The space between an item's icon and the title text, in pixels.
 
1742
   @item item_spacing
 
1743
      @tab The amount of space to leave between menu items, in pixels.
 
1744
   @item menu_pixmap_style
 
1745
      @tab The image file pattern for the menu frame styled box.
 
1746
      Example:  ``menu_*.png`` (this will use images such as ``menu_c.png``,
 
1747
      ``menu_w.png``, `menu_nw.png``, etc.)
 
1748
   @item selected_item_pixmap_style
 
1749
      @tab The image file pattern for the selected item highlight styled box.
 
1750
   @item scrollbar
 
1751
      @tab Boolean value indicating whether the scroll bar should be drawn if the
 
1752
      frame and thumb styled boxes are configured.
 
1753
   @item scrollbar_frame
 
1754
      @tab The image file pattern for the entire scroll bar.
 
1755
      Example:  ``scrollbar_*.png``
 
1756
   @item scrollbar_thumb
 
1757
      @tab The image file pattern for the scroll bar thumb (the part of the scroll
 
1758
      bar that moves as scrolling occurs).
 
1759
      Example:  ``scrollbar_thumb_*.png``
 
1760
   @item max_items_shown
 
1761
      @tab The maximum number of items to show on the menu.  If there are more than
 
1762
      *max_items_shown* items in the menu, the list will scroll to make all
 
1763
      items accessible.
 
1764
   @end multitable
 
1765
 
 
1766
@item canvas
 
1767
   Canvas is a container that allows manual placement of components within it.
 
1768
   It does not alter the positions of its child components.  It assigns all
 
1769
   child components their preferred sizes.
 
1770
 
 
1771
@item hbox
 
1772
   The *hbox* container lays out its children from left to right, giving each
 
1773
   one its preferred width.  The height of each child is set to the maximum of
 
1774
   the preferred heights of all children.
 
1775
   
 
1776
@item vbox
 
1777
   The *vbox* container lays out its children from top to bottom, giving each
 
1778
   one its preferred height.  The width of each child is set to the maximum of
 
1779
   the preferred widths of all children.
 
1780
@end itemize
 
1781
 
 
1782
 
 
1783
@subsection Common properties
 
1784
 
 
1785
The following properties are supported by all components:
 
1786
@table @samp
 
1787
@item left
 
1788
     The distance from the left border of container to left border of the object in either of three formats:
 
1789
        @multitable @columnfractions 0.2 0.7
 
1790
             @item x @tab Value in pixels
 
1791
             @item p% @tab Percentage
 
1792
             @item p%+x @tab mixture of both
 
1793
        @end multitable
 
1794
@item top
 
1795
      The distance from the left border of container to left border of the object in same format.
 
1796
@item width
 
1797
      The width of object in same format.
 
1798
@item height
 
1799
      The height of object in same format.
 
1800
@item id 
 
1801
   The identifier for the component.  This can be any arbitrary string.
 
1802
   The ID can be used by scripts to refer to various components in the GUI
 
1803
   component tree.  Currently, there is one special ID value that GRUB
 
1804
   recognizes:
 
1805
 
 
1806
   @multitable @columnfractions 0.2 0.7
 
1807
   @item ``__timeout__`` @tab Any component with this ID will have its *text*, *start*, *end*, *value*, and *visible* properties set by GRUB when it is counting down to an automatic boot of the default menu entry.
 
1808
   @end multitable
 
1809
@end table
 
1810
 
1358
1811
 
1359
1812
 
1360
1813
@node Network
1367
1820
 
1368
1821
@example
1369
1822
@group
1370
 
grub-mkimage --format=i386-pc --output=core.img --prefix='(pxe)/boot/grub' pxe pxecmd
1371
 
cat /boot/grub/pxeboot.img core.img >grub.pxe
 
1823
grub-mkimage --format=i386-pc-pxe --output=grub.pxe --prefix='(pxe)/boot/grub' pxe pxecmd
1372
1824
@end group
1373
1825
@end example
1374
1826
 
1378
1830
the DHCP server configuration to offer @file{grub.pxe} as the boot file (the
1379
1831
@samp{filename} option in ISC dhcpd).
1380
1832
 
 
1833
You can also use the @command{grub-mknetdir} utility to generate an image
 
1834
and a GRUB directory tree, rather than copying files around manually.
 
1835
 
1381
1836
After GRUB has started, files on the TFTP server will be accessible via the
1382
1837
@samp{(pxe)} device.
1383
1838
 
1416
1871
The name of the DHCP server responsible for these boot parameters.
1417
1872
Read-only.
1418
1873
 
1419
 
@item net_pxe_blksize
 
1874
@item pxe_blksize
1420
1875
The PXE transfer block size.  Read-write, defaults to 512.
1421
1876
 
1422
1877
@item pxe_default_server
1986
2441
@command{terminal_input} or @command{terminal_output} command is used
1987
2442
(@pxref{terminal_input}, @pxref{terminal_output}).
1988
2443
 
1989
 
This command is only available if GRUB is compiled with serial
1990
 
support. See also @ref{Serial terminal}.
 
2444
See also @ref{Serial terminal}.
1991
2445
@end deffn
1992
2446
 
1993
2447
 
2094
2548
* pxe_unload::                  Unload the PXE environment
2095
2549
* reboot::                      Reboot your computer
2096
2550
* search::                      Search devices by file, label, or UUID
 
2551
* sendkey::                     Emulate keystrokes
2097
2552
* set::                         Set an environment variable
2098
2553
* unset::                       Unset an environment variable
2099
2554
* uppermem::                    Set the upper memory size
2477
2932
@node ls
2478
2933
@subsection ls
2479
2934
 
2480
 
@deffn Command ls [arg]
 
2935
@deffn Command ls [arg @dots{}]
2481
2936
List devices or files.
2482
2937
 
2483
2938
With no arguments, print all devices known to GRUB.
2604
3059
@end deffn
2605
3060
 
2606
3061
 
 
3062
@node sendkey
 
3063
@subsection sendkey
 
3064
 
 
3065
@deffn Command sendkey @
 
3066
 [@option{--num}|@option{--caps}|@option{--scroll}|@option{--insert}|@
 
3067
@option{--pause}|@option{--left-shift}|@option{--right-shift}|@
 
3068
@option{--sysrq}|@option{--numkey}|@option{--capskey}|@option{--scrollkey}|@
 
3069
@option{--insertkey}|@option{--left-alt}|@option{--right-alt}|@
 
3070
@option{--left-ctrl}|@option{--right-ctrl} @
 
3071
 @samp{on}|@samp{off}]@dots{} @
 
3072
 [@option{no-led}] @
 
3073
 keystroke
 
3074
Insert keystrokes into the keyboard buffer when booting.  Sometimes an
 
3075
operating system or chainloaded boot loader requires particular keys to be
 
3076
pressed: for example, one might need to press a particular key to enter
 
3077
"safe mode", or when chainloading another boot loader one might send
 
3078
keystrokes to it to navigate its menu.  
 
3079
 
 
3080
You may provide up to 16 keystrokes (the length of the BIOS keyboard
 
3081
buffer).  Keystroke names may be upper-case or lower-case letters, digits,
 
3082
or taken from the following table:
 
3083
 
 
3084
@c Please keep this table in the same order as in
 
3085
@c commands/i386/pc/sendkey.c, for ease of maintenance.
 
3086
@c Exception: The function and numeric keys are sorted, for aesthetics.
 
3087
 
 
3088
@multitable @columnfractions .4 .5
 
3089
@headitem Name @tab Key
 
3090
@item escape @tab Escape
 
3091
@item exclam @tab !
 
3092
@item at @tab @@
 
3093
@item numbersign @tab #
 
3094
@item dollar @tab $
 
3095
@item percent @tab %
 
3096
@item caret @tab ^
 
3097
@item ampersand @tab &
 
3098
@item asterisk @tab *
 
3099
@item parenleft @tab (
 
3100
@item parenright @tab )
 
3101
@item minus @tab -
 
3102
@item underscore @tab _
 
3103
@item equal @tab =
 
3104
@item plus @tab +
 
3105
@item backspace @tab Backspace
 
3106
@item tab @tab Tab
 
3107
@item bracketleft @tab [
 
3108
@item braceleft @tab @{
 
3109
@item bracketright @tab ]
 
3110
@item braceright @tab @}
 
3111
@item enter @tab Enter
 
3112
@item control @tab press and release Control
 
3113
@item semicolon @tab ;
 
3114
@item colon @tab :
 
3115
@item quote @tab '
 
3116
@item doublequote @tab "
 
3117
@item backquote @tab `
 
3118
@item tilde @tab ~
 
3119
@item shift @tab press and release left Shift
 
3120
@item backslash @tab \
 
3121
@item bar @tab |
 
3122
@item comma @tab ,
 
3123
@item less @tab <
 
3124
@item period @tab .
 
3125
@item greater @tab >
 
3126
@item slash @tab /
 
3127
@item question @tab ?
 
3128
@item rshift @tab press and release right Shift
 
3129
@item alt @tab press and release Alt
 
3130
@item space @tab space bar
 
3131
@item capslock @tab Caps Lock
 
3132
@item F1 @tab F1
 
3133
@item F2 @tab F2
 
3134
@item F3 @tab F3
 
3135
@item F4 @tab F4
 
3136
@item F5 @tab F5
 
3137
@item F6 @tab F6
 
3138
@item F7 @tab F7
 
3139
@item F8 @tab F8
 
3140
@item F9 @tab F9
 
3141
@item F10 @tab F10
 
3142
@item F11 @tab F11
 
3143
@item F12 @tab F12
 
3144
@item num1 @tab 1 (numeric keypad)
 
3145
@item num2 @tab 2 (numeric keypad)
 
3146
@item num3 @tab 3 (numeric keypad)
 
3147
@item num4 @tab 4 (numeric keypad)
 
3148
@item num5 @tab 5 (numeric keypad)
 
3149
@item num6 @tab 6 (numeric keypad)
 
3150
@item num7 @tab 7 (numeric keypad)
 
3151
@item num8 @tab 8 (numeric keypad)
 
3152
@item num9 @tab 9 (numeric keypad)
 
3153
@item num0 @tab 0 (numeric keypad)
 
3154
@item numperiod @tab . (numeric keypad)
 
3155
@item numend @tab End (numeric keypad)
 
3156
@item numdown @tab Down (numeric keypad)
 
3157
@item numpgdown @tab Page Down (numeric keypad)
 
3158
@item numleft @tab Left (numeric keypad)
 
3159
@item numcenter @tab 5 with Num Lock inactive (numeric keypad)
 
3160
@item numright @tab Right (numeric keypad)
 
3161
@item numhome @tab Home (numeric keypad)
 
3162
@item numup @tab Up (numeric keypad)
 
3163
@item numpgup @tab Page Up (numeric keypad)
 
3164
@item numinsert @tab Insert (numeric keypad)
 
3165
@item numdelete @tab Delete (numeric keypad)
 
3166
@item numasterisk @tab * (numeric keypad)
 
3167
@item numminus @tab - (numeric keypad)
 
3168
@item numplus @tab + (numeric keypad)
 
3169
@item numslash @tab / (numeric keypad)
 
3170
@item numenter @tab Enter (numeric keypad)
 
3171
@item delete @tab Delete
 
3172
@item insert @tab Insert
 
3173
@item home @tab Home
 
3174
@item end @tab End
 
3175
@item pgdown @tab Page Down
 
3176
@item pgup @tab Page Up
 
3177
@item down @tab Down
 
3178
@item up @tab Up
 
3179
@item left @tab Left
 
3180
@item right @tab Right
 
3181
@end multitable
 
3182
 
 
3183
As well as keystrokes, the @command{sendkey} command takes various options
 
3184
that affect the BIOS keyboard status flags.  These options take an @samp{on}
 
3185
or @samp{off} parameter, specifying that the corresponding status flag be
 
3186
set or unset; omitting the option for a given status flag will leave that
 
3187
flag at its initial state at boot.  The @option{--num}, @option{--caps},
 
3188
@option{--scroll}, and @option{--insert} options emulate setting the
 
3189
corresponding mode, while the @option{--numkey}, @option{--capskey},
 
3190
@option{--scrollkey}, and @option{--insertkey} options emulate pressing and
 
3191
holding the corresponding key.  The other status flag options are
 
3192
self-explanatory.
 
3193
 
 
3194
If the @option{--no-led} option is given, the status flag options will have
 
3195
no effect on keyboard LEDs.
 
3196
 
 
3197
If the @command{sendkey} command is given multiple times, then only the last
 
3198
invocation has any effect.
 
3199
 
 
3200
Since @command{sendkey} manipulates the BIOS keyboard buffer, it may cause
 
3201
hangs, reboots, or other misbehaviour on some systems.  If the operating
 
3202
system or boot loader that runs after GRUB uses its own keyboard driver
 
3203
rather than the BIOS keyboard functions, then @command{sendkey} will have no
 
3204
effect.
 
3205
 
 
3206
This command is only available on PC BIOS systems.
 
3207
@end deffn
 
3208
 
 
3209
 
2607
3210
@node set
2608
3211
@subsection set
2609
3212
 
2694
3297
commands.
2695
3298
 
2696
3299
 
 
3300
@node Supported kernels
 
3301
@chapter Supported boot targets
 
3302
 
 
3303
X86 support is summarised in the following table. ``Yes'' means that the kernel works on the given platform, ``crashes'' means an early kernel crash which we hope will be fixed by concerned kernel developers. ``no'' means GRUB doesn't load the given kernel on a given platform. ``headless'' means that the kernel works but lacks console drivers (you can still use serial or network console).  In case of ``no'' and ``crashes'' the reason is given in footnote.
 
3304
@multitable @columnfractions .50 .22 .22
 
3305
@item                                @tab BIOS    @tab Coreboot
 
3306
@item BIOS chainloading              @tab yes     @tab no (1)
 
3307
@item NTLDR                          @tab yes     @tab no (1)
 
3308
@item FreeBSD bootloader             @tab yes     @tab crashes (1)
 
3309
@item 32-bit kFreeBSD                @tab yes     @tab crashes (2,6)
 
3310
@item 64-bit kFreeBSD                @tab yes     @tab crashes (2,6)
 
3311
@item 32-bit kNetBSD                 @tab yes     @tab crashes (1)
 
3312
@item 64-bit kNetBSD                 @tab yes     @tab crashes (2)
 
3313
@item 32-bit kOpenBSD                @tab yes     @tab yes
 
3314
@item 64-bit kOpenBSD                @tab yes     @tab yes
 
3315
@item Multiboot                      @tab yes     @tab yes
 
3316
@item Multiboot2                     @tab yes     @tab yes
 
3317
@item 32-bit Linux (legacy protocol) @tab yes     @tab no (1)
 
3318
@item 64-bit Linux (legacy protocol) @tab yes     @tab no (1)
 
3319
@item 32-bit Linux (modern protocol) @tab yes     @tab yes
 
3320
@item 64-bit Linux (modern protocol) @tab yes     @tab yes
 
3321
@item 32-bit XNU                     @tab yes     @tab ?
 
3322
@item 64-bit XNU                     @tab yes     @tab ?
 
3323
@item 32-bit EFI chainloader         @tab no (3)  @tab no (3)
 
3324
@item 64-bit EFI chainloader         @tab no (3)  @tab no (3)
 
3325
@item Appleloader                    @tab no (3)  @tab no (3)
 
3326
@end multitable
 
3327
 
 
3328
@multitable @columnfractions .50 .22 .22
 
3329
@item                                @tab Multiboot    @tab Qemu 
 
3330
@item BIOS chainloading              @tab no (1)       @tab no (1)
 
3331
@item NTLDR                          @tab no (1)       @tab no (1)
 
3332
@item FreeBSD bootloader             @tab crashes (1)  @tab crashes (1)
 
3333
@item 32-bit kFreeBSD                @tab crashes (6)  @tab crashes (6)
 
3334
@item 64-bit kFreeBSD                @tab crashes (6)  @tab crashes (6)
 
3335
@item 32-bit kNetBSD                 @tab crashes (1)  @tab crashes (1)  
 
3336
@item 64-bit kNetBSD                 @tab yes          @tab yes
 
3337
@item 32-bit kOpenBSD                @tab yes          @tab yes
 
3338
@item 64-bit kOpenBSD                @tab yes          @tab yes
 
3339
@item Multiboot                      @tab yes          @tab yes
 
3340
@item Multiboot2                     @tab yes          @tab yes
 
3341
@item 32-bit Linux (legacy protocol) @tab no (1)       @tab no (1)
 
3342
@item 64-bit Linux (legacy protocol) @tab no (1)       @tab no (1)
 
3343
@item 32-bit Linux (modern protocol) @tab yes          @tab yes
 
3344
@item 64-bit Linux (modern protocol) @tab yes          @tab yes
 
3345
@item 32-bit XNU                     @tab ?            @tab ?
 
3346
@item 64-bit XNU                     @tab ?            @tab ?
 
3347
@item 32-bit EFI chainloader         @tab no (3)       @tab no (3)
 
3348
@item 64-bit EFI chainloader         @tab no (3)       @tab no (3)
 
3349
@item Appleloader                    @tab no (3)       @tab no (3)
 
3350
@end multitable
 
3351
 
 
3352
@multitable @columnfractions .50 .22 .22
 
3353
@item                                @tab 32-bit EFI    @tab 64-bit EFI
 
3354
@item BIOS chainloading              @tab no (1)        @tab no (1)
 
3355
@item NTLDR                          @tab no (1)        @tab no (1)
 
3356
@item FreeBSD bootloader             @tab crashes (1)   @tab crashes (1)
 
3357
@item 32-bit kFreeBSD                @tab headless      @tab headless
 
3358
@item 64-bit kFreeBSD                @tab headless      @tab headless
 
3359
@item 32-bit kNetBSD                 @tab crashes (1)   @tab crashes (1)
 
3360
@item 64-bit kNetBSD                 @tab yes           @tab yes
 
3361
@item 32-bit kOpenBSD                @tab headless      @tab headless
 
3362
@item 64-bit kOpenBSD                @tab headless      @tab headless
 
3363
@item Multiboot                      @tab yes           @tab yes
 
3364
@item Multiboot2                     @tab yes           @tab yes
 
3365
@item 32-bit Linux (legacy protocol) @tab no (1)        @tab no (1)
 
3366
@item 64-bit Linux (legacy protocol) @tab no (1)        @tab no (1)
 
3367
@item 32-bit Linux (modern protocol) @tab yes           @tab yes
 
3368
@item 64-bit Linux (modern protocol) @tab yes           @tab yes
 
3369
@item 32-bit XNU                     @tab yes           @tab yes
 
3370
@item 64-bit XNU                     @tab yes (5)       @tab yes
 
3371
@item 32-bit EFI chainloader         @tab yes           @tab no (4)
 
3372
@item 64-bit EFI chainloader         @tab no (4)        @tab yes
 
3373
@item Appleloader                    @tab yes           @tab yes
 
3374
@end multitable
 
3375
 
 
3376
@multitable @columnfractions .50 .22 .22
 
3377
@item                                @tab IEEE1275
 
3378
@item BIOS chainloading              @tab no (1)
 
3379
@item NTLDR                          @tab no (1)
 
3380
@item FreeBSD bootloader             @tab crashes (1)
 
3381
@item 32-bit kFreeBSD                @tab crashes (6)
 
3382
@item 64-bit kFreeBSD                @tab crashes (6)
 
3383
@item 32-bit kNetBSD                 @tab crashes (1)
 
3384
@item 64-bit kNetBSD                 @tab ?
 
3385
@item 32-bit kOpenBSD                @tab ?
 
3386
@item 64-bit kOpenBSD                @tab ?
 
3387
@item Multiboot                      @tab ?
 
3388
@item Multiboot2                     @tab ?
 
3389
@item 32-bit Linux (legacy protocol) @tab no (1)
 
3390
@item 64-bit Linux (legacy protocol) @tab no (1)
 
3391
@item 32-bit Linux (modern protocol) @tab ?
 
3392
@item 64-bit Linux (modern protocol) @tab ?
 
3393
@item 32-bit XNU                     @tab ?
 
3394
@item 64-bit XNU                     @tab ?
 
3395
@item 32-bit EFI chainloader         @tab no (3)
 
3396
@item 64-bit EFI chainloader         @tab no (3)
 
3397
@item Appleloader                    @tab no (3)
 
3398
@end multitable
 
3399
 
 
3400
@enumerate
 
3401
@item Requires BIOS
 
3402
@item Crashes because the memory at 0x0-0x1000 isn't available
 
3403
@item EFI only
 
3404
@item 32-bit and 64-bit EFI have different structures and work in different CPU modes so it's not possible to chainload 32-bit bootloader on 64-bit platform and vice-versa
 
3405
@item Some modules may need to be disabled
 
3406
@item Requires ACPI
 
3407
@end enumerate
 
3408
 
 
3409
PowerPC and Sparc ports support only Linux. MIPS port supports Linux and multiboot2.
 
3410
 
 
3411
@chapter Boot tests
 
3412
 
 
3413
As you have seen in previous chapter the support matrix is pretty big and some of the configurations are only rarely used. To ensure the quality bootchecks are available for all x86 targets except EFI chainloader, Appleloader and XNU. All x86 platforms have bootcheck facility except ieee1275. Multiboot, multiboot2, BIOS chainloader, ntldr and freebsd-bootloader boot targets are tested only with a fake kernel images. Only Linux is tested among the payloads using Linux protocols.
 
3414
 
 
3415
Following variables must be defined:
 
3416
 
 
3417
@multitable  @columnfractions .30 .65
 
3418
@item GRUB_PAYLOADS_DIR @tab directory containing the required kernels
 
3419
@item GRUB_CBFSTOOL @tab cbfstoll from Coreboot package (for coreboot platform only)
 
3420
@item GRUB_COREBOOT_ROM @tab empty Coreboot ROM
 
3421
@item GRUB_QEMU_OPTS @tab additional options to be supplied to QEMU
 
3422
@end multitable
 
3423
 
 
3424
Required files are:
 
3425
 
 
3426
@multitable  @columnfractions .40 .55
 
3427
@item kfreebsd_env.i386 @tab 32-bit kFreeBSD device hints
 
3428
@item kfreebsd.i386 @tab 32-bit FreeBSD kernel image
 
3429
@item kfreebsd.x86_64, kfreebsd_env.x86_64 @tab same from 64-bit kFreeBSD
 
3430
@item knetbsd.i386 @tab 32-bit NetBSD kernel image
 
3431
@item knetbsd.miniroot.i386 @tab 32-bit kNetBSD miniroot.kmod.
 
3432
@item knetbsd.x86_64, knetbsd.miniroot.x86_64  @tab same from 64-bit kNetBSD
 
3433
@item kopenbsd.i386 @tab 32-bit OpenBSD kernel bsd.rd image
 
3434
@item kopenbsd.x86_64 @tab same from 64-bit kOpenBSD
 
3435
@item linux.i386 @tab 32-bit Linux
 
3436
@item linux.x86_64 @tab 64-bit Linux
 
3437
@end multitable
 
3438
 
2697
3439
@node Troubleshooting
2698
3440
@chapter Error messages produced by GRUB
2699
3441