Morning all, I have a HP Envy dual boot system (Win8 for serious stuff, i.e. Train Sim and Flight Sim) and Centos 7 for everything else. In the past I've had the occasional problem where an update on the windows side has updated the UEFI boot sequence but using efibootmgr has always fixed it. On Friday I discovered that my HDD was failing so I tried using Clonezilla to move it on to a new SSD of the same size. Unfortunately the clone didn't work, failing half way through my main partition. Thankfully the Windows partitions and boot info cloned across so that side of the system worked. I then wiped all the Linux partitions and did a clean C7 install using the latest ISO, all went well, but when it reboot it went straight into Windows. Using F9 on reboot I chose CentOS Linux and the new system booted. Using efibootmgr I reset the boot sequence and all looked fine (see below). Unfortunately, when I then reboot it reverts to booting Windows. Using F9 to get back into Linux then shows that the boot sequence has reverted. This means that the updated sequence either was not stored properly, or something is resetting it. Legacy support in the BIOS is turned off as it should be, and the boot sequence in the BIOS only has a limited number of options. The sequence in the BIOS is: UEFI Boot Order USB Diskette on Key/USB Hard Drive OS boot Manager (shown in white) Internal CD/DVD ROM Drive USB CD/DVD ROM Drive ! Network Adapter Legacy Boot Order Notebook Hard Drive Internal CD/DVD ROM Drive USB Diskette on Key/USB Hard Drive USB CD/DVD ROM Drive ! Network Adapter If I press <F9> I get the same options as in efibootmgr but the first option "Windows Boot Manager" is selected. [root at gary ~]# efibootmgr BootCurrent: 0004 Timeout: 0 seconds BootOrder: 0002,3002,0000,0003,0004,0005,2001,2002,2003 Boot0000* Linux Boot0002* Windows Boot Manager Boot0003* Fedora Boot0004* CentOS Linux Boot0005* CentOS Boot2001* USB Drive (UEFI) Boot2002* Internal CD/DVD ROM Drive (UEFI) Boot3000* Internal Hard Disk or Solid State Disk Boot3002* Internal Hard Disk or Solid State Disk Boot3004* Internal Hard Disk or Solid State Disk [root at gary ~]# efibootmgr -o 0004,2001,2002,3000 BootCurrent: 0004 Timeout: 0 seconds BootOrder: 0004,2001,2002,3000 Boot0000* Linux Boot0002* Windows Boot Manager Boot0003* Fedora Boot0004* CentOS Linux Boot0005* CentOS Boot2001* USB Drive (UEFI) Boot2002* Internal CD/DVD ROM Drive (UEFI) Boot3000* Internal Hard Disk or Solid State Disk Boot3002* Internal Hard Disk or Solid State Disk Boot3004* Internal Hard Disk or Solid State Disk [root at gary ~]# efibootmgr BootCurrent: 0004 Timeout: 0 seconds BootOrder: 0004,2001,2002,3000 Boot0000* Linux Boot0002* Windows Boot Manager Boot0003* Fedora Boot0004* CentOS Linux Boot0005* CentOS Boot2001* USB Drive (UEFI) Boot2002* Internal CD/DVD ROM Drive (UEFI) Boot3000* Internal Hard Disk or Solid State Disk Boot3002* Internal Hard Disk or Solid State Disk Boot3004* Internal Hard Disk or Solid State Disk [root at gary ~]#
Günther J. Niederwimmer
2019-May-28 12:30 UTC
[CentOS] UEFI boot manager sequence problems HP Envy
Hello, change the bootorder> BootOrder: 0002,3002,0000,0003,0004,0005,2001,2002,2003your first boot is windows Am Dienstag, 28. Mai 2019, 13:29:39 CEST schrieb Gary Stainburn:> Morning all, > > I have a HP Envy dual boot system (Win8 for serious stuff, i.e. Train Sim > and Flight Sim) and Centos 7 for everything else. > > In the past I've had the occasional problem where an update on the windows > side has updated the UEFI boot sequence but using efibootmgr has always > fixed it. > > On Friday I discovered that my HDD was failing so I tried using Clonezilla > to move it on to a new SSD of the same size. Unfortunately the clone > didn't work, failing half way through my main partition. Thankfully the > Windows partitions and boot info cloned across so that side of the system > worked. > > I then wiped all the Linux partitions and did a clean C7 install using the > latest ISO, all went well, but when it reboot it went straight into > Windows. Using F9 on reboot I chose CentOS Linux and the new system > booted. Using efibootmgr I reset the boot sequence and all looked fine > (see below). > > Unfortunately, when I then reboot it reverts to booting Windows. Using F9 to > get back into Linux then shows that the boot sequence has reverted. This > means that the updated sequence either was not stored properly, or > something is resetting it. > > Legacy support in the BIOS is turned off as it should be, and the boot > sequence in the BIOS only has a limited number of options. The sequence in > the BIOS is: > > UEFI Boot Order > USB Diskette on Key/USB Hard Drive > OS boot Manager (shown in white) > Internal CD/DVD ROM Drive > USB CD/DVD ROM Drive > ! Network Adapter > > Legacy Boot Order > Notebook Hard Drive > Internal CD/DVD ROM Drive > USB Diskette on Key/USB Hard Drive > USB CD/DVD ROM Drive > ! Network Adapter > > If I press <F9> I get the same options as in efibootmgr but the first option > "Windows Boot Manager" is selected. > > > > [root at gary ~]# efibootmgr > BootCurrent: 0004 > Timeout: 0 seconds > BootOrder: 0002,3002,0000,0003,0004,0005,2001,2002,2003 > Boot0000* Linux > Boot0002* Windows Boot Manager > Boot0003* Fedora > Boot0004* CentOS Linux > Boot0005* CentOS > Boot2001* USB Drive (UEFI) > Boot2002* Internal CD/DVD ROM Drive (UEFI) > Boot3000* Internal Hard Disk or Solid State Disk > Boot3002* Internal Hard Disk or Solid State Disk > Boot3004* Internal Hard Disk or Solid State Disk > [root at gary ~]# efibootmgr -o 0004,2001,2002,3000 > BootCurrent: 0004 > Timeout: 0 seconds > BootOrder: 0004,2001,2002,3000 > Boot0000* Linux > Boot0002* Windows Boot Manager > Boot0003* Fedora > Boot0004* CentOS Linux > Boot0005* CentOS > Boot2001* USB Drive (UEFI) > Boot2002* Internal CD/DVD ROM Drive (UEFI) > Boot3000* Internal Hard Disk or Solid State Disk > Boot3002* Internal Hard Disk or Solid State Disk > Boot3004* Internal Hard Disk or Solid State Disk > [root at gary ~]# efibootmgr > BootCurrent: 0004 > Timeout: 0 seconds > BootOrder: 0004,2001,2002,3000 > Boot0000* Linux > Boot0002* Windows Boot Manager > Boot0003* Fedora > Boot0004* CentOS Linux > Boot0005* CentOS > Boot2001* USB Drive (UEFI) > Boot2002* Internal CD/DVD ROM Drive (UEFI) > Boot3000* Internal Hard Disk or Solid State Disk > Boot3002* Internal Hard Disk or Solid State Disk > Boot3004* Internal Hard Disk or Solid State Disk > [root at gary ~]# > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos-- mit freundliche Gr??en / best regards, G?nther J. Niederwimmer
On Tuesday 28 May 2019 13:30:44 G?nther J. Niederwimmer wrote:> Hello, > > change the bootorder > > BootOrder: 0002,3002,0000,0003,0004,0005,2001,2002,2003 > your first boot is windows >I know, that's my problem. If you look further down the OP I successfully change the boot sequence, but it doesn't stay that way
Jonathan Billings
2019-May-28 18:52 UTC
[CentOS] UEFI boot manager sequence problems HP Envy
On Tue, May 28, 2019 at 12:29:39PM +0100, Gary Stainburn wrote:> I then wiped all the Linux partitions and did a clean C7 install > using the latest ISO, all went well, but when it reboot it went > straight into Windows. Using F9 on reboot I chose CentOS Linux and > the new system booted. Using efibootmgr I reset the boot sequence > and all looked fine (see below). > > Unfortunately, when I then reboot it reverts to booting > Windows. Using F9 to get back into Linux then shows that the boot > sequence has reverted. This means that the updated sequence either > was not stored properly, or something is resetting it.I suggest running 'blkid' and 'efibootmgr -v', and double-check that the UUID for the CentOS boot entry matches the UUID of the EFI disk. You can delete and recreate the boot entry with 'efibootmgr', which will likely solve the problem. It depends on the UEFI implementation, but when all the boot entries are wrong (UUID changed due to new disk) sometimes it has a fallback to find the Windows bootloader and choose it. -- Jonathan Billings <billings at negate.org>
On Tuesday 28 May 2019 19:52:02 Jonathan Billings wrote:> I suggest running 'blkid' and 'efibootmgr -v', and double-check that > the UUID for the CentOS boot entry matches the UUID of the EFI disk. > > You can delete and recreate the boot entry with 'efibootmgr', which > will likely solve the problem. > > It depends on the UEFI implementation, but when all the boot entries > are wrong (UUID changed due to new disk) sometimes it has a fallback > to find the Windows bootloader and choose it. >Thanks Jonathan. You're probably right about this as whever I try to do makes has effect. I've been looking in to efibootmgr to see what I need to do to get it working but so far with no luck. When I run it with -v I don't see any UUID details, nor can i see how I specify them. One thing I have noticed is that in the blkid output below everything refers to HD(2,...... Is that correct? Below is one of many attempts to set the values correctly. [root at gary ~]# efibootmgr -v BootCurrent: 0004 Timeout: 0 seconds BootOrder: 0002,3002,0000,0003,0004,0005,2001,2002,2003 Boot0000* Linux HD(2,GPT,14c4ac1d-abd8-4121-84ee-c05a825920de,0x145800,0x64000)/File(\EFI\centos\shim.efi) Boot0002* Windows Boot Manager HD(2,GPT,14c4ac1d-abd8-4121-84ee-c05a825920de,0x145800,0x64000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........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.}.................... Boot0003* Fedora HD(2,GPT,14c4ac1d-abd8-4121-84ee-c05a825920de,0x145800,0x64000)/File(\EFI\fedora\shim.efi) Boot0004* CentOS Linux HD(2,GPT,14c4ac1d-abd8-4121-84ee-c05a825920de,0x145800,0x64000)/File(\EFI\centos\shim.efi) Boot0005* CentOS HD(2,GPT,14c4ac1d-abd8-4121-84ee-c05a825920de,0x145800,0x64000)/File(\EFI\centos\shimx64.efi) Boot2001* USB Drive (UEFI) RC Boot2002* Internal CD/DVD ROM Drive (UEFI) RC Boot3000* Internal Hard Disk or Solid State Disk RC Boot3002* Internal Hard Disk or Solid State Disk RC [root at gary ~]# efibootmgr -o 4,2001,2002,2 BootCurrent: 0004 Timeout: 0 seconds BootOrder: 0004,2001,2002,0002 Boot0000* Linux Boot0002* Windows Boot Manager Boot0003* Fedora Boot0004* CentOS Linux Boot0005* CentOS Boot2001* USB Drive (UEFI) Boot2002* Internal CD/DVD ROM Drive (UEFI) Boot3000* Internal Hard Disk or Solid State Disk Boot3002* Internal Hard Disk or Solid State Disk [root at gary ~]# efibootmgr -v BootCurrent: 0004 Timeout: 0 seconds BootOrder: 0004,2001,2002,0002 Boot0000* Linux HD(2,GPT,14c4ac1d-abd8-4121-84ee-c05a825920de,0x145800,0x64000)/File(\EFI\centos\shim.efi) Boot0002* Windows Boot Manager HD(2,GPT,14c4ac1d-abd8-4121-84ee-c05a825920de,0x145800,0x64000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........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.}.................... Boot0003* Fedora HD(2,GPT,14c4ac1d-abd8-4121-84ee-c05a825920de,0x145800,0x64000)/File(\EFI\fedora\shim.efi) Boot0004* CentOS Linux HD(2,GPT,14c4ac1d-abd8-4121-84ee-c05a825920de,0x145800,0x64000)/File(\EFI\centos\shim.efi) Boot0005* CentOS HD(2,GPT,14c4ac1d-abd8-4121-84ee-c05a825920de,0x145800,0x64000)/File(\EFI\centos\shimx64.efi) Boot2001* USB Drive (UEFI) RC Boot2002* Internal CD/DVD ROM Drive (UEFI) RC Boot3000* Internal Hard Disk or Solid State Disk RC Boot3002* Internal Hard Disk or Solid State Disk RC [root at gary ~]# blkid /dev/mapper/centos-root: UUID="08c18076-37b4-4f65-b550-e2633ac24d5d" TYPE="xfs" /dev/sda6: UUID="ifEKlz-O4SM-NevI-X4TQ-lQg2-0lAN-Jb7cZQ" TYPE="LVM2_member" PARTUUID="97e93e7c-a6cf-4532-8f7d-5c0e50987350" /dev/sda1: LABEL="WINRE" UUID="8262E42362E41DA3" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="277e20d2-ee46-412b-babb-9b2249324ca4" /dev/sda2: SEC_TYPE="msdos" UUID="1437-B8F4" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="14c4ac1d-abd8-4121-84ee-c05a825920de" /dev/sda3: LABEL="Windows" UUID="1098EFF798EFD96C" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="f7cefd8f-73e7-4956-bb96-0c03ea21bff9" /dev/sda4: UUID="12DC737EDC735B45" TYPE="ntfs" PARTUUID="95f8994c-a8ad-48f5-9fbb-eda67c56f6e3" /dev/sda5: UUID="de45b7f8-d072-4f7e-b9be-a62428db3fbb" TYPE="xfs" PARTUUID="8c00cc67-1063-4889-bdce-6f6259ba1491" /dev/sda8: LABEL="RECOVERY" UUID="74CCE22FCCE1EAF6" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="7c95ff6d-d945-4479-9100-f66aa81a403e" /dev/mapper/centos-swap: UUID="30ca7d38-a0df-4473-a1d0-dc7a1fd41458" TYPE="swap" /dev/mapper/centos-home: UUID="abcedda1-b69b-441e-bced-23a66b2b85f6" TYPE="xfs" [root at gary ~]# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/centos-root 52403200 7424692 44978508 15% / devtmpfs 6016292 0 6016292 0% /dev tmpfs 6034084 0 6034084 0% /dev/shm tmpfs 6034084 9820 6024264 1% /run tmpfs 6034084 0 6034084 0% /sys/fs/cgroup /dev/sda5 1038336 229176 809160 23% /boot /dev/sda2 204576 85252 119324 42% /boot/efi /dev/mapper/centos-home 688017172 428947768 259069404 63% /home tmpfs 1206820 8 1206812 1% /run/user/42 tmpfs 1206820 0 1206820 0% /run/user/0 [root at gary ~]#