You are not logged in.

#1 2013-09-14 18:36:02

Deadvi
Member
Registered: 2011-10-04
Posts: 17

[SOLVED] Fix UEFI bootloader after wrong installation

Greetings,

I made a typo when I was executing the installation of the bootloader on the efibootmgr command, more specifically in the root parameter. My root partition is sda5 and I miss clicked my numpad and enter sda2. That results in a failed boot attempt of Arch and leaves me on a prompt.

Is there a way to fix this situation without having to do another installation?

Thanks in advance,

Deadvi

Last edited by Deadvi (2013-09-14 22:39:53)

Offline

#2 2013-09-14 20:13:19

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

Re: [SOLVED] Fix UEFI bootloader after wrong installation

Just use the media you used to install Arch: boot into it, mount stuff as you did to install etc. and follow the installation steps to set stuff up but don't do pacstrap - go straight to arch-chroot and then use efibootmgr to correct the mistake.


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

#3 2013-09-14 21:00:43

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

Re: [SOLVED] Fix UEFI bootloader after wrong installation

cfr wrote:

Just use the media you used to install Arch: boot into it, mount stuff as you did to install etc. and follow the installation steps to set stuff up but don't do pacstrap - go straight to arch-chroot and then use efibootmgr to correct the mistake.

If the medium you boot supports EFI and has its own version of efibootmgr, it shouldn't even be necessary to mount your Arch partitions, chroot into them, etc.; just boot and issue the efibootmgr command to register a new entry.

Alternatively, you could use a USB flash drive or CD-R with rEFInd (that page has download links for prepared images for both media): Boot to it, select your kernel in the rEFInd menu, hit F2 or Insert twice, and adjust your boot options as necessary. When you boot, you should be in your Arch installation, and you can then use efibootmgr from there. Having a rEFInd USB flash drive or CD-R handy can be useful, since that will enable you to boot should something go wrong with your NVRAM entries. (This can happen on some computers if you upgrade your firmware, if the hard disk is temporarily disconnected, or for other reasons.)

Offline

#4 2013-09-14 22:42:06

Deadvi
Member
Registered: 2011-10-04
Posts: 17

Re: [SOLVED] Fix UEFI bootloader after wrong installation

Thank you both for your answers. Problem solved.

Offline

#5 2013-09-14 22:46:52

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

Re: [SOLVED] Fix UEFI bootloader after wrong installation

srs5694 wrote:

If the medium you boot supports EFI and has its own version of efibootmgr, it shouldn't even be necessary to mount your Arch partitions, chroot into them, etc.; just boot and issue the efibootmgr command to register a new entry.

Thanks for confirming this. I was going to suggest it but then realised I'd never done it that way and hesitated to recommend something I wasn't 100% sure would work. Good to know it should.


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

Board footer

Powered by FluxBB