The BootCurrent
value identifies the current boot path; it's descriptive, not a setting that you can alter. (Well, you probably could change it, but doing so would be pointless at best.)
To alter the order in which boot options are tried, you should edit the BootOrder
variable, which you do with the -o
option to efibootmgr
, as in:
sudo efibootmgr -o 2,1,0,2001,2002
This command, given your output, sets the boot order to use the ubuntu
entry first, the Unknown Device:
entry second, the Windows Boot Manager
entry third, and so on.
In the case of the output you posted, though, it looks like the ubuntu
and Unknown Device:
entries are identical except for their descriptions, so changing would have no effect (unless I've missed some detail or a detail is being hidden by efibootmgr
, both of which are possibilities).
In a previous question of yours, you posted a link to Boot Info Script output that included a different efibootmgr
run, which I reproduce here:
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0002,2001,2002,2003
Boot0000* Unknown Device: HD(1,800,100000,aa8f4a18-e5fc-41ff-bb2d-826eab7312c9)File(EFIubuntushimx64.efi)RC
Boot0001* USB HDD: SanDisk Cruzer Facet ACPI(a0341d0,0)PCI(14,0)USB(2,0)USB(1,0)HD(1,20,ee8be0,01a86199)RC
Boot0002* ubuntu HD(1,800,100000,86a8c8c9-a9fb-4586-b60c-e124e3fdfa94)File(EFIubuntushimx64.efi)
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network RC
This output is different from what you posted in the current question in that the Unknown Device:
entry references a different disk partition -- aa8f4a18-e5fc-41ff-bb2d-826eab7312c9 vs. 86a8c8c9-a9fb-4586-b60c-e124e3fdfa94. This made me think that you might have another copy of Shim stashed away on another partition, and that only one of those copies of Shim was working for you. You may need to check your partition table, locate that second copy of Shim, and figure out which one is working in order to proceed with a repair.
Incidentally, those partition identifiers are GUIDs associated with the partitions. You can identify the GUIDs of partitions with gdisk
's i
option or sgdisk
, as in:
$ sudo sgdisk -i 2 /dev/sda
Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI System)
Partition unique GUID: 6E49FCAF-D054-47C9-BA69-A668C5EE8192
First sector: 3072 (at 1.5 MiB)
Last sector: 1133567 (at 553.5 MiB)
Partition size: 1130496 sectors (552.0 MiB)
Attribute flags: 0000000000000000
Partition name: 'EFI System'
The value of interest here is the Partition unique GUID:
-- 6E49FCAF-D054-47C9-BA69-A668C5EE8192 in this case. Note that this matches the GUID displayed by efibootmgr
on the same computer:
$ sudo efibootmgr -v
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000
Boot0000* rEFInd (direct) HD(2,c00,114000,6e49fcaf-d054-47c9-ba69-a668c5ee8192)File(\EFI\refind\refind_x64.efi)
Boot0004* UEFI: Built-in EFI Shell Vendor(5023b95c-db26-429b-a648-bd47664c8012,)..BO
In my case, rEFInd is the default boot program, and it's stored on /dev/sda2
(6e49fcaf-d054-47c9-ba69-a668c5ee8192 -- note that GUIDs are shown as hexadecimal numbers with punctuation; they're case-insensitive).
Scan through your partitions looking for the one with a partition unique GUID code of aa8f4a18-e5fc-41ff-bb2d-826eab7312c9 to find your mystery partition and that suspected second instance of Shim. OTOH, it could be that your previous output was showing some long-gone copy of Shim from a previous installation, so it might no longer be valid and I might be sending you on a wild goose chase. If so, my apologies.
efibootmgr
boot order change doesn't work: https://github.com/rhboot/efibootmgr/issues/19 – Yaroslav Nikitenko Nov 26 '17 at 21:52