Ask Your Question
2

fedora in uefi, once again, changing boot order

asked 2013-07-03 04:17:08 -0500

rudrab gravatar image

updated 2013-07-03 05:23:40 -0500

FranciscoD_ gravatar image

Hi, people must be bored of seeing this topic by now. But I have a bit different problem. I have installed f19 in HP pavilion g6, working well. Only problem is each time I start, I have to press F9 to select between os-boot-manager(pre installed, either HP/MS, not sure, default), and fedora...then only grub2 screen comes.

apparantly there is no way of changing the order of os-boot-manager and fedora. Can I do something? I have secure-boot enabled.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2013-08-12 14:37:55 -0500

pjones gravatar image

There's not much we can do about the 'F9' behaviour - your system firmware is re-writing BootOrder when you do that, and they're doing it in a bad way.

That said, it's possible to map specific keys to specific Boot#### options, though right now we've got no software to do so. EFI supports Key#### variables to map specific keys to specific boot options; somebody must write support to write such variables efibootmgr.

edit flag offensive delete link more
0

answered 2013-07-07 02:36:02 -0500

updated 2013-07-07 02:40:27 -0500

Use efibootmgr to set your boot order.

Display boot configuration:

# efibootmgr 
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0001,0000,0006,0003,0004,0007
Boot0000* Fedora
Boot0001* Windows Boot Manager
Boot0003* CD/DVD Drive 
Boot0004* Hard Drive 
Boot0006* UEFI: TSSTcorp CDDVDW SH-S223C
Boot0007* Network Card

Change boot order:

# efibootmgr -o 0006,0003,0000,0001,0007                                                
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0006,0003,0000,0001,0007
Boot0000* Fedora
Boot0001* Windows Boot Manager
Boot0003* CD/DVD Drive
Boot0004* Hard Drive
Boot0006* UEFI: TSSTcorp CDDVDW SH-S223C
Boot0007* Network Card
edit flag offensive delete link more

Comments

randomuser, thanks for your help, but it does not look like the solution (I have tried that). The problem is, with F9, I select the "boot device" which is either os-boot-manager or fedora. Now, if I choose os-boot-manager, only windows is there; if I choose fedora, only fedora is there. So, I have two separate device to choose from. it does not look like what we used to have with traditional method, where grub[2] shows all the system available. from fedora, I run os-prober which do put windows entry in the grub2 menu, but booting MS from grub2 is giving error (I dont remember the exact err

rudrab gravatar imagerudrab ( 2013-07-08 02:52:18 -0500 )edit

So, you don't need to change the boot order, your problem is that Windows doesn't boot successfully when launched from GRUB? If so, please open a new question.

randomuser gravatar imagerandomuser ( 2013-07-08 07:45:50 -0500 )edit

no, my problem is "boot device" order. I want Fedora before os-boot-manager after pressing F9. I will try to make a video to make me clear.

rudrab gravatar imagerudrab ( 2013-07-08 11:43:08 -0500 )edit

So you want to change the order of boot selections in the motherboard's boot selection menu ? If you can do it anywhere, it would be in the motherboard's setup menus.

randomuser gravatar imagerandomuser ( 2013-07-11 01:46:53 -0500 )edit

do you have any idea how to reach there?

rudrab gravatar imagerudrab ( 2013-07-13 07:19:23 -0500 )edit
0

answered 2013-10-15 15:38:56 -0500

Charlweed gravatar image

updated 2013-10-15 15:40:45 -0500

randomuser SHOULD be right, but there is a bug in some intel motherboard EFI firmware where the board boots from /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi no matter what the data in NVRAM.

A workaround is to rename /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi, then re-run efibootmgr and reconfigure grub. Here is a script to run as root. Before you run it, check to see if your drive is /dev/sda, your partition is 1, and a new boot-entry for Windows should be 6. After you run it, edit /boot/efi/EFI/fedora/grub.cfg, and change the Windows chainloader entry from

chainloader /EFI/Microsoft/Boot/bootmgfw.efi

to

chainloader /EFI/1Microsoft/Boot/bootmgfw.efi

Beware Microsoft's boot recovery tool, it will "restore" the original directory, and break things again. Also, I don't see a way to edit anything in /etc/grub.d or /etc/defaults/grub to prevent this fix being overwritten if you reinstall grub, so be careful of that too.

#!/bin/bash
echo cd /boot/efi/EFI
cd /boot/efi/EFI
echo tar -zcvf /boot/efi/EFI/microsoft_efi_boot.tar.gz  /boot/efi/EFI/Microsoft
tar -zcvf microsoft_efi_boot.tar.gz   /boot/efi/EFI/Microsoft
echo mkdir -p /boot/efi/EFI/1Microsoft
mkdir -p /boot/efi/EFI/1Microsoft/Boot
echo mv /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi /boot/efi/EFI/1Microsoft/Boot/bootmgfw.efi
mv /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi /boot/efi/EFI/1Microsoft/Boot/bootmgfw.efi
echo efibootmgr --create --write-signature --label Win7 --disk /dev/sda --part 1 --loader '\EFI\1Microsoft\Boot\bootmgfw.efi' --bootnum 6
efibootmgr --create --write-signature --label Win7 --disk /dev/sda --part 1 --loader '\EFI\1Microsoft\Boot\bootmgfw.efi' --bootnum 6
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2013-07-03 04:17:08 -0500

Seen: 5,399 times

Last updated: Oct 15 '13