I purchased an HP Envy laptop with Win 8.1 installed on hard drive, replaced hard drive with SSD and cloned existing Win 8.1 install to that, then installed openSUSE 13.1, shrinking main Win partition to make space. That part all looks good, but the normal boot sequence just takes me direct into the Win 8.1 hairball. To get the openSUSE boot options I have to interrupt the boot sequence (ESC key) then select Boot Device Options from startup menu (F9) and select “opensuse” on that (second entry, below “OS boot Manager”. When I select “opensuse” I get the expected boot choices menu (“openSUSE 13.1”, “Advanced options for openSUSE 13.1”, and “Windows Boot Manager”). I’d like to have the “opensuse” menu choices come up by default.
I’ve tried using both Legacy Support and Secure Boot BIOS settings. The “openSUSE” boot only works in Legacy (non-UEFI) mode. By setting the Secure Boot option in the openSUSE boot loader configuration I get a “openSUSE secure” boot choice added, and that works in Secure Boot.
When I did the installation I used manual partitioning in order to set things up the way I wanted (spare partition for / to allow for trying new versions of openSUSE, separate /home, one other open and one other encrypted partition). I did select the existing Windows EFI boot partition to mount at /boot/efi.
Any suggestions on how I can get openSUSE as the default boot? I’m fine with doing another installation, if that’s the easiest way to correct it (currently on my third attempt).
GPT fdisk (gdisk) version 0.8.7
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 488397168 sectors, 232.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 5576D46A-2C24-11E4-8265-A01D48FCFAAB
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 488397134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3695 sectors (1.8 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 821247 400.0 MiB 2700 Basic data partition
2 821248 1353727 260.0 MiB EF00 EFI system partition
3 1353728 1615871 128.0 MiB 0C01 Microsoft reserved part
4 1615872 106472125 50.0 GiB 0700 Basic data partition
5 106473472 127426559 10.0 GiB 0700 primary
6 127426560 148391935 10.0 GiB 0700 primary
7 148391936 169357311 10.0 GiB 0700 primary
8 169357312 236460031 32.0 GiB 0700 primary
9 236460032 488396799 120.1 GiB 0700 primary
efibootmgr -v:
BootCurrent: 0005
Timeout: 0 seconds
BootOrder: 0004,3004,0002,0005,2001,2002,2003
Boot0000* Internal EFI Shell MM(b,a9b08010,aa30800f)RC....
Boot0001* Internal EFI Shell MM(b,a9b08010,aa30800f)RC....
Boot0002* opensuse HD(2,c8800,82000,5576d46c-2c24-11e4-8265-a01d48fcfaab)File(\EFI\opensuse\grubx64.efi)
Boot0003* Internal EFI Shell MM(b,a9b08010,aa30800f)RC....
Boot0004* Windows Boot Manager HD(2,c8800,82000,5576d46c-2c24-11e4-8265-a01d48fcfaab)File(\EFI\Microsoft\Boot\bootmgfw.efiNDOWS.........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.}...w.............
Boot0005* opensuse-secureboot HD(2,c8800,82000,5576d46c-2c24-11e4-8265-a01d48fcfaab)File(\EFI\opensuse\shim.efi)
Boot2001* USB Drive (UEFI) RC
Boot2002* Internal CD/DVD ROM Drive (UEFI) RC
Boot3000* Internal Hard Disk or Solid State Disk RC
Boot3001* Internal Hard Disk or Solid State Disk RC
Boot3002* Internal Hard Disk or Solid State Disk RC
Boot3004* Internal Hard Disk or Solid State Disk RC
I had the same problem last month when I bought a HP Envy desktop - it drove me mad!
The way I solved it was to switch off secure boot in the uefi settings and enable legacy boot (this doesn’t mean that you are switching off uefi and using the old-fashioned bios - but simply allows you to boot from a DVD). Install opensuse and select the secure-boot ‘yes’ option (even though you will have switched off secure-boot in the uefi settings). Then when you start the laptop it should give you the opensuse boot menu which includes a option to start windows if required. When you use windows it should not then re-set itself as the first boot option.
I don’t think your problems are related to the partitioning. They seem to be due to the way that HP has implemented UEFI.
I have no personal experience with UEFI on HP systems, but some reports indicate problems. There should be a key you can hit during boot, to get access to the UEFI boot menu. On my systems, that’s F12, but might be some other key with HP computers.
Some EFI BIOS want to only boot Windows even when you change the default boot to Linux it will change it back. Very annoying. There is a trick where you change the windows boot code to the Linux boot code in efi. You copy the openSUSE code and rename appropriately. Note should back up the Windows files first of course. You can then choose which OS to boot from the grub menu.
I’ve tried all the available combinations of legacy boot on/off secure-boot on/off in the BIOS, but all of them are booting straight to Windows. openSUSE installation has secure-boot ‘yes’, and I’m able to boot openSUSE when I go to the boot selection menu on startup, just haven’t been able to make it come up directly.
Got the message ‘boot entry 2003 does not exist’. Tried it again without the 2003 entry and that was accepted, but still boots to Windows.
Every time a system boots to Windows a penguin loses the power of flight.
The most frustrating part of this is that I’d just like to have Windows around for occasional use with games or for a client requirement. Hmmm… time to get creative.
After experimenting with the files on /boot/efi/EFI I found that replacing both ./Boot/bootx64.efi and ./Microsoft/Boot/bootmgfw.efi with ./opensuse/shim.efi somewhat works. I get some fast EFI error messages, then the openSUSE boot menu. The only downside is that I can’t use the openSUSE boot menu to go to Windows (just comes back to the openSUSE boot menu), but I can always restore one of the original efi files manually when I want to boot to Windows.
I did try copying the entire Microsoft directory to an MS directory, thinking that might get the openSUSE boot to give me another option, but no luck on that. I may come back to it later and see if I can fudge things to work.
Would still appreciate any ideas people have for a better approach.
Leave the file “bootmgfw.efi” in the Microsoft directory, but rename it to a different name. Then change the Microsoft entry in the grub configuration, to use that different name.
I would test that with direct editing of “/boot/grub2/grub.cfg”. But, once you have that working, add a copy of the working entry to “/etc/grub.d/40_custom”, so that you will still have it when “grub.cfg” is regenerated.
There’s still the likelihood that some day, Microsoft will put its own files back. And then you’ll need to redo the changes.
The upgrade from Windows 8 to Windows 8.1 recreated the boot setup, losing changes that I had made with BCDEDIT.
Applying “update 1” to Windows 8.1 failed until I removed the changes that I had made with BCDEDIT, though I could add the changes back afterwards.
My experience is that a linux user, with Windows on the same machine, should assume that Microsoft code will sometimes make changes that cause problems for booting linux.
In addition to copying “shim.efi”, you will probably need to copy “grub.efi” and “grub.cfg”. That’s because “shim.efi” is going to expect those to be in the same directory.
Yes, copying shim.efi over /Microsoft/Boot/bootmgfw.efi and adding the grub files to the directory works better, eliminating most of the error messages.
I don’t know whether any other directories need to be changed or not. I thought I also needed to replace the /Boot/bootx64.efi file, but everything seems to be working fine now with the original file in place there.