WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: UEFI bootable iso?  (Read 29802 times)

Offline sebus

  • Jr. Member
  • **
  • Posts: 96
UEFI bootable iso?
« on: January 01, 2015, 09:05:33 AM »
clonezilla-live-20141208-utopic-amd64 (alternative, Ubuntu based) can boot iso in UEFI mode.

Could the same be done for TC64?

sebus

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14634
Re: UEFI bootable iso?
« Reply #1 on: January 01, 2015, 09:15:04 AM »
I understood that corepure64 could uefi boot from the iso with the right grub2 commands?

Offline sebus

  • Jr. Member
  • **
  • Posts: 96
Re: UEFI bootable iso?
« Reply #2 on: January 01, 2015, 09:44:10 AM »
But how could I specify commands for boot? Using Vmware Workstation 11 for testing
Clonezilla iso has proper /EFI structure to allow efi boot

sebus

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14634
Re: UEFI bootable iso?
« Reply #3 on: January 01, 2015, 10:43:03 AM »
To be sure I understood correctly, do you want to uefi boot from an iso file, or use the iso to burn a cd that can be uefi booted?

Offline sebus

  • Jr. Member
  • **
  • Posts: 96
Re: UEFI bootable iso?
« Reply #4 on: January 01, 2015, 12:27:54 PM »
UEFI boot iso (but that should also allow CD burned to be UEFI bootable, right?)

sebus

Offline sebus

  • Jr. Member
  • **
  • Posts: 96
Re: UEFI bootable iso?
« Reply #5 on: January 01, 2015, 03:38:39 PM »
One would expect EFI bootable iso to have

efiboot.img
\efi\boot\bootx64.efi

with grub

\boot\grub\x86_64-efi
or
\EFI\boot\x86_64-efi

Good read here

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14634
Re: UEFI bootable iso?
« Reply #6 on: January 01, 2015, 11:29:13 PM »
As I don't have a bootable cd/dvd drive at the moment - my mac superdrive needs a "magic" number to be written to enable it for linux - it might be a while before I get around to this...

Offline sebus

  • Jr. Member
  • **
  • Posts: 96
Re: UEFI bootable iso?
« Reply #7 on: January 02, 2015, 01:00:08 AM »
Physical drive is not needed. Virtualbox is all that is required

sebus

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10992
Re: UEFI bootable iso?
« Reply #8 on: January 02, 2015, 02:14:53 AM »
That file seems to be 352kb, a rather big addition to the smaller isos, though CorePlus would be ok.

Are there any real machines that fail to boot normal CDs? Even all my macs, which all have EFI, boot normal CDs fine. Virtualbox doesn't count ;)
The only barriers that can stop you are the ones you create yourself.

Offline core-user

  • Full Member
  • ***
  • Posts: 191
  • Linux since 1999
Re: UEFI bootable iso?
« Reply #9 on: January 02, 2015, 04:14:20 AM »
A CD/DVD boots differently than a HDD, therefore you should only need to arrange for a hard drive install to check for BIOS or UEFI, then run the appropriate code to set up the disk partitioning, then it can install whichever of /boot/grub or /efi/grub that it needs.
AMD, ARM, & Intel.

Offline sebus

  • Jr. Member
  • **
  • Posts: 96
Re: UEFI bootable iso?
« Reply #10 on: January 02, 2015, 05:12:16 AM »
It has nothing to do with "can not boot normal CD"

It is rather "Would be nice to be able to boot UEFI" category.

Hope one day all legacy BIOS will be gone for good. Virtualbox does count, as it is very easy testing tool

The whole EFI bootable HDD/USB was discussed here

sebus
« Last Edit: January 02, 2015, 05:19:09 AM by sebus »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14634
Re: UEFI bootable iso?
« Reply #11 on: January 03, 2015, 02:15:34 AM »
This works  :)

Code: [Select]
loadfont unicode
insmod efi_gop
set gfxmode=1366x768x32
set gfxpayload=keep
set gfxterm_font=unicode
terminal_output gfxterm

search --no-floppy --fs-uuid --set=root f8422ac1-fef4-48ce-b79e-abce5a598e8a

menuentry "corepure64_tc6_iso" {
  set isofile="/tmp/CorePure64-6.0rc1.iso"
  loopback loop $isofile
  linux (loop)/boot/vmlinuz64 iso-scan/filename=$isofile quiet noswap
  initrd (loop)/boot/corepure64.gz
}

Offline sebus

  • Jr. Member
  • **
  • Posts: 96
Re: UEFI bootable iso?
« Reply #12 on: January 03, 2015, 02:17:20 PM »
Many thanks for this

I see it being modified grub-2 config as per this:

http://forum.tinycorelinux.net/index.php/topic,13445.msg97679.html#msg97679

But I think it is to boot existing iso (CorePure64-6.0rc1.iso)  from grub2 from (USB/HD?)

Which way to create the actual BIOS/EFI boot iso? (sorry, if that is obvious to somebody, but honestly not to me)

Thanks

sebus
« Last Edit: January 03, 2015, 02:36:58 PM by sebus »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14634
Re: UEFI bootable iso?
« Reply #13 on: January 03, 2015, 09:33:15 PM »
Correct, I boot corepure64 from a gpt/uefi formatted usb stick, so I just needed to add an extra menu entry to boot from the iso.

Google comes up with results for uefi boot cd/dvd, but I didn't try any yet.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14634
Re: UEFI bootable iso?
« Reply #14 on: January 04, 2015, 12:56:03 AM »
You could try:
Code: [Select]
$ tce-load -i grub-efi dosfstools

$ cd /tmp
$ cat grub.cfg
loadfont unicode
insmod efi_gop
set gfxterm_font=unicode
terminal_output gfxterm

menuentry "corepure64" {
  linux /boot/vmlinuz64 quiet
  initrd /boot/corepure64.gz
}

$ x86_64-grub-mkimage --format=x86_64-efi --output=BOOTX64.EFI --config=/tmp/grub.cfg --prefix=/EFI/BOOT part_gpt part_msdos fat ext2 hfs hfsplus iso9660 udf ufs1 ufs2 zfs chain linux boot appleldr ahci configfile normal regexp minicmd reboot halt search search_fs_file search_fs_uuid search_label gfxterm gfxmenu efi_gop efi_uga all_video loadbios gzio echo true probe loadenv bitmap_scale font cat help ls png jpeg tga test at_keyboard usb_keyboard

$ dd if=/dev/zero of=efiboot.img bs=1K count=1440
$ mkdosfs -F 12 efiboot.img
$ mkdir /tmp/image
$ sudo mount efiboot.img /tmp/image
$ sudo mkdir -p /tmp/image/EFI/BOOT
$ sudo cp BOOTX64.EFI /tmp/image/EFI/BOOT
$ sudo umount /tmp/image

[copy existing corepure64 iso files somewhere]
$ cp efiboot.img /somewhere/boot/isolinux
$ mkisofs -pad -l -r -J -V CorePure64 -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -eltorito-alt-boot -e boot/isolinux/efiboot.img -boot-hide-rr-moved -o newCorePure64.iso somewhere

Note that I haven't tried this myself...
« Last Edit: January 04, 2015, 02:30:17 AM by Juanito »