You are not logged in.
Hello,
I have recently migrated a 64 bit UEFI (non-secure) dual boot linux/windows laptop
from Ubuntu to Arch. I also swapped my boot manager from grub2 to refind.
All works well enough apart from the initial boot, which still recognises grub and
fails and I must manually exit from the grub2 command shell to allow refind to
continue the boot process. Please correct me if I am wrong, grub is booting from
the mbr and I'd like to replace or remove it.
My knowledge of booting is limited, is replacing the first 440b of my disk with:
dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sda
correct, or should if=/dev/zero for UEFI boot?? Anything further required?
I'm nervous around booting as the path back once broken can be arduous.
Thanks,
Dean
Last edited by 9bynine (2017-12-07 09:17:34)
Offline
Just adjust the default entry to boot into in your UEFI firmware? Disable BIOS booting? Far more straight forward and less risky options.
Offline
Thanks for replying V1del, I have Boot Mode set to UEFI (not legacy) in the BIOS and Secure Boot disabled there as well. There are no other options relating to BIOS booting in my (basic) BIOS settings. I'm not sure what you mean to 'adjust the default entry to boot into UEFI firmware'. I am only taking a best guess that the grub2 command shell is booting from the mbr as I haven't installed the grub2 package in Arch and ubuntu disk partitions were removed prior to installing Arch. I don't know why my system would be looking at the mbr with Boot mode selected as UEFI in the BIOS but there's a lot about the boot process I don't know.
Cheers,
Dean
Offline
Post the output of
$ efibootmgr -vLast edited by ashok (2017-12-05 15:10:55)
"People who are confident in themselves never talk about expectations. “Expectation” is a word rooted in giving up. It leaves you with no other choice. It makes it obvious that you’re powerless.” – Satoshi Fukube
Offline
~$ efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0005,0006,0000,0001,0009,0002,0003,0004
Boot0000* Windows Boot Manager HD(3,GPT,f9d07474-35de-45b1-a196-a54d38ffe161,0x363800,0x82000)/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.}...v................
Boot0001* ubuntu HD(3,GPT,f9d07474-35de-45b1-a196-a54d38ffe161,0x363800,0x82000)/File(\EFI\ubuntu\shimx64.efi)
Boot0002* rEFInd Boot Manager HD(3,GPT,f9d07474-35de-45b1-a196-a54d38ffe161,0x363800,0x82000)/File(\EFI\refind\refind_x64.efi)
Boot0003* Linux Boot Manager HD(3,GPT,f9d07474-35de-45b1-a196-a54d38ffe161,0x363800,0x82000)/File(\EFI\systemd\systemd-bootx64.efi)
Boot0004* rEFInd HD(3,GPT,f9d07474-35de-45b1-a196-a54d38ffe161,0x363800,0x82000)/File(\EFI\refind\refind_x64.efi)
Boot0005* Sony Original HD(1,GPT,7dd6ddcb-ebfb-43cc-8d2c-120171867350,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)
Boot0006* Windows Boot Manager HD(3,GPT,f9d07474-35de-45b1-a196-a54d38ffe161,0x363800,0x82000)/File(\EFI\Boot\bootx64.efi)
Boot0009* Sony Original HD(1,GPT,7dd6ddcb-ebfb-43cc-8d2c-120171867350,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)I can change the boot order using efibootmgr -o but it resets to this order after reboot. Grub2 command shell always launches on reboot followed by rEFInd after exiting grub2.
Cheers,
Dean
Offline
First of all: please back up your entire EFI system partition (/dev/sda3) before proceeding.
Boot0006* Windows Boot Manager HD(3,GPT,f9d07474-35de-45b1-a196-a54d38ffe161,0x363800,0x82000)/File(\EFI\Boot\bootx64.efi)
^ wtf?
Running `bcdedit` from Windows will clarify that one somewhat (hopefully).
Anyway, you seem to be booting from the rEFInd NVRAM entry (well, one of them) and presumably this is defaulting to chainload a (broken) GRUB .efi loader but we would need to see rEFInd's configuration file to be sure.
Your other NVRAM entries are a mess, frankly, and I personally would blow them all away and start afresh with systemd-boot to see if your motherboard will boot $ESP/EFI/BOOT/BOOTX64.EFI with Microsoft's bootmgfw.efi loader also on the EFI system partition (see https://www.rodsbooks.com/efi-bootloade … ive-naming) but I think we should be able to get rEFInd working for you.
Jin, Jîyan, Azadî
Offline
Thanks Stick, I've backed up ESP.. Granted my setup is a real mess so I'll go ahead and cleanup my NVRAM.
Here's my refind.conf
Note that using this file, 'dont_scan_volumes' and 'dont_scan_dirs' are not functioning so I'm either clobbering them somewhere or they are specified incorrectly.... (is ESP a rEFInd builtin? my ESP partition label is "EFI system partition"). 'dont_scan_files' works as expected and stops ubuntu menu entries showing up.
My refind_linux.conf file is the same in /boot and /boot/efi/EFI/refind/boot/ and is:
"Boot with standard options" "rw root=/dev/sda7 quiet initrd=/boot/intel-ucode.img initrd=/boot/initramfs-linux.img rootfstype=ext4 add_efi_memmap"
"Boot to single-user mode" "ro root=UUID=cb1bfffc-d53f-4349-b09e-962ad2e06176 single"
"Boot with minimal options" "ro root=UUID=cb1bfffc-d53f-4349-b09e-962ad2e06176"I think we should be able to get rEFInd working for you..
That's the spirit! Thanks again Stick. I'll look into your systemd-boot directive and post questions as they arise from there.
Cheers,
Dean
Offline
Hmmm... it seems my trademarked all-too-cursory sweep of your OP missed something:
I also swapped my boot manager from grub2 to refind.
Please post the exact commands that you used to acheive this, a glib description tells us nothing.
In respect of your refind.conf, I haven't used that particular bootmanager but it looks OK to me.
Will your motherboard firmware allow you to remove any of the NVRAM entries?
For example, to remove the "ubuntu" entry, run:
# efibootmgr -b 0001 -BCan you get the system to boot 0003?
# efibootmgr -o 0003,0002,0006The above commands can be run from the Arch live ISO image as long as it is booted in UEFI mode.
Can we also see the full output of:
# bootctl statusJin, Jîyan, Azadî
Offline
Whether your entries are correct or not depends on your partition layout. However, you don't want to specify the initrd twice. Specify the main initrd using that option and then include the microcode only in the options. (At least, that's how I've got mine configured.)
That said, I'm assuming these entries are the ones you're using to boot once you do get refind, up, so presumably they are not the issue. (Or are you only able to boot from auto-generated entries resulting from refind's scanning and not from your manually written ones?)
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
Specify the main initrd using that option and then include the microcode only in the options
Thanks, I'll specify it this way. My partition table has 3 partitions for Arch, / and /boot/efi are separate partitions (third is swap).
I'm assuming these entries are the ones you're using to boot once you do get refind, up
Right you are, I boot from the manual stanzas.
Cheers,
Dean
Offline
Hmmm... it seems my trademarked all-too-cursory sweep of your OP missed something:
9bynine wrote:I also swapped my boot manager from grub2 to refind.
Please post the exact commands that you used to acheive this, a glib description tells us nothing.
Here I deleted the existing ubuntu partitions, resized the windows partition to give more space for linux and followed the Arch Installation guide
Will your motherboard firmware allow you to remove any of the NVRAM entries?
For example, to remove the "ubuntu" entry, run:# efibootmgr -b 0001 -B
My motherboard cannot delete NVRam entries within the BIOS, but as per one of your previous posts (ubuntu coming in the boot order before rEFiND, and existing in the ESP due to the previous ubuntu install). When I delete the ubuntu entry rEFInd starts normally as the default boot manager.
Thanks all for looking at this (and preventing me taking drastic and incorrect action to repair). This is now SOLVED.
Can we also see the full output of:
# bootctl status
For the record with a well behaved system booting properly through rEFInd I have:
# bootctl status
Using EFI System Partition at /boot/efi.
System:
Firmware: UEFI 2.31 (American Megatrends 4.653)
Secure Boot: disabled
Setup Mode: user
Current Loader:
Product: systemd-boot 232
ESP: /dev/disk/by-partuuid/f9d07474-35de-45b1-a196-a54d38ffe161
File: └─/EFI/Boot/bootx64.efi
Boot Loader Binaries:
ESP: /boot/efi (/dev/disk/by-partuuid/f9d07474-35de-45b1-a196-a54d38ffe161)
File: └─/EFI/systemd/systemd-bootx64.efi (systemd-boot 232)
File: └─/EFI/BOOT/bootx64.efi (systemd-boot 232)
Boot Loader Entries in EFI Variables:
Title: Sony Original
ID: 0x0005
Status: active, boot-order
Partition: /dev/disk/by-partuuid/7dd6ddcb-ebfb-43cc-8d2c-120171867350
File: └─/EFI/Microsoft/Boot/bootmgfw.efi
Title: Windows Boot Manager
ID: 0x0006
Status: active, boot-order
Partition: /dev/disk/by-partuuid/f9d07474-35de-45b1-a196-a54d38ffe161
File: └─/EFI/Boot/bootx64.efi
Title: Windows Boot Manager
ID: 0x0000
Status: active, boot-order
Partition: /dev/disk/by-partuuid/f9d07474-35de-45b1-a196-a54d38ffe161
File: └─/EFI/Microsoft/Boot/bootmgfw.efi
Title: Sony Original
ID: 0x0009
Status: active, boot-order
Partition: /dev/disk/by-partuuid/7dd6ddcb-ebfb-43cc-8d2c-120171867350
File: └─/EFI/Microsoft/Boot/bootmgfw.efi
Title: rEFInd Boot Manager
ID: 0x0002
Status: active, boot-order
Partition: /dev/disk/by-partuuid/f9d07474-35de-45b1-a196-a54d38ffe161
File: └─/EFI/refind/refind_x64.efi
Title: Linux Boot Manager
ID: 0x0003
Status: active, boot-order
Partition: /dev/disk/by-partuuid/f9d07474-35de-45b1-a196-a54d38ffe161
File: └─/EFI/systemd/systemd-bootx64.efiOffline