You are not logged in.

#26 2013-08-29 21:14:12

DoctorSelar
Member
Registered: 2013-08-27
Posts: 47

Re: Setting GRUB as the default boot manager on a UEFI-based system

Scratch that last post. When I restarted into Windows, everything went fine. When I restarted to get into Arch, the arch_grub entry was missing again. No discernible reason, except that Windows doesn't like to play nice.


Never assume. It makes an "ass" of "u" and "me".

Offline

#27 2013-08-29 21:18:53

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Setting GRUB as the default boot manager on a UEFI-based system

Please post the commands you used to install and configure grub and the output of efibootmgr -v.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#28 2013-08-29 21:24:48

DoctorSelar
Member
Registered: 2013-08-27
Posts: 47

Re: Setting GRUB as the default boot manager on a UEFI-based system

Okay, so to install grub I used:

***note: EFI partition is /dev/sda2***

mount /dev/sda2 /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi --boot-directory=/boot/efi/EFI --bootloader_id=arch_grub --recheck
grub-mkconfig -o /boot/efi/EFI

And an update: I ran these exact commands from a live USB to try and fix GRUB. Normal output, except when I restarted, there was no arch_grub option, there was only an arch option. When selected, this option brings me straight to a GRUB minimal bash.


Never assume. It makes an "ass" of "u" and "me".

Offline

#29 2013-08-29 21:32:53

DoctorSelar
Member
Registered: 2013-08-27
Posts: 47

Re: Setting GRUB as the default boot manager on a UEFI-based system

efibootmgr -v puts out:

BootCurrent: 0000
TimeOut: 0 seconds
BootOrder: 2001,3001,3002,2002,2003
Boot0000* USB Hard Drive (UEFI) ***this is the live USB***
Boot0001* Windows Boot Manager HD(***a huge string of letters and numbers***)
Boot0002* arch HD(**long string of numbers and letters***)
Boot2001* USB Drive (UEFI)            RC ***not live USB***  
Boot2002* Internal CD Drive (UEFI)   RC
Boot3001* EFI HDD or SSD             RC
Boot3002* EFI HDD or SSD             RC

I've also tried to delete all of the folders created by GRUB:

rm -rf /boot/efi/EFI/grub

rm -rf /boot/efi/EFI/arch

rm -rf /boot/efi/EFI/arch_grub

The last one gave two invalid cluster chain errors and one read-only filesystem error

Last edited by DoctorSelar (2013-08-29 21:43:18)


Never assume. It makes an "ass" of "u" and "me".

Offline

#30 2013-08-29 21:40:42

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Setting GRUB as the default boot manager on a UEFI-based system

Please edit your posts to use code tags. If you don't know how to do this, you can hit the 'BBCode' link on the bottom of the thread for instructions.

Offline

#31 2013-08-29 21:45:09

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Setting GRUB as the default boot manager on a UEFI-based system

DoctorSelar wrote:

mount /dev/sda2 /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi --boot-directory=/boot/efi/EFI --bootloader_id=arch_grub --recheck
grub-mkconfig -o /boot/efi/EFI

If these are the commands you used, then you need to reread the wiki's instructions on installing and configuring grub because this is definitely not going to work.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#32 2013-08-29 21:47:51

DoctorSelar
Member
Registered: 2013-08-27
Posts: 47

Re: Setting GRUB as the default boot manager on a UEFI-based system

https://wiki.archlinux.org/index.php/GR … _systems_2
These are the commands I followed. In the recent attempts, I have skipped the multi-boot with Windows part because it does not help. I used the option

--boot-directory=/boot/efi/EFI

in my most recent attempt to see if it would change anything.

Last edited by DoctorSelar (2013-08-29 21:49:58)


Never assume. It makes an "ass" of "u" and "me".

Offline

#33 2013-08-30 01:59:33

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: Setting GRUB as the default boot manager on a UEFI-based system

DoctorSelar wrote:

Okay, so I was trying to install Arch on another computer and noticed that there was an EFI Shell v1 & 2 option on the Arch install disk. I ran that on the computer that is having trouble. Once I could enter commands, I did bcfg boot -v dump. It came up with
Boot2001 - USB Drive (UEFI)
Boot3001 - EFI Internal HD or SSD
Boot3002 - EFI Internal HD or SSD
Boot2002 - Internal CD/DVD ROM Drive
Error. Unable to read from 'Boot2003' (Not Found).
I used bcfg boot mv 2 1 to swap Boot3002 with Boot3001.

Using "bcfg boot mv 2 1" does not swap the Boot3002 and Boot3001 entries; it swaps the Boot0002 and Boot0001 entries (note 2 and 1, not 3002 and 3001). Furthermore, to move an entry to the top of the list, you must move it to position 0.

DoctorSelar wrote:

efibootmgr -v puts out:

BootCurrent: 0000
TimeOut: 0 seconds
BootOrder: 2001,3001,3002,2002,2003
Boot0000* USB Hard Drive (UEFI) ***this is the live USB***
Boot0001* Windows Boot Manager HD(***a huge string of letters and numbers***)
Boot0002* arch HD(**long string of numbers and letters***)
Boot2001* USB Drive (UEFI)            RC ***not live USB***  
Boot2002* Internal CD Drive (UEFI)   RC
Boot3001* EFI HDD or SSD             RC
Boot3002* EFI HDD or SSD             RC

Given these entries, try, in Linux and as root:

efibootmgr -o 2,1

...or in the EFI shell:

bcfg boot mv 2 0

...or in Windows, using an Administrator Command Prompt window:

bcdedit /set {bootmgr} path \EFI\grub\grubx64.efi

I'm not positive of that path, though; you'll need to locate your actual GRUB program file (probably grubx64.efi). It looks like you might have installed it in the "EFI" directory rather than in the "EFI\grub" or "EFI\arch" directory, but I'm not positive of that. (I'm a bit rusty with grub-install, since I haven't used it in a while, since I'm not very fond of GRUB 2, especially on EFI.)

The Windows approach may be the most reliable of these, since it seems to overcome problems with Windows and/or some EFI implementation, which tend to ignore non-Windows entries and/or restore the Windows boot loader to the top of the list.

Offline

#34 2013-08-30 02:45:08

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Setting GRUB as the default boot manager on a UEFI-based system

DoctorSelar wrote:

https://wiki.archlinux.org/index.php/GR … _systems_2
These are the commands I followed. In the recent attempts, I have skipped the multi-boot with Windows part because it does not help. I used the option

--boot-directory=/boot/efi/EFI

in my most recent attempt to see if it would change anything.

Look at the command you are using to generate the grub configuration again and compare it to what the wiki has. You are specifying a directory - not a file.

EDIT: Also, everything and anything srs5694 says.

Last edited by cfr (2013-08-30 02:45:51)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#35 2013-08-30 09:05:51

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: Setting GRUB as the default boot manager on a UEFI-based system

Try to install Shell64.efi, reading this wiki chapter. Later you may change the boot order with

To move the boot option #3 to #0 (i.e. 1st or the default entry in the UEFI Boot menu)

Shell> bcfg boot mv 3 0


do it good first, it will be faster than do it twice the saint wink

Offline

#36 2013-09-03 01:07:05

DoctorSelar
Member
Registered: 2013-08-27
Posts: 47

Re: Setting GRUB as the default boot manager on a UEFI-based system

bcfg didn't work for me the first time, and prevented any further installs that used the --bootloader-id=arch_grub from working, so I don't want to try that. Is there a way to remove an entry from NV-RAM? GRUB has the option to boot Windows, so I'm indifferent if that entry is removed from NV-RAM.


Never assume. It makes an "ass" of "u" and "me".

Offline

#37 2013-09-03 19:31:29

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Setting GRUB as the default boot manager on a UEFI-based system

DoctorSelar wrote:

bcfg didn't work for me the first time, and prevented any further installs that used the --bootloader-id=arch_grub from working, so I don't want to try that. Is there a way to remove an entry from NV-RAM? GRUB has the option to boot Windows, so I'm indifferent if that entry is removed from NV-RAM.

You can remove an entry with the same tools you can use to add an entry.

But did you read any of the previous comments pointing out errors in the commands you were using?

How could it prevent "further installs that used the --bootloader-id=arch_grub from working"? Installs of what? What happened? What happened the second time? Can you boot now?

I have no idea from your post where you are or what you are trying to achieve. Which entry do you want to remove? Presumably not the Windows entry since you are "indifferent" to it?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#38 2013-09-04 20:24:41

DoctorSelar
Member
Registered: 2013-08-27
Posts: 47

Re: Setting GRUB as the default boot manager on a UEFI-based system

I changed my commands to exactly what the Beginner's Guide said. I also completely wiped all of the partitions and recreated them. I reinstalled Windows and Arch. During grub install, I set  --bootloader-id=arch_grub but it did not create an arch_grub folder, only an arch one. Everything is still working as at the start of the thread though. I can access both Windows and GRUB, but need to go through F9 to get to GRUB. I want to get rid of the Windows entry because GRUB can boot Windows just fine. Is that a good idea? Last time I played with bcfg, GRUB could no longer create an install with --bootloader-id=arch_grub.


Never assume. It makes an "ass" of "u" and "me".

Offline

#39 2013-09-04 22:49:43

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Setting GRUB as the default boot manager on a UEFI-based system

If you want help/advice, you really need to start posting the information relevant to your situation. The Beginners' Guide includes all kinds of commands. Which did you use? They are supposed to be adapted to your setup: how did you adapt them? What output did you get? Where and how did you pass the --bootloader-id option? You just haven't really provided any information.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#40 2013-09-05 00:03:10

hl037
Member
Registered: 2013-09-04
Posts: 14

Re: Setting GRUB as the default boot manager on a UEFI-based system

I've exactely the same problem : seems to be the hp firmare wich is cabled to boot on EFI/Microsoft/boot/bootmgfw :
It's impossible to change boot's information... The only solution I've found is to move windows bootloader, then to put grub (or other) to :/EFI/Boot/bootx64.efi
...And manual add windows entry to grub configuration

Offline

#41 2013-09-05 01:46:14

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Setting GRUB as the default boot manager on a UEFI-based system

It sounds like what you mean by "get rid of Windows entirely" means that you simply want to remove the NVRAM/firmware entry.  If that is the case, then I see no reason why you would have to keep that around.

As far as the rest of it, I'm with cfr.  If you want a relevant answer, you need to post relevant information.  You give a while bunch of generalizations, but no real specifics.

Offline

#42 2013-09-05 08:33:56

aaditya
Member
Registered: 2013-09-01
Posts: 174

Re: Setting GRUB as the default boot manager on a UEFI-based system

Hi!

I am also using a HP Laptop, with same UEFI problems, and I have found a soluion for it.
This is a problem with HP Systems I think, they only boot the bootx64.efi or Windows Boot Loader(bootmgfw.efi).

The solution is to use the rEFInd boot manager http://www.rodsbooks.com/refind/index.html, with the trick that you have to replace your bootx64.efi with refind.

Note- Secure Boot is turned off.

You could donwload and install Refind from http://www.rodsbooks.com/refind/index.html using the install.sh script.

Now this is *important-*

After installing refind, go inside the refind folder, and copy the files and folders (2 files, 2 folders)  to-

/boot/efi/EFI/Boot/

*Note-*

My ESP (EFI System Partition) is mounted at /boot/efi.

You need to copy these files to the Boot folder on your EFI partition, and the Boot folder itself will be present inside the EFI folder on the EFI Partition, so take note of it.

Now inside this boot folder, there will already be a file present-
bootx64.efi

You need to **rename** it to  windows.bootx64.efi
Then you should rename refind_x64.efi to bootx64.efi
And you are done!

The bootx64.efi file boot by default, hence rEFInd would now boot by default, and would detect your grubx64.efi(arch linux) and efibootmgfw.efi (windows) automatically.

smile

Last edited by aaditya (2013-09-05 08:36:47)

Offline

#43 2013-09-05 21:59:36

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Setting GRUB as the default boot manager on a UEFI-based system

Better really to install the package for rEFInd which includes the install script now.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#44 2013-09-10 22:51:20

DoctorSelar
Member
Registered: 2013-08-27
Posts: 47

Re: Setting GRUB as the default boot manager on a UEFI-based system

Sorry for the slow reply. I'll be sure to try out rEFInd. Do I need to install os-prober as well?


Never assume. It makes an "ass" of "u" and "me".

Offline

#45 2013-09-11 00:11:41

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: Setting GRUB as the default boot manager on a UEFI-based system

DoctorSelar wrote:

Sorry for the slow reply. I'll be sure to try out rEFInd. Do I need to install os-prober as well?

rEFInd does not rely on os-prober, if that's what you're asking; os-prober is a GRUB-specific tool.

Offline

#46 2013-09-11 01:21:15

DoctorSelar
Member
Registered: 2013-08-27
Posts: 47

Re: Setting GRUB as the default boot manager on a UEFI-based system

Should I leave the /boot/efi/EFI/refind folder even though all of the files are in /boot/efi/EFI/Boot?

EDIT: Dammit, still didn't work. Booted straight into Windows, no rEFInd. I can get to rEFInd through the Boot from EFI file in the F9 menu. When I select Arch Linux, it gets stuck.

rEFInd - Booting OS
Starting vmlinuz-linux
Using load options 'ro root=UUID=<UUID goes here> initrd=boot\initramfs-linux.img'

FURTHER INFO: I did exactly as aaditya said, although I was unable to find the install.sh script. I don't believe it ran when I installed the refind-efi package and I was unable to find it on the wiki. If anyone knows the procedure that Ubuntu and its forks use to install GRUB, that would be great. I previously had Ubuntu dual-booting with Windows 8 with the same settings as now and GRUB would boot automatically. No issues at all.

Last edited by DoctorSelar (2013-09-11 01:35:54)


Never assume. It makes an "ass" of "u" and "me".

Offline

#47 2013-09-11 02:37:36

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Setting GRUB as the default boot manager on a UEFI-based system

/usr/bin/refind-install?

Did you edit refind_linux.conf?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#48 2013-09-11 18:16:34

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: Setting GRUB as the default boot manager on a UEFI-based system

DoctorSelar wrote:

Should I leave the /boot/efi/EFI/refind folder even though all of the files are in /boot/efi/EFI/Boot?

rEFInd looks for its configuration file, icons, and so on within its own directory, no matter what it's called. Thus, if rEFInd is installed in EFI/BOOT on the ESP, that's where it looks for its support files, and you can delete EFI/refind.

EDIT: Dammit, still didn't work. Booted straight into Windows, no rEFInd. I can get to rEFInd through the Boot from EFI file in the F9 menu.

You may have a broken EFI that won't boot anything but the Windows boot loader. If so, you may need to futz with filenames to get your chosen boot loader to boot. See this section of the rEFInd documentation for details. (Note that the Arch rEFInd package renames its support scripts, including mvrefind.sh.)

It's also possible that you've erred in using bcfg and/or efibootmgr. Posting the latest output of the following two commands may be useful:

efibootmgr -v
ls -l `find /boot -iname "*.efi"`

When I select Arch Linux, it gets stuck.

rEFInd - Booting OS
Starting vmlinuz-linux
Using load options 'ro root=UUID=<UUID goes here> initrd=boot\initramfs-linux.img'

This symptom may indicate the bug covered in this thread and in this bug report. A workaround that works for many (but not all) people is to switch from a rEFInd built with Tianocore (as in the version in the Arch repository or from my official binary build) to one built with GNU-EFI (I have an alternate package here; search on "variant package" for the download link). Just replace the refind_x64.efi binary on the ESP with the new one. Switching to another boot loader (that is, not the EFI stub loader), such as ELILO, SYSLINUX, or GRUB, can also solve the problem.

Offline

#49 2013-09-12 15:59:45

aaditya
Member
Registered: 2013-09-01
Posts: 174

Re: Setting GRUB as the default boot manager on a UEFI-based system

DoctorSelar wrote:

Should I leave the /boot/efi/EFI/refind folder even though all of the files are in /boot/efi/EFI/Boot?

EDIT: Dammit, still didn't work. Booted straight into Windows, no rEFInd. I can get to rEFInd through the Boot from EFI file in the F9 menu. When I select Arch Linux, it gets stuck.

rEFInd - Booting OS
Starting vmlinuz-linux
Using load options 'ro root=UUID=<UUID goes here> initrd=boot\initramfs-linux.img'

FURTHER INFO: I did exactly as aaditya said, although I was unable to find the install.sh script. I don't believe it ran when I installed the refind-efi package and I was unable to find it on the wiki. If anyone knows the procedure that Ubuntu and its forks use to install GRUB, that would be great. I previously had Ubuntu dual-booting with Windows 8 with the same settings as now and GRUB would boot automatically. No issues at all.

If you can see rEFInd from your boot menu by pressing F9, then its installed I think.
If you want, you can use Ubuntu's Boot Repair https://help.ubuntu.com/community/Boot-Repair

Edit-
As pointed out by WonderWoofy, bootrepair can be troublesome with EFI. Use at your own discretion!

Last edited by aaditya (2013-09-12 16:32:47)

Offline

#50 2013-09-12 16:02:37

aaditya
Member
Registered: 2013-09-01
Posts: 174

Re: Setting GRUB as the default boot manager on a UEFI-based system

I wonder if the OP also renamed efibootmgfw.efi , how would rEFInd find Windows wink

Offline

Board footer

Powered by FluxBB