help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot boot from dual bios/uefi boot CD


From: Andrei Borzenkov
Subject: Re: Cannot boot from dual bios/uefi boot CD
Date: Sat, 28 Feb 2015 11:30:47 +0300

В Sat, 28 Feb 2015 11:30:59 +0400
John Frankish <address@hidden> пишет:

> >
> > At which point I have to remind you that I never told you to use --modules 
> > in the first place :) You somehow insist on it,
> >for reasons I do not understand. 
> 
> The reason is that, if I don't do this, mkrescue writes 4mb of modules to 
> /boot/grub/{i386-pc, x86_64-efi}, most of which are not required.

      --install-modules=MODULES   install only MODULES and their dependencies
                             [default=all]

> 
> If I manually edit the iso to remove the modules that are not required, then 
> the iso refuses to boot complaining that the modules I removed are missing 
> (even though they are not required to boot the cd).

Yes, I have reproduced it now. The reason is, grub-mkrescue adds
commands to load all partition drivers to embedded config and if some
of them (or may be the last one) is missing it sets error indication.
Later grub misinterprets this error indication when loading normal
module; loading it manually succeeds (insmod normal; normal). If I add
code to reset error indication before trying to load normal it works.

So it still works for your purposes, albeit with manual workaround :)

> 
> What I am trying to do is make an iso that, when burned to cd, will boot in 
> legacy-bios and uefi mode to a console prompt. In the case of legacy-bios, 
> this is easy. In the case of uefi, I need to load gop_efi and unicode fonts 
> in order to have a display at the console prompt.

This works for me also without gop_efi and unicode. I'm on QEMU with
OVMF, so may be it makes difference, could be that real hardware is
different. Of course you will probably need efi_gop to avoid "blind
booting" but then it is far beyond "boot to a console prompt" :)

> 
> Since I'd like the above iso to be as small as possible,

The minimal ISO image size that boots into grub normal CLI (only EFI
support) is 68K here.

>                                                          I'd like 
> grub-mkrescue to either:
> 
> 1. Embed only the required modules for both legacy-bios and uefi to boot.
> 
> Or
> 
> 2. Copy only those modules required to boot to the iso under 
> /boot/grub/{i386-pc, x86_64-efi}

Should I repeat --install-modules yet again? :)

> 
> This doesn't seem unreasonable :)
> 

Yes, and there is at least one bug here that needs to be fixed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]