[Nix-dev] uefi booting on nixos

Shea Levy shea at shealevy.com
Sun Mar 18 13:37:52 CET 2012


On 3/18/12 7:18 AM, Mathijs Kwik wrote:
> Shea Levy<shea at shealevy.com>  writes:
>
>> Hi Mathijs,
>>
>> It's not totally complete. In particular, the
>> installRemovableMediaImage option installs an EFI program that is a)
>> really hacky and b) depends on protocols not available on every
>> firmware (though when they're not available the boot fails with no bad
>> effects). I'm working with the kernel devs to ameliorate the problem
>> that necessitated the hack in the first place. I also need to do more
>> extensive testing, especially on the macbook pro. That being said, I
>> have been using it exclusively on my desktop for the past week or so
>> with several successful rebuilds, so there's that. If you do want to
>> try it out, I recommend trying the latest ISO from
>> http://hydra.nixos.org/job/nixos/trunk/iso_efi but if it doesn't boot
>> in EFI mode boot it in BIOS mode for the install then, if your system
>> supports efibootmgr, re-run switch-to-configuration after booting into
>> the built system to install the boot manager entries.
> EFI mode doesn't boot. The CD does show up as an UEFI boot option, but
> if I select it, I get a very fast blue flash (grub menu ?),
> followed by my installed (harddisk) grub starting (in bios mode).
>
> Should I just try to switch my running system to UEFI using
> boot.loader.efiBootStub?
> I guess I can always just boot my current BIOS/grub entry when it fails.
>
> I don't fully see how efibootstub would work, how does it plug in to
> grub2_efi?

It doesn't. Starting with Linux 3.3, the kernel itself is compiled as an 
EFI executable when the right option is set. So we don't need grub2_efi 
any more.


> As far as I know (at least on my system) efibootmgr cannot
> communicate with the uefi when booted in bios mode, so I'm pretty sure I
> need a working boot cd, or supply the bootmgr entry in the UEFI shell
> myself. (I had to do that for grub2_efi on Arch)

Right. You need to be in EFI mode, an EFI shell, or a firmware 
bootmanager interface in order to set a boot option. I'll be sure to 
document all this more clearly once it's closer to done :)

>
> Mathijs
>
>
>> Let me know if you have any problems.
>>
>> Cheers,
>> Shea
>>
>> On 3/16/12 4:34 PM, Mathijs Kwik wrote:
>>> Hi Shea,
>>>
>>> I saw your commits dealing with uefi booting.
>>> On my laptop, windows 7 boots fine from uefi.
>>> However, linux doesn't. Grub-uefi boots, but something goes wrong
>>> (memory mapping) when handig control to the kernel.
>>> In the past, I've spent countless hours debugging it to no avail.
>>>
>>> I would like to give it another try someday soon.
>>> Do you consider your uefi changes somewhat complete? Or do you still
>>> have more changes planned?
>>>
>>> Anyway, thanks for your work.
>>>
>>> Mathijs



More information about the nix-dev mailing list