You are not logged in.

#1 2017-07-09 10:15:08

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

[SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

Hi guys, this is my first post, and I have been using Arch for something like 3 months now (on my desktop) and absolutely love it.

The other day I decided to also install Arch on my laptop for a dual boot system with (pre-existing) Windows 10.
The laptop is a Toshiba Satellite P50-A laptop with UEFI.

Both OSes are on seperate physical disks:
- Windows 10 is on the original primary drive.
- Arch was installed on a second SSD (located in an optical bay caddy).

The boot loader is systemd-boot.

Following the Arch guide:
bootctl --path=/boot/ install
Note: during the Arch installation (before pacstrap) the Windows EFI partition was mount to /mnt/boot)

/boot/loader/loader.conf
    default arch
    timeout 3
    editor 0

/boot/loader/entries/arch.conf
    title Arch Linux
    linux /vmlinuz-linux
    initrd /intel-ucode.img
    initrd /initramfs-linux.img
    options cryptdeviceUUID=[...big hexadecimal number...]:volume-root=/dev/mapper/volume-root quiet rw


Package intel-ucode is installed.
Intel microcode updates are enabled.



THE PROBLEM
When I reboot my laptop, after the Toshiba (manufacturer) screen is displayed , it goes straight to Windows 10. No systemd-boot loader screen, just directly to Windows 10.

For me to get into Arch, I need to:
1. Boot into Windows 10
2. Go to Windows Startup UEFI options
3. Select 'Use a device'
4. Select 'Linux Boot Manager'

The system will then reboot, go to the Toshiba (manufacturer screen), then display the UEFI boot loader screen with the following options (menu 1):

    Arch Linux
    Windows Boot Manager
    EFI Default Loader
    Reboot Into Firmware Interface

Choosing 'Arch Linux' will load Arch successfully.

This is really un-desirable. Booting first into Windows, then go through Windows UEFI menus to reboot, to finally get into Arch Linux.
This process is painful and slow. Ugh!


Why is the systemd-boot loader menu being skipped (and going straight to Windows)?
Have I done done something incorrectly, or missed something obvious? Or perhaps I have a bad UEFI implementation.
Is there some diagnostics I could do to solve this?



OPTIONAL QUESTION
Also another issue, but very minor. Choosing 'EFI Default Loader' in the above menu (i.e. menu 1) will take me to the following menu (menu 2):

    Arch Linux
    Windows Boot Manager

Selecting these options take me to the appropriate operating system correctly.

But why am I being presented with the menu option 'EFI Default Loader' in menu 1?
This gives me redundant menu options in menu 2.

Last edited by pete_mav_mitchell (2017-07-18 11:00:18)

Offline

#2 2017-07-09 11:02:40

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

Offline

#3 2017-07-10 12:12:48

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

Thank you very much for this. Below is the outcome of what I did.

1. Fast Startup
Done

2. Secure Boot
Done

3. UEFI Boot Order
Done - unfortunately the boot order is preserved back to default each time, i.e. Windows first. Ugh!

4. Change default UEFI path
QUESTION: I couldn't work out how to change the path to my .efi file. Something like efibootmgr -l \EFI\path\to\app.efi ?


5. Change UEFI application in Windows
QUESTION: What is the "\EFI\path\to\app.efi" referring to? *.efi in my Linux partition (e.g. /boot/EFI/Boot/bootx64.efi) or in the Windows EFI partition?

QUESTION: If I screw up the bootmgr path in bcdedit, can I get back into Windows to fix it?


QUESTION: The below directories each contain *.efi files. Where these created during the Arch install process when I mounted the Windows EFI partition to /mnt/boot, and then ran bootctl?
/boot/EFI/Boot
/boot/EFI/systemd
/boot/EFI/Microsoft
/boot/EFI/Toshiba

Offline

#4 2017-07-10 16:05:09

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

I know this may seem like it's too simple a fix but this does sound like what the issue is. Has the boot flag been set on the ESP? The systemd install requires that it is but I haven't seen that documented nor have I seen it report any error when it isn't set.

You seem to be able to boot from UEFI directly but not via systemd. I take it that the encryption isn't posing a probem. I'd set the boot flag, which will also set the ESP flag if it isn't already. You may or may not have to reinstall bootctl. It seems to me that you will have to but try it without doing that first.


Simple and Open

Offline

#5 2017-07-10 17:45:41

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

In case it's reallly just your UEFI being nasty (that it doesn't do boot order properly), there's a last resort you can try.

Warning: keep a copy of the original EFI/Microsoft/Boot/bootmgfw.efi to somewhere like your home directory or directly under /boot, since with this trick you might completely lose it by running bootctl install again or so.

Assume your ESP is mounted on /boot:

sudo -s
cd /boot
cp EFI/Microsoft/Boot/bootmgfw.efi EFI/Boot/BOOTX64.EFI
cp EFI/systemd/systemd-bootx64.efi EFI/Microsoft/Boot/bootmgfw.efi
exit

Your UEFI should then load systemd-boot by default and EFI Default Loader on its menu should boot to Windows.

Offline

#6 2017-07-10 19:31:53

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

pete_mav_mitchell wrote:

5. Change UEFI application in Windows
QUESTION: What is the "\EFI\path\to\app.efi" referring to? *.efi in my Linux partition (e.g. /boot/EFI/Boot/bootx64.efi) or in the Windows EFI partition?

As you are using systemd-boot, the full command would be:

bcdedit /set "{bootmgr}" path "\EFI\systemd\systemd-bootx64.efi"

That command must be run with Administrator privileges and will force bootmgfw.efi (the Windows bootloader and the only .efi file that your defective UEFI firmware will boot) to chainload systemd-bootx64.efi — this is the method that I use for dual-booting with Windows.

Remember to set up a boot service in Windows to run `bcdedit` every time because Windows will return the bootloader to the stock configuration after every update.

If I screw up the bootmgr path in bcdedit, can I get back into Windows to fix it?

No idea, best use copy&paste, eh?  tongue

As I said, I use that command in my Win10 system and it works fine (I chainload \EFI\BOOT\BOOTX64.EFI but that shouldn't make any difference).

The below directories each contain *.efi files. Where these created during the Arch install process when I mounted the Windows EFI partition to /mnt/boot, and then ran bootctl?
/boot/EFI/Boot
/boot/EFI/systemd
/boot/EFI/Microsoft
/boot/EFI/Toshiba

The Boot & systemd directories are made by Linux systems, the other two must be the work of Redmond.

tom.ty89 wrote:
sudo -s
cd /boot
cp EFI/Microsoft/Boot/bootmgfw.efi EFI/Boot/BOOTX64.EFI
cp EFI/systemd/systemd-bootx64.efi EFI/Microsoft/Boot/bootmgfw.efi
exit

I think that will break Windows updates and will almost certainly be reverted if the update does make it through.

Offline

#7 2017-07-11 01:50:48

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

Not sure. Haven't been doing it myself. Your way is certainly less nasty than mine. I am very doubtful about your WU concern tho. Windows might revert your changes to the BCD casually but I don't think it wouls keep reinstalling bootmgfw.efi to the ESP. Also I don't see how it can break WU either coz that's nothing like fast startup or whatsoever.

Offline

#8 2017-07-11 13:03:16

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

Blasphemist wrote:

I know this may seem like it's too simple a fix but this does sound like what the issue is. Has the boot flag been set on the ESP? The systemd install requires that it is but I haven't seen that documented nor have I seen it report any error when it isn't set.

You seem to be able to boot from UEFI directly but not via systemd. I take it that the encryption isn't posing a probem. I'd set the boot flag, which will also set the ESP flag if it isn't already. You may or may not have to reinstall bootctl. It seems to me that you will have to but try it without doing that first.

I read a ton of stuff about this...

Since the ESP is a partition type of 'EFI System' (code ef00) it doesn't require (nor does it have) a boot flag.
It appears boot flags are for MBR disks. And also this is a gparted terminology.

Plus I couldn't find a way to set boot flags with gdisk (i.e. GPT fdisk). FWIW I used gdisk to initially setup the partitions prior to the Arch install.
Also a Tip: I read fdisk shouldn't be used on GPT partitions, and gdisk shouldn't be used on MBR partitions.

Offline

#9 2017-07-11 13:17:55

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

Head_on_a_Stick wrote:

As you are using systemd-boot, the full command would be:

bcdedit /set "{bootmgr}" path "\EFI\systemd\systemd-bootx64.efi"

That command must be run with Administrator privileges and will force bootmgfw.efi (the Windows bootloader and the only .efi file that your defective UEFI firmware will boot) to chainload systemd-bootx64.efi — this is the method that I use for dual-booting with Windows.

Remember to set up a boot service in Windows to run `bcdedit` every time because Windows will return the bootloader to the stock configuration after every update.


Ok I executed the bcdedit command (with administrator privileges) and amazingly after a reboot, the system went straight to Windows 10.

Offline

#10 2017-07-11 13:25:42

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

I also tried the following with no luck... system takes me straight to Windows 10.

https://wiki.archlinux.org/index.php/Un … boot_order

Alternatively, you can set a startup script in Windows that ensures that the boot order is set correctly every time you boot Windows.
1. Open a command prompt with admin privlages. Run bcdedit /enum firmware and find your desired boot entry.
2. Copy the Identifier, including the brackets, e.g. {31d0d5f4-22ad-11e5-b30b-806e6f6e6963}
3. Create a batch file with the command bcdedit /set "{fwbootmgr}" DEFAULT "{copied boot identifier}"
4. Open gpedit.msc and under Local Computer Policy > Computer Configuration > Windows Settings > Scripts(Startup/Shutdown), choose Startup
5. Under the Scripts tab, choose the Add button, and select your batch file

Offline

#11 2017-07-11 13:29:54

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

What's behind the scene on GPT is partition type GUID. If you use fdisk to create a partition on a GPT you can see them listed when you pick the type. "EF00" is the gdisk translation of the partition type GUID. "EFI System" is often set as a partition label, which is arbitrary.

Partition type (code on MBR PT / GUID on GPT) rarely matters to a UEFI. I have yet to see an implementation that actually care about it. In any case, your UEFI is obviously aware of your ESP so it's either the type is correct or it simply doesn't care.

fdisk is capable of seting up a GPT, while gdisk is more handy and robust. gdisk is indeed capable of setting up GPT only though.

P.S. the esp flag is most likely the parted translation for the ESP partition type GUID. I am unsure about the boot flag though, it seem to have different meaning on different types of partition table. But meh, parted is silly, if not awful...

Last edited by tom.ty89 (2017-07-11 13:30:39)

Offline

#12 2017-07-11 13:50:14

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

Read my response here (post #5) https://bbs.archlinux.org/viewtopic.php?id=227836 If all else fails, the Refind-USB method will get you booting on a finicky UEFI system.

Offline

#13 2017-07-12 12:01:03

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

Annoyingduck wrote:

Read my response here (post #5) https://bbs.archlinux.org/viewtopic.php?id=227836 If all else fails, the Refind-USB method will get you booting on a finicky UEFI system.

rEFInd works! The systemd-boot loader screen is now being displayed and preserved across reboots & shutdowns.
I can now choose Arch or Windows from this menu to boot.

FYI I avoided  the USB approach and  installed refind in my Arch linux partition:
   pacman -S refind-efi
   refind-install

I'm not sure what will happen with a major Windows update. If systemd-boot is not preserved, then I will simply boot into Arch via Windows, and execute
   refind-mkdefault
for rEFInd Boot Manager to take the reins again.


As a side note, I'm not sure what rEFInd does different than efibootmgr or bcdedit. As behind the scenes rEFInd calls efibootmgr.
And efibootmgr reports the rEFInd Boot Manager ordered last in the boot managers list.

Thanks everyone for your help!

Offline

#14 2017-07-12 18:45:17

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

pete_mav_mitchell wrote:

As a side note, I'm not sure what rEFInd does different than efibootmgr or bcdedit. As behind the scenes rEFInd calls efibootmgr.
And efibootmgr reports the rEFInd Boot Manager ordered last in the boot managers list.

How curious.

Can we please see the full output of `efibootmgr -v`?

The output of `bootctl` (from Arch) may also prove illuminating.

Offline

#15 2017-07-12 21:21:28

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

If you run "sudo efibootmgr BootCurrent" you'll see it may be numbered last, but the default boot option is that number. And if you have one of those tricky UEFI bios's Windows can and will overwrite Refind eventually.  The way to fully prevent that is to use the Refind USB method, which is fool proof on a finicky UEFI.  My first UEFI Dell was like this.  No matter what Windows would overwrite the default loader, so I just kept a Refind USB installed in the back - problem was solved.

Last edited by Annoyingduck (2017-07-12 21:22:28)

Offline

#16 2017-07-13 03:53:08

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

Head_on_a_Stick wrote:
pete_mav_mitchell wrote:

As a side note, I'm not sure what rEFInd does different than efibootmgr or bcdedit. As behind the scenes rEFInd calls efibootmgr.
And efibootmgr reports the rEFInd Boot Manager ordered last in the boot managers list.

How curious.

Can we please see the full output of `efibootmgr -v`?

The output of `bootctl` (from Arch) may also prove illuminating.

Here you go... (I removed the uuids and mac address - call me paranoid)

Output of efibootmgr:

BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0001,0002,0004,0003,0005,0006,0007
Boot0000* Windows Boot Manager	HD(2,GPT,[...big uuid...],0x200800,0x82000)/File(\EFI\systemd\systemd-bootx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.f.b.8.5.2.c.-.5.c.e.d.-.4.f.7.3.-.b.c.e.1.-.f.3.5.b.3.6.4.7.4.7.9.5.}...a................
Boot0001* UEFI: Network Card 	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC([...mac address id...],0)/IPv4(0.0.0.0:0<->0.0.0.0:0,0,0)..BO
Boot0002* UEFI: Network Card 	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC([...mac address id...],0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0003* rEFInd Boot Manager	HD(2,GPT,[...big uuid...],0x200800,0x82000)/File(\EFI\refind\refind_x64.efi)
Boot0004* Linux Boot Manager	HD(2,GPT,[...big uuid...],0x200800,0x82000)/File(\EFI\systemd\systemd-bootx64.efi)
Boot0005* UEFI:CD/DVD Drive	BBS(129,,0x0)
Boot0006* UEFI:Removable Device	BBS(130,,0x0)
Boot0007* UEFI:Network Device	BBS(131,,0x0)

Output of bootctl:

Using EFI System Partition at /boot.
System:
     Firmware: UEFI 2.31 (American Megatrends 4.654)
  Secure Boot: disabled
   Setup Mode: user

Loader:
      Product: systemd-boot 233
    Partition: /dev/disk/by-partuuid/[...big uuid...]
         File: └─/EFI/systemd/systemd-bootx64.efi

Boot Loader Binaries:
          ESP: /dev/disk/by-partuuid/[...big uuid...]
         File: └─/EFI/systemd/systemd-bootx64.efi (systemd-boot 233)
         File: └─/EFI/BOOT/bootx64.efi (systemd-boot 233)

Boot Loader Entries in EFI Variables:
        Title: Windows Boot Manager
           ID: 0x0000
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/[...big uuid...]
         File: └─/EFI/systemd/systemd-bootx64.efi

        Title: Linux Boot Manager
           ID: 0x0004
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/[...big uuid...]
         File: └─/EFI/systemd/systemd-bootx64.efi

        Title: rEFInd Boot Manager
           ID: 0x0003
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/[...big uuid...]
         File: └─/EFI/refind/refind_x64.efi

Offline

#17 2017-07-13 23:24:24

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

From this last post you can see how your system is booting, and it isn't clean and correct. UEFI is trying to boot the windows boot manager and you have tricked it out to launch bootctl instead.

The bootctl "Linux Boot Manager"is really the fourth boot option in the boot order. You can simply correct the boot order to fix this using efibootmgr. Using this current trick of sorts will cause the windows boot loader to show up first anytime windows updates it's boot manager. When that will happen will be unpredictable.

You have boot options for Windows, rEFInd and bootctl that should be first in your boot order, if the files for them haven't been manually deleted. From the efibootmgr man page:

CHANGING THE BOOT ORDER
       Assuming  the  configuration  in Example #1, efibootmgr -o 3,4 could be called to specify PXE boot
       first, then Linux boot.

In your case the command would be:

# efibootmgr -o 4,3,0

This will put bootctl first in the boot order, rEFInd second and windows boot manager 3rd. Do note that the way you have things now, if you try to boot windows from the built in UEFI boot manager it will actually launch bootctl and then you will be able to select windows to boot. This is because you have configured UEFI to believe that the systemd-bootx64.efi file in the folder $ESP/EFI/systemd/ is the windows boot manager. It doesn't matter to UEFI what the label for a UEFI boot entry is, it launches whatever is in the file location associated with that boot entry. You can see the status from bootctl that you posted above shows what file is associated with the windows boot entry.

You said above that you don't understand the difference in the tools your using. The efibootmgr utility is used by nearly all linux boot managers and boot loaders during their installation process to add to and edit UEFI boot related variables. Sometimes the user does this manually, sometimes this is done behind the curtain and the user doesn't know of or see it being used. The efibootmgr help output or man page should be a big help in seeing how to use it. rEFInd is a boot manager, not boot loader, from Rod Smith that scans for boot options at boot and displays the options to load. The options can be kernels, boot managers, boot loaders and can be from a removable drive since it scans at the time of boot. bcdedit is a tool for manipulating the windows boot manager. I do not recommend using it to trick the system as you may well have to re-do the tricks after windows updates.

We should have asked for the bootctl status output and efibootmgr verbose mode output before. Sorry bout that. UEFI boots boot entries in the order shown in the boot order and each of those entries include a property that is the file UEFI will launch.   The file launched will then take over the boot process. I usually just have UEFI launch my Arch kernel directly. If at a given time I desire other boot options I can configure UEFI to launch a different kernel, a boot manager or boot loader.


Simple and Open

Offline

#18 2017-07-15 01:04:52

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

From this last post you can see how your system is booting, and it isn't clean and correct. UEFI is trying to boot the windows boot manager and you have tricked it out to launch bootctl instead.

Thanks for pointing this out - totally agree. I've overridden the efibootmgr boot order by using rEFInd.



The bootctl "Linux Boot Manager"is really the fourth boot option in the boot order. You can simply correct the boot order to fix this using efibootmgr. Using this current trick of sorts will cause the windows boot loader to show up first anytime windows updates it's boot manager. When that will happen will be unpredictable.

You have boot options for Windows, rEFInd and bootctl that should be first in your boot order, if the files for them haven't been manually deleted.
In your case the command would be:

# efibootmgr -o 4,3,0

This will put bootctl first in the boot order, rEFInd second and windows boot manager 3rd.

I had previous tried getting efibootmgr boot order working but it just didn't work.
Putting bootctl "Linux Boot Manager" first, then Windows Boot Manager second, and finally the UEFI hardware third, forth, fifth... UEFI would boot straight to Windows 10.
The boot order was preserved correctly after reboots and shutdown, but it just wasn't following the boot order. Which is then I read about rEFInd in one of the posts, and went with it.


Something that is of interest, attempting AGAIN to get efibootmgr working without rEFInd, here are the steps I did:
1. Uninstalled rEFInd from Arch linux
2. Deleted the refind boot manager, e.g. sudo efibootmgr -b 3 -B
3. Set the boot order to Linux, Windows, e.g. sudo efibootmgr -o 4,0
4. Reboot

But the laptop boots straight to the same menu, which I'm assuming is the rEFInd boot manager. (Just like the original problem, e.g. straight to Windows 10).

5. (For sanity sake) Set the boot order to Windows, Linux e.g. sudo efibootmgr -o 0,4
6. Reboot

But the laptop boots straight to the same menu again (rEFInd boot manager). (Just like the original problem, e.g. straight to Windows 10).

QUESTION: Does the EFI system partition need to be updated to reflect these changes, i.e. delete the rEFInd boot manager binary?



Do note that the way you have things now, if you try to boot windows from the built in UEFI boot manager it will actually launch bootctl and then you will be able to select windows to boot. This is because you have configured UEFI to believe that the systemd-bootx64.efi file in the folder $ESP/EFI/systemd/ is the windows boot manager. It doesn't matter to UEFI what the label for a UEFI boot entry is, it launches whatever is in the file location associated with that boot entry. You can see the status from bootctl that you posted above shows what file is associated with the windows boot entry.

Thanks! I hadn't noticed this. I suspect this occurred in my many attempts to get dual boot working. In this instance I remember mucking around with bcdedit to point to the Linux Boot Manager.
I will revert this back to /EFI/BOOT/bootx64.efi

If efibootmgr boot order worked on my laptop I would prefer to just use this (and not rEFInd). As you said, it would be clean, simple, and rhobust.



You said above that you don't understand the difference in the tools your using. The efibootmgr utility is used by nearly all linux boot managers and boot loaders during their installation process to add to and edit UEFI boot related variables. Sometimes the user does this manually, sometimes this is done behind the curtain and the user doesn't know of or see it being used. The efibootmgr help output or man page should be a big help in seeing how to use it. rEFInd is a boot manager, not boot loader, from Rod Smith that scans for boot options at boot and displays the options to load. The options can be kernels, boot managers, boot loaders and can be from a removable drive since it scans at the time of boot. bcdedit is a tool for manipulating the windows boot manager. I do not recommend using it to trick the system as you may well have to re-do the tricks after windows updates.

After a week of working with UEFI and dual-boot, and many failed attempts. Now reading this makes makes it much more clearer. Thank you very much!



We should have asked for the bootctl status output and efibootmgr verbose mode output before. Sorry bout that. UEFI boots boot entries in the order shown in the boot order and each of those entries include a property that is the file UEFI will launch.   The file launched will then take over the boot process. I usually just have UEFI launch my Arch kernel directly. If at a given time I desire other boot options I can configure UEFI to launch a different kernel, a boot manager or boot loader.

My fault. I had mentioned the efibootmgr boot order briefly in my second post from the top. I now realise I had labeled it incorrectly as '3. UEFI Boot Order', and described it inadequately. Back then I didn't understand the difference between UEFI and efibootmgr.


Appreciate all your help and time on this. Thanks again.

Last edited by pete_mav_mitchell (2017-07-15 01:49:45)

Offline

#19 2017-07-15 14:03:06

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

pete_mav_mitchell wrote:

I've overridden the efibootmgr boot order by using rEFInd.

Just for clarity, I think you do now see that efibootmgr is a utility and the UEFI boot order are two different things. UEFI NVRAM system initialization ends it's job by using variables stored in that NVRAM to launch a boot loader, a boot manager or an OS kernel. That can't be stopped and it will be the first access of the disks in a system. If rEFInd runs it is because it is the first valid EFI executable that UEFI finds as it works down the boot order. The boot entries in the system and the boot order of those entries are written to the UEFI NVRAM using the efibootmgr utility.

The variables that make up each boot entry include a device, file and path to that file that point to the valid EFI executable for that entry. If the file doesn't exist, or the file isn't a valid EFI executable, UEFI moves to the next boot entry in the boot order and tries what that entry points to. So there are two parts to this in a way. The variables in UEFI NVRAM and the files on the ESP (the EFI System Partition). If for example you want to delete a boot entry and all associated with it you have to use efibootmgr to make the changes to the variables, delete all related files and folders on the ESP and remove the programs package using the package manager.

pete_mav_mitchell wrote:

QUESTION: Does the EFI system partition need to be updated to reflect these changes, i.e. delete the rEFInd boot manager binary?

As described above, yes. When you install Arch and create the ESP, it is empty at first. As boot loaders or boot managers or kernels are installed that ESP directory structure is created. The mount point that you use makes a difference for that. Using a /boot mount point puts the kernel at the root of the ESP for example. The kernel gets installed and updated at /boot and that is the root of the ESP so the kernel is on the ESP. If you use a /boot/efi mount point the /boot directory is on the / partition, not the ESP. In this case the kernel then resides on the / partition, not the ESP.

When you install boot loaders or managers they have program packages that are installed as any other package is but they also have files that are installed at a path that starts from the mount point of the ESP. Since those files full path starts with the mount point of the ESP, those files are on the ESP. Differing boot loaders and managers may not all be on the same page about ESP directory structure so you may see a bit of a strange nest of directories on the ESP.

It may helpful to include here that the UEFI can only launch files from the ESP. UEFI requires that the ESP be FAT32 and usually that the ESP flag be set on the ESP. Some implementations of UEFI may not care about the flag though. Grub and rEFInd include drivers that allow them to access other partitions so their installation processes put those drivers on the ESP, along with certain other files such as icons and such for rEFInd. Basically any files needed for the functions of the boot loader or manager before an OS is launched are on the ESP.

I once tested an installer for a distro that through my own error formatted the ESP but didn't wipe out the UEFI variables. I rebuilt the files and folders on the ESP by chrooting into my installed distros and re-doing the necessary part of boot loader or boot manager installations needed to repopulate the ESP. I could look at the UEFI variables to see what they pointed to for guiding me on that. The reverse would also be possible. If your UEFI variables were reset but the ESP were still in place you could recreate the needed boot option entries and boot order in UEFI using the boot options on the ESP to guide you.

Last edited by Blasphemist (2017-07-18 13:52:10)


Simple and Open

Offline

#20 2017-07-18 11:01:17

pete_mav_mitchell
Member
From: Australia
Registered: 2017-07-09
Posts: 30

Re: [SOLVED] No systemd-boot menu on dual boot Windows 10 and Arch

Thanks Blasphemist. A very help, informative and profound answer. Helps me and many others readying this thread.

Offline

Board footer

Powered by FluxBB