]> git.pld-linux.org Git - packages/efi-boot-update.git/blame - README
The EFI shell is now packaged separately
[packages/efi-boot-update.git] / README
CommitLineData
b32e97c8 1(U)EFI boot loaders updater
7a63766a
JK
2==========================
3
4What is this for?
5-----------------
6
24e7240b
JK
7(U)EFI systems boot using boot loaders on a special EFI System Partition.
8Many different boot loaders may be present at a time. These are not only
9traditional boot loaders like GRUB, but arbitrary 'EFI applications'.
7a63766a
JK
10
11Xen or Linux kernel can be built as an EFI application too and booted directly
12from the EFI firmware. The problem is the kernels and data or config files
13needed for boot must be stored on the EFI System Partition, but that is not
14the place where they are installed on package upgrade. And it is hard to
15install files from RPM packages there directly.
16
17efi-boot-update script makes it easy to manage the files on the EFI system
18partition. Those files are to be installed in the regular Linux system and
19will be copied to the EFI system partition using rules defined in
24e7240b 20/etc/efi-boot/update.d/*.conf files (efi-boot-update modules).
7a63766a
JK
21
22efi-boot-update will also manage EFI boot manager configuration, adding
b32e97c8
JK
23the configured boot loaders to the platform boot menu, provided the
24'efibootmgr' package is installed and functional.
7a63766a
JK
25
26
24e7240b
JK
27What is this not?
28-----------------
29
b32e97c8
JK
30This is not another configuration interface for the boot loaders.
31efi-boot-update can copy boot loader configuration files to the EFI system
32partition, but it doesn't care about their contents or syntax.
24e7240b
JK
33
34User Guide
35----------
36
37When efi-boot-update is installed it should be automatically called whenever
38any package containing EFI boot loader/application (or data for such
39application) is installed, upgraded or removed.
40
41The administrator may alter efi-boot-update operation editing the
42global /etc/efi-boot/update.conf file and the efi-boot-update modules
43in /etc/efi-boot/update.d (these configure rules for a specific application).
44
45The administrator is also responsible to edit any configuration files used by
46the boot loaders (usually in /etc/efi-boot).
47
b32e97c8
JK
48efi-boot-update should be manually called whenever any of these files
49have been edited.
50
24e7240b
JK
51/etc/efi-boot/update.conf
52.........................
53
54This file provide global settings for the efi-boot-update script. The
55file uses POSIX shell syntax to set shell variables. Values containing
56spaces should be quoted with double quotes.
57
58Following variables can be set there:
59
60 * LABEL_PREFIX – the text to be prepended to every boot manager entry label
61 created by efi-boot-update.
62 * ORDER – preferred boot loader order. The value should contain
63 space-separated names of efi-boot-update modules in /etc/efi/update.d
64 (filenames there with '.conf' stripped).
65 * PLATFORM_DIR – subdirectory of the 'EFI' directory in the EFI system
66 partition where the EFI applications and data files will be stored.
67 The value may contain '@ARCH@', which will be replaced with the
68 architecture ('x64' or 'x32') for which the application was built (boot
69 loaders may have both 32-bit and 64-bit versions and it may be different
70 architecture that the one Linux is running).
71
72modules in /etc/efi-boot/update.d
73.................................
74
b32e97c8
JK
75The *.conf files in the /etc/efi-boot/update.d directory provide rules for
76installing a boot loader and creating the EFI boot manager label for it.
24e7240b
JK
77
78Following variables can be be set for each module:
79
b32e97c8
JK
80 * ENABLED – when 'yes', then the files will be copied and a boot manager
81 entry will be created for the application (provided BINARY is also set)
82 * LABEL – label to use for the boot manager entry (defaults to the module
83 name)
84 * BINARY – name of the EFI binary installed in /boot/efi/EFI/$PLATFORM_DIR
85 or a path to any EFI binary existing on the EFI system partition
24e7240b
JK
86 * ARGS – command line arguments for the EFI application
87 * ARCH – architecture the binary is built for
88
b32e97c8
JK
89The module may define more configurable variables, but should use own unique
90prefix for them.
24e7240b 91
b32e97c8
JK
92The module file should also contain a install_files() function definition
93which defines what files are to be installed on the EFI system partition.
24e7240b 94
b32e97c8
JK
95It can contain any shell code, but should not define any new global variables.
96For convenience following are defined:
24e7240b 97
b32e97c8
JK
98 * '$DESTDIR' variable – defines the directory where the files should be
99 copied to that will be /boot/efi/EFI/$PLATFORM_DIR
24e7240b
JK
100 * 'update_file' function – copies a file to the EFI partition
101
102 Usage:
103 update_file [--missingok] SOURCE DEST
104
105 Where:
106 SOURCE – absolute path to the file to be copied
107 DEST – destination file name. Absolute (but should be in
108 /boot/efi) or, preferably, Relative to $DESTDIR
b32e97c8
JK
109 --missingok – when used, he command will not complain when the SOURCE
110 does not exist
24e7240b
JK
111
112 update_file behaviour depends on the '--verbose' and '--force' options
113 passed to the efi-boot-update script.
114
b32e97c8
JK
115Trouble shooting
116----------------
117
118> efi-boot-update: EFI system partition not mounted.
119
120To boot from EFI you need a GUID Partition Table on your HDD containing the
121EFI system partition. And efi-boot-update needs the partition mounted at
122/boot/efi
123
124When used with '--mount' option, efi-boot-update will try to find an mount the
125partition, but for proper operation during package installation/upgrades the
126partition should be always mounted.
127
128> efi-boot-update: efibootmgr missing, won't update the boot manager
129> configuration
130
131efi-boot-update needs the 'efibootmgr' utility to update the EFI boot manager
132configuration.
133
134> efi-boot-update: efibootmgr does not work (efivars interface not available?)
135> efi-boot-update: won't update boot manager configuration
136
137The 'efibootmgr' does not always wark. It needs the 'efivars' kernel module
138loaded (efi-boot-update takes care of that) and functioning correctly. This is
139not always the case. The 'efivars' module works only when the kernel was
140booted via EFI. If kernel has been started from from BIOS or is running
141under Xen 'efibootmgr' won't work.
142
143This causes a little boot strapping problem – you cannot use efi-boot-update
144alone to configure system for the first UEFI boot.
145
146efi-boot-update can still copy the files to the EFI partition, but one has
147to manually select the boot loader via the EFI platform configuration
148interface.
149
This page took 0.073851 seconds and 4 git commands to generate.