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: John Frankish
Subject: RE: Cannot boot from dual bios/uefi boot CD
Date: Sun, 27 Dec 2015 14:30:07 +0400

>>>>>>> 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
>>>>>>> :)
>>>>>>
>>>>>> Indeed - but I could hardly make it available to others like this 
>>>>>> :)
>>>>>>
>>>>>>
>>>>> For the record - it should be fixed in current GIT.
>>>>> If you have chance to retest it would be good.
>>>>>
>>>> Thanks for the update.
>>>>
>>>> The dual boot cd/iso I was working on used isolinux for legacy boot and 
>>>> grub2 for uefi boot.
>>>>
>>>> What I would like to do is to use grub2 for both legacy and uefi 
>>>> boot by embedding the various grub modules as before (which would also 
>>>> test your fix).
>>>>
>>>> Is this (grub2 dual boot cd/iso) possible?
>>>
>>> Of course. This is what grub-mkrescue does.
>>>
>>>> Is there an explanation somewhere?
>>>>
>>>
>>> I though we have been there already last time, not?
>>
>> OK, I understand that what is now fixed in git is that if I use 
>> grub-mkrescue to make
>> an iso and then remove the unneeded modules from i386-pc/ and x86_64_efi/,
>> the iso will still boot - is that correct?
>>
> Loosely speaking - yes.
>
>> Similarly, there must be an equivalent legacy-bios img file 
>> (cdboot.img/core.img?) ,
>> but where is it in the iso, is it accessible and which modules does it 
>> contain?
>>
> /boot/grub/i386-pc/eltorito.img on ISO image. Same modules + biosdisk
> - part_apple.
>
In fact it looks like just 'biosdisk' and 'iso9660' and any deps.

Anyway, I made a few attempts:

$ grub-mkrescue --modules="linux part_msdos iso9660" --install-modules="" -o 
grub.iso iso

legacy bios boot -> error message (too fast to read) -> grub rescue prompt

uefi boot -> boot/grub/x86_64-efi/{part_acorn.mod, part_amiga.mod, 
part_acorn.mod, part_bsd.mod, part_dvh.mod, part_plan.mod, part_sun.mod, 
part_sunpc.mod, normal.mod} not found


$ grub-mkrescue --modules="iso9660 fshelp loadbios part_msdos part_gpt normal 
terminal crypto extcmd boot gettext linux video relocator mmap font bufio 
efi_gop video_fb efi_uga gfxterm bitmap_scale bitmap gfxmenu trig" 
--install-modules="" -o grub.iso iso
...
grub-mkrescue: error: cannot open `/usr/local/lib/grub/i386-pc/loadbios.mod': 
No such file or directory.


$ grub-mkrescue --install-modules="" -o grub.iso iso

legacy bios boot -> boot/grub/x86_64-efi/{part_acorn.mod, part_amiga.mod, 
part_apple.mod, part_bsd.mod, part_dfly.mod, part_dvh.mod, part_gpt.mod, 
part_msdos.mod, part_plan.mod, part_sun.mod, part_sunpc.mod, normal.mod} not 
found

uefi boot -> boot/grub/x86_64-efi/{part_acorn.mod, part_amiga.mod, 
part_bsd.mod, part_dvh.mod, part_plan.mod, part_sun.mod, part_sunpc.mod, 
normal.mod} not found


$ grub-mkrescue -o grub.iso iso
..
Cd boots OK, but it copies all of the i386-pc and x86_64-efi modules to the iso.

So, even though grub-mkrescue embeds the modules it needs to boot from cd/dvd 
into eltorito.img and efi.img, it will not boot unless a bunch of other 
(unneeded) modules are present in the iso.

A couple of questions:

1. Why does grub-mkrescue create a 2.88mb efi.img, when the embedded 
bootx64.efi is less than 400kb?

2. Why are /System/Library/CoreServices/boot.efi and /efi.img containing 
/efi/boot/bootx64.efi both required (if I understand correctly boot.efi and 
bootx64.efi are the same file)?




reply via email to

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