You are not logged in.

#1 2019-10-23 20:58:12

andrhua
Member
Registered: 2019-10-23
Posts: 17

[SOLVED] Change loader location of EFI entries

My laptop is Dell Inspiron 7577 which has HDD and SSD. Recently I decided to reinstall all OS'es on my computer, so first I got Arch, and then installed Windows 10. Both systems exist on SSD, but EFI partition is on HDD. There's no particular reason for the latter to be on HDD, just why break something that works.

# fdisk -l
Disk /dev/nvme0n1: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 970 EVO 500GB               
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E6E5A66F-1C81-4A33-B190-BBF4D41CE743

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048 156250111 156248064  74.5G Linux filesystem
/dev/nvme0n1p2 156250112 667969535 511719424   244G Linux filesystem
/dev/nvme0n1p3 667969536 683593727  15624192   7.5G Linux swap
/dev/nvme0n1p4 683593728 683626495     32768    16M Microsoft reserved
/dev/nvme0n1p5 683626496 976773119 293146624 139.8G Microsoft basic data


Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA MQ01ABD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: D24068B4-3512-4D56-B4F6-A1478403163A

Device      Start        End    Sectors   Size Type
/dev/sda1    2048     976895     974848   476M EFI System
/dev/sda2  976896 1953123046 1952146151 930.9G Microsoft basic data

Anyway, I installed Windows on the empty partition at SSD, everything went fine, and naturally I couldn't load to GRUB. Quick searching brought me here, except that in my case GRUB is located in

\EFI\GRUB\grubx64.efi

After this manipulation, I was able to boot to GRUB, but EFI entries turned out to be swapped:

# efibootmgr -v
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0002,0000
Boot0000* Windows Boot Manager	HD(1,GPT,61239d2e-7488-4f0d-b524-e40059eb8045,0x800,0xee000)/File(\EFI\GRUB\grubx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...t................
Boot0002* UEFI: TOSHIBA MQ01ABD100, Partition 1	HD(1,GPT,61239d2e-7488-4f0d-b524-e40059eb8045,0x800,0xee000)/File(EFI\Microsoft\Boot\bootmgfw.efi)..BO

I speculated that since efibootmgr and bcdedit are both user-space tools for managing EFI, the former is also capable of changing loader location, but

# efibootmgr -b 0000 -l "EFI\Microsoft\Boot\bootmgfw.efi"

doesn't modify anything. Maybe there's other way around?

I also wonder what is that gibberish after File(...) smile

Last edited by andrhua (2019-10-24 17:34:36)

Offline

#2 2019-10-24 02:20:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,406

Re: [SOLVED] Change loader location of EFI entries

That's likely mostly firmware related, what does it matter?  that seems to be a largely irrelevant identifier and this number not mattering in practice.

Offline

#3 2019-10-24 17:32:52

andrhua
Member
Registered: 2019-10-23
Posts: 17

Re: [SOLVED] Change loader location of EFI entries

Created the correct EFI entries and removed the old ones via efibootmgr. Simple as that.

Offline

Board footer

Powered by FluxBB