Hi
I was wondering if its possible to create a bootable CD that can boot from both legacy BIOS and EFI BIOS?
Also would it be possible to create a bootable USB that can boot from both? It would probably need to be GPT partitioned I guess.
That would be an interesting challenge. I don't have an EFI hardware so can't try it myself.
A livecd / usb that boots from both PC BIOS and EFI BIOS?
-
- Member
- Posts: 170
- Joined: Wed Jul 18, 2007 5:51 am
Re: A livecd / usb that boots from both PC BIOS and EFI BIOS
I do not use CDs, but my OS disk image can boot from BIOS and EFI as well. Unfortunatelly the EFI loader is not finished yet, but it gets started by the firmware if I create an EFI partition on 1mb boundary with size of at least of 100Mb.
Re: A livecd / usb that boots from both PC BIOS and EFI BIOS
It's possible because EFI doesn't use boot code on the media and CDFS doesn't use first (reserved) sectors of the media.
If you have seen bad English in my words, tell me what's wrong, please.
Re: A livecd / usb that boots from both PC BIOS and EFI BIOS
OK heres what you do for an EFI/BIOS live CD.
1 - Create a fat floppy image.
2 - Place your bios boot sector in the MBR.
3 - Create an EFI boot loader and call it bootx64.efi (or bootx86.efi depending on the architecture).
4 - Place your EFI boot loader in your floppy in the following path /EFI/BOOT.
5 - You should now have a floppy with a boot sector and a file called /EFI/BOOT/BOOTx64.efi.
6 - Use the floppy image in a CD.
7 - Tada!
I did this to try and get a fedora live usb working on both my mac and dell guess what? THE EFI GRUB DOES NOT WORK. (Im working on my own bootloader).
1 - Create a fat floppy image.
2 - Place your bios boot sector in the MBR.
3 - Create an EFI boot loader and call it bootx64.efi (or bootx86.efi depending on the architecture).
4 - Place your EFI boot loader in your floppy in the following path /EFI/BOOT.
5 - You should now have a floppy with a boot sector and a file called /EFI/BOOT/BOOTx64.efi.
6 - Use the floppy image in a CD.
7 - Tada!
I did this to try and get a fedora live usb working on both my mac and dell guess what? THE EFI GRUB DOES NOT WORK. (Im working on my own bootloader).
Get back to work!
Github
Github
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: A livecd / usb that boots from both PC BIOS and EFI BIOS
That's because you're expecting EFI to look for the bootcode inside a filesystem stored inside a floppy image stored in an ISO9660 volume.
Basically to support both systems is to write a CD bootloader (with floppy emulation perhaps) and build an ISO9660 volume with it to satisfy legacy bioses, then use the areas not needed by ISO9660 to store the partition table and all other relevant data. This is also how basically all non-x86 CD booting systems work that I've seen (mcd, sparc, hppa, dreamcast). Special code injection tools exist for all these platforms for that very specific purpose.
Basically to support both systems is to write a CD bootloader (with floppy emulation perhaps) and build an ISO9660 volume with it to satisfy legacy bioses, then use the areas not needed by ISO9660 to store the partition table and all other relevant data. This is also how basically all non-x86 CD booting systems work that I've seen (mcd, sparc, hppa, dreamcast). Special code injection tools exist for all these platforms for that very specific purpose.