summaryrefslogtreecommitdiff
path: root/src/boot
AgeCommit message (Collapse)Author
2016-10-19bootctl: don't try to remove esp_path (#4407)Evgeny Vereshchagin
This is a follow-up for 9ee051b9c7623
2016-10-19boot: fix `bootctl install` segfault (#4404)Yu Watanabe
2016-10-09sd-boot: trigger to record further logs to tcg 2.0 final event log area (#4302)Lans Zhang
According to TCG EFI Protocol Specification for TPM 2.0 family, all events generated after the invocation of EFI_TCG2_GET_EVENT_LOG shall be stored in an instance of an EFI_CONFIGURATION_TABLE aka EFI TCG 2.0 final events table. Hence, it is necessary to trigger the internal switch through calling get_event_log() in order to allow to retrieve the logs from OS runtime. msekletar: > I've looked at EDK2 and indeed log entry is added to FinalEventsTable only after > EFI_TCG2_PROTOCOL.GetEventLog was called[1][2]. Also, same patch was currently > merged to shim by Peter Jones [3]. [1] https://github.com/tianocore/edk2/blob/master/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c#L698 [2] https://github.com/tianocore/edk2/blob/master/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c#L824 [3] rhinstaller/shim#64
2016-08-30bootctl: properly skip duplicate entries (#4048)Mantas Mikulėnas
'continue' is a fancy no-op here – it only skips through the inner loop, not the outer one, so entries already in BootOrder get printed twice. This partially reverts f939cff71577 "bootctl: various coding style updates".
2016-07-31Add enable_disable() helperZbigniew Jędrzejewski-Szmek
In this patch "enabled" and "disabled" is used exclusively, but "enable" and "disable" forms are need for the following patch.
2016-07-25Merge pull request #3757 from poettering/efi-searchZbigniew Jędrzejewski-Szmek
2016-07-22tree-wide: use sd_id128_is_null() instead of sd_id128_equal where appropriateLennart Poettering
It's a bit easier to read because shorter. Also, most likely a tiny bit faster.
2016-07-21bootctl: modernize install_loader_config()Lennart Poettering
let's the proper APIs to read the machine ID, and properly check for all errors.
2016-07-21bootctl: various coding style updatesLennart Poettering
2016-07-21bootctl: clean up get_file_version()Lennart Poettering
Make sure that we always initialize the return parameter on success, and that all errors result in an error message, not just some.
2016-07-21bootctl: use F_TYPE_EQUAL() to compare statfs' .f_type fieldLennart Poettering
After all, the field is kinda borked.
2016-07-21bootctl: move toupper() implementation to string-util.hLennart Poettering
We already have tolower() calls there, hence let's unify this at one place. Also, update the code to only use ASCII operations, so that we don't end up being locale dependant.
2016-07-21bootctl: make use of STRV_FOREACH() where we canLennart Poettering
2016-07-21bootctl: rework to use common verbs parsing, and add searching of ESP pathLennart Poettering
This rearranges bootctl a bit, so that it uses the usual verbs parsing routines, and automatically searches the ESP in /boot, /efi or /boot/efi, thus increasing compatibility with mainstream distros that insist on /boot/efi. This also adds minimal support for running bootctl in a container environment: when run inside a container verification of the ESP via raw block device access, trusting the container manager to mount the ESP correctly. Moreover, EFI variables are not accessed when running in the container.
2016-07-21bootctl: fix error message checkLennart Poettering
2016-07-21bootctl: minor coding style improvementsLennart Poettering
2016-07-21bootctl: Always use upper case for "/EFI/BOOT" and "/EFI/BOOT/BOOT*.EFI".Alexander Kurtz
If the ESP is not mounted with "iocharset=ascii", but with "iocharset=utf8" (which is for example the default in Debian), the file system becomes case sensitive. This means that a file created as "FooBarBaz" cannot be accessed as "foobarbaz" since those are then considered different files. Moreover, a file created as "FooBar" can then also not be accessed as "foobar", and it also prevents such a file from being created, as both would use the same 8.3 short name "FOOBAR". Even though the UEFI specification [0] does give the canonical spelling for the files mentioned above, not all implementations completely conform to that, so it's possible that those files would already exist, but with a different spelling, causing subtle bugs when scanning or modifying the ESP. While the proper fix would of course be that everybody conformed to the standard, we can work around this problem by just referencing the files by their 8.3 short names, i.e. using upper case. Fixes: #3740 [0] <http://www.uefi.org/specifications>, version 2.6, section 3.5.1.1
2016-07-21bootctl: Use lower case string constants in case-insensitive comparisons.Alexander Kurtz
2016-07-18sd-boot: Fix waiting for keyboard input (#3735)Jan Janssen
WaitForKeyEx may never return on some UEFI systems depending on firmware, hardware configuration and the phase of the moon. Use ConIn->WaitForKey unconditionally instead. Fixes #3632
2016-07-12Various fixes for typos found by lintian (#3705)Michael Biebl
2016-05-09tree-wide: rename draw_special_char to special_glyphZbigniew Jędrzejewski-Szmek
That function doesn't draw anything on it's own, just returns a string, which sometimes is more than one character. Also remove "DRAW_" prefix from character names, TREE_* and ARROW and BLACK_CIRCLE are unambigous on their own, don't draw anything, and are always used as an argument to special_glyph(). Rename "DASH" to "MDASH", as there's more than one type of dash.
2016-02-23tree-wide: minor formatting inconsistency cleanupsVito Caputo
2016-02-11sd-boot: put hashed kernel command line in a PCR of the TPMHarald Hoyer
The UEFI BIOS already hashes the contents of the loaded image, so the initrd and the command line of the binary are recorded. Because manually added LoadOptions are not taken into account, these should be recorded also. This patch logs and extends a TPM PCR register with the LoadOptions. This feature can be enabled with configure --enable-tpm The PCR register index can be specified with configure --with-tpm-pcrindex=<NUM>
2016-02-10tree-wide: remove Emacs lines from all filesDaniel Mack
This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
2016-01-31bootctl: replace readdir() loops with FOREACH_DIRENTMichal Sekletar
2016-01-20bootctl: use DRAW_TREE_RIGHT rather than hard-coded UTF-8 characterDaniel Mack
Fixes #2384
2015-11-16tree-wide: sort includesThomas Hindoe Paaboel Andersen
Sort the includes accoding to the new coding style.
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-27util-lib: move more locale-related calls to locale-util.[ch]Lennart Poettering
2015-10-27util-lib: move more file I/O related calls into fileio.[ch]Lennart Poettering
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-09-29util: introduce common version() implementation and use it everywhereLennart Poettering
This also allows us to drop build.h from a ton of files, hence do so. Since we touched the #includes of those files, let's order them properly according to CODING_STYLE.
2015-09-09tree-wide: update empty-if coccinelle script to cover empty-while and moreLennart Poettering
Let's also clean up single-line while and for blocks.
2015-08-27tree-wide: we place the opening bracket on the same line as the function nameLennart Poettering
Let's do this everywhere the same way.
2015-08-06bootctl: fix path in log messageKarel Zak
2015-07-30systemd-boot: sort /EFI/Linux/*.efi filesKay Sievers
2015-07-29Merge pull request #779 from poettering/fflush-and-checkDaniel Mack
tree-wide: port everything over to fflush_and_check()
2015-07-29tree-wide: port everything over to fflush_and_check()Lennart Poettering
Some places invoked fflush() directly with their own manual error checking, let's unify all that by using fflush_and_check(). This also unifies the general error paths of fflush()+rename() file writers.
2015-07-29sd-boot: stub - export LoaderDevicePartUUIDKay Sievers
2015-07-26systemd-boot: fix whitespaceKay Sievers
2015-07-26Merge pull request #634 from icarlosvenegas/sd-boot-show-efi-cmdline_v2Kay Sievers
sd-boot: Show stub cmdline when edit (v2)
2015-07-25bootctl: add missing newlineKay Sievers
2015-07-20sd-boot:Show stub cmdline when editJose Carlos Venegas Munoz
If Linux efi stub is used, embedded cmdline in efi stub is not shown. As a result, it is required to rewrite all the line, if is only required to modify it. This behavior only happen using Linux efi stub. This patch allows boot loader to show embedded cmdline when 'e' key is pressed to edit boot loader options.
2015-07-15sd-boot: ignore missing /etc/machine-idDavid Herrmann
If /etc/machine-id is missing (eg., gold images), we should not fail installing sd-boot. This is a perfectly fine use-case and we should simply skip installing the default loader config in that case.
2015-07-09boot: use BUILD_ID if VERSION_ID is not presentDavid Herrmann
According to os-release(5), VERSION_ID is not mandatory and BUILD_ID only needs to be unique underneath VERSION_ID. Therefore, assuming a missing VERSION_ID field means 'empty', we can rely on BUILD_ID to be unique. Use BUILD_ID if VERSION_ID is not present. This way, rolling-release distros can still provide a proper os-release entry without crafting random VERSION_ID strings. This fixes #186.
2015-07-09boot: fix memleaks in os-release parserDavid Herrmann
There is no guarantee that the os-release section contains each key only once, nor any guarantee that all keys are present. Make sure we properly free memory in both cases. Not that it matters much, as we're short-living, anyway. But correct code is always nicer to read..
2015-07-04bootctl: fix sdboot to systemd-bootMiguel Bernal Marin
sdboot was renamed to systemd-boot Fixes: e7dd673d1e0a ("gummiboot/sd-boot/systemd-boot: rename galore") Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
2015-05-23bootctl: fix an error checkThomas Hindoe Paaboel Andersen
2015-05-22bootctl: ferror must be called before FILE is closedThomas Hindoe Paaboel Andersen
Otherwise it will not show any error stored