[olug] anyone know how to fix the bootloader on EFI systems?

Matthew G. Marsh olug4mgm at paktronix.com
Thu Mar 9 13:55:07 CST 2017


Having fought the good fight last year and finally succeeding in getting 
my old Mac Pro 1,1 to boot Linux (32bit EFI / 64 bit system) here is 
the best site I found that also has a VERY useful bootable miniEFI cd:

http://www.rodsbooks.com/refind/

I used the reFIND CD image many times to edit and fix the EFI partition. 
Bear in mind the EFI partition is ~200-300M FAT32 at the front of the 
disk.

Also the Linux kernels after 3.3 or so have an EFI stub that can load 
directly from reFIND or a similar EFI boot partition loader. A little 
harder to change out kernels and none of the distros use it as they only 
want you to use grub2 or similar but it works very well.

I ripped grub2 off of the partition early on as it had very peculiar 
setups with respect to kernel placement etc. But then I still use LILO so 
go figure...

Seriously check our Rod's pages and note that if you do decide to use his 
CD to fix the partition then you will want to obtain the SHELL64 (SHELL32 
in my case as EFI was 32bit) code and merge it into the CD image (USB 
works fine also). The SHELL64 is the actual shell into the boot partition 
that lets you see and (limited) edit files on the EFI partition.

HTH!

mgm


On Thu, 9 Mar 2017, Lou Duchez wrote:

> No luck yet, and for the sake of my blood pressure I'm setting the matter 
> aside for now.
>
> Some things I have tried and the roadblocks I have encountered:
>
> 1)    Various instructions say to run grub2-install ... I think this is the 
> root of the problem, you SHOULDN'T run grub2-install on an EFI system. 
> Apparently, on EFI the MBR doesn't change from kernel version to kernel 
> version (or distro version to distro version), it's allegedly smart enough to 
> find the appropriate bootloader.  That's where I screwed things up I think, I 
> changed the MBR.
>
> 2)    The fix is supposed to be reinstalling the package grub2-efi, which 
> will fix the MBR.  But that would require booting to normal Linux; I did once 
> or twice but I can't now.  If I can somehow get the thing to boot normally 
> just once more I can sort this out.
>
> 3)    grub rescue options, like setting "prefix" and "root" ... haven't found 
> options that work.
>
> 4)    I've tried making Super Grub2 bootable drives but I can't manage to 
> make one that actually boots.  I'm using a Windows 7 machine to try to build 
> them, shut up I have my reasons.  :-)
>
> Using the Fedora installation media I can at least get at the file system, 
> mount drives, and so forth.  All the user data has been copied off and that 
> makes the thought of a full reinstallation more palatable, but I still feel 
> like there should be some way to fix this mess.
>
> I also feel like EFI shouldn't make this such a fearsome process. It ought to 
> be something that can be fixed simply, and I feel like I'm almost there, it's 
> just that one step.
>
>
>> Did you find a solution to this? I fear EFI thanks to these things.  It 
>> seems like the fix would be to boot a live distro and (re)install a boot 
>> loader that works with EFI? grub should work with the right options, I 
>> believe.
>> 
>> Possibly relevant: https://wiki.archlinux.org/index.php/GRUB#UEFI_systems
>> 
>> -- Kava
>> 
>> 
>> 
>> -----Original Message-----
>> From: olug-bounces at olug.org [mailto:olug-bounces at olug.org] On Behalf Of Lou 
>> Duchez
>> Sent: Thursday, 9 March, 2017 00:35
>> To: Omaha Linux User Group <olug at olug.org>
>> Subject: [olug] anyone know how to fix the bootloader on EFI systems?
>> 
>> Well I screwed up.  I ran grub2-install on an EFI system, and apparently 
>> one shouldn't do that.  Now my system won't boot without the help of the 
>> Fedora installation media, and even then I can only get it to the grub 
>> command line, or (with the right set of gyrations and some good fortune) 
>> single-user mode and access to the entire LVM file system.
>> 
>> Any suggestions on how to fix the MBR (which is, I believe, where the 
>> problem lies)?
>> _______________________________________________
>> OLUG mailing list
>> OLUG at olug.org
>> https://lists.olug.org/mailman/listinfo/olug
>> _______________________________________________
>> OLUG mailing list
>> OLUG at olug.org
>> https://lists.olug.org/mailman/listinfo/olug
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug
>

--------------------------------------------------
Matthew G. Marsh
Special Email Addr for OLUG ;-}
Phone: (402) 932-7250
Email: olug4mgm at paktronix.com
WWW:  http://www.paksecured.org
--------------------------------------------------


More information about the OLUG mailing list