1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-27 07:22:31 +03:00

Merge pull request #3770 from AlexanderKurtz/master

bootctl: Always use upper case for "/EFI/BOOT" and "/EFI/BOOT/BOOT*.EFI".
This commit is contained in:
Lennart Poettering 2016-07-21 10:55:05 +02:00 committed by GitHub
commit 1f5dc27b66
3 changed files with 9 additions and 9 deletions

View File

@ -74,14 +74,14 @@
<para><command>bootctl update</command> updates all installed <para><command>bootctl update</command> updates all installed
versions of systemd-boot, if the current version is newer than the versions of systemd-boot, if the current version is newer than the
version installed in the EFI system partition. This also includes version installed in the EFI system partition. This also includes
the EFI default/fallback loader at /EFI/Boot/boot*.efi. A the EFI default/fallback loader at /EFI/BOOT/BOOT*.EFI. A
systemd-boot entry in the EFI boot variables is created if there systemd-boot entry in the EFI boot variables is created if there
is no current entry. The created entry will be added to the end of is no current entry. The created entry will be added to the end of
the boot order list.</para> the boot order list.</para>
<para><command>bootctl install</command> installs systemd-boot into <para><command>bootctl install</command> installs systemd-boot into
the EFI system partition. A copy of systemd-boot will be stored as the EFI system partition. A copy of systemd-boot will be stored as
the EFI default/fallback loader at /EFI/Boot/boot*.efi. A systemd-boot the EFI default/fallback loader at /EFI/BOOT/BOOT*.EFI. A systemd-boot
entry in the EFI boot variables is created and added to the top entry in the EFI boot variables is created and added to the top
of the boot order list.</para> of the boot order list.</para>

View File

@ -288,7 +288,7 @@ static int status_binaries(const char *esp_path, sd_id128_t partition) {
else if (r < 0) else if (r < 0)
return r; return r;
r = enumerate_binaries(esp_path, "EFI/Boot", "boot"); r = enumerate_binaries(esp_path, "EFI/BOOT", "boot");
if (r == 0) if (r == 0)
log_error("No default/fallback boot loader installed in ESP."); log_error("No default/fallback boot loader installed in ESP.");
else if (r < 0) else if (r < 0)
@ -548,7 +548,7 @@ static int mkdir_one(const char *prefix, const char *suffix) {
static const char *efi_subdirs[] = { static const char *efi_subdirs[] = {
"EFI", "EFI",
"EFI/systemd", "EFI/systemd",
"EFI/Boot", "EFI/BOOT",
"loader", "loader",
"loader/entries" "loader/entries"
}; };
@ -579,7 +579,7 @@ static int copy_one_file(const char *esp_path, const char *name, bool force) {
char *v; char *v;
/* Create the EFI default boot loader name (specified for removable devices) */ /* Create the EFI default boot loader name (specified for removable devices) */
v = strjoina(esp_path, "/EFI/Boot/BOOT", name + strlen("systemd-boot")); v = strjoina(esp_path, "/EFI/BOOT/BOOT", name + strlen("systemd-boot"));
strupper(strrchr(v, '/') + 1); strupper(strrchr(v, '/') + 1);
k = copy_file(p, v, force); k = copy_file(p, v, force);
@ -781,7 +781,7 @@ static int remove_boot_efi(const char *esp_path) {
struct dirent *de; struct dirent *de;
int r, c = 0; int r, c = 0;
p = strjoina(esp_path, "/EFI/Boot"); p = strjoina(esp_path, "/EFI/BOOT");
d = opendir(p); d = opendir(p);
if (!d) { if (!d) {
if (errno == ENOENT) if (errno == ENOENT)
@ -797,7 +797,7 @@ static int remove_boot_efi(const char *esp_path) {
if (!endswith_no_case(de->d_name, ".efi")) if (!endswith_no_case(de->d_name, ".efi"))
continue; continue;
if (!startswith_no_case(de->d_name, "Boot")) if (!startswith_no_case(de->d_name, "boot"))
continue; continue;
fd = openat(dirfd(d), de->d_name, O_RDONLY|O_CLOEXEC); fd = openat(dirfd(d), de->d_name, O_RDONLY|O_CLOEXEC);

View File

@ -11,8 +11,8 @@ mkfs.vfat -F32 ${LOOP}p1
mkdir -p mnt mkdir -p mnt
mount ${LOOP}p1 mnt mount ${LOOP}p1 mnt
mkdir -p mnt/EFI/{Boot,systemd} mkdir -p mnt/EFI/{BOOT,systemd}
cp systemd-bootx64.efi mnt/EFI/Boot/bootx64.efi cp systemd-bootx64.efi mnt/EFI/BOOT/BOOTX64.efi
[ -e /boot/shellx64.efi ] && cp /boot/shellx64.efi mnt/ [ -e /boot/shellx64.efi ] && cp /boot/shellx64.efi mnt/