Tiny Core Linux

Tiny Core Base => Corepure64 => Topic started by: sebus on January 01, 2015, 09:05:33 AM

Title: UEFI bootable iso?
Post by: sebus 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
Title: Re: UEFI bootable iso?
Post by: Juanito on January 01, 2015, 09:15:04 AM
I understood that corepure64 could uefi boot from the iso with the right grub2 commands?
Title: Re: UEFI bootable iso?
Post by: sebus 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
Title: Re: UEFI bootable iso?
Post by: Juanito 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?
Title: Re: UEFI bootable iso?
Post by: sebus on January 01, 2015, 12:27:54 PM
UEFI boot iso (but that should also allow CD burned to be UEFI bootable, right?)

sebus
Title: Re: UEFI bootable iso?
Post by: sebus 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 (http://fedoraproject.org/wiki/User:Pjones/BootableCDsForBIOSAndUEFI#New_UEFI.2FBIOS_hybrid_method)
Title: Re: UEFI bootable iso?
Post by: Juanito 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...
Title: Re: UEFI bootable iso?
Post by: sebus on January 02, 2015, 01:00:08 AM
Physical drive is not needed. Virtualbox is all that is required

sebus
Title: Re: UEFI bootable iso?
Post by: curaga 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 ;)
Title: Re: UEFI bootable iso?
Post by: core-user 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.
Title: Re: UEFI bootable iso?
Post by: sebus 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 (http://forum.tinycorelinux.net/index.php/topic,13445.45.html)

sebus
Title: Re: UEFI bootable iso?
Post by: Juanito 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
}
Title: Re: UEFI bootable iso?
Post by: sebus 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
Title: Re: UEFI bootable iso?
Post by: Juanito 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.
Title: Re: UEFI bootable iso?
Post by: Juanito 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...
Title: Re: UEFI bootable iso?
Post by: sebus on January 04, 2015, 07:22:07 AM
Thanks, will give it a go

sebus
Title: Re: UEFI bootable iso?
Post by: sebus on January 06, 2015, 01:15:21 PM
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="/TinyCorePure64-6.0rc1.iso"
  loopback loop $isofile
  linux (loop)/boot/vmlinuz64 iso-scan/filename=$isofile quiet noswap
  initrd (loop)/boot/corepure64.gz
}

If using TinyCorePure64-6.0rc1.iso to boot directly (BIOS mode) in Workstation 11, all works perfect

If I boot from UEFI USB (with above entry in grub.cfg) I stop at shell prompt (NO GUI)

Is there way for TinyCorePure to also boot this way? (how to add APPEND loglevel=3 cde vga=791 )

sebus
Title: Re: UEFI bootable iso?
Post by: Rich on January 06, 2015, 01:38:12 PM
Hi sebus
I don't know for sure, but I would try adding to the right of   quiet noswap
Title: Re: UEFI bootable iso?
Post by: sebus on January 06, 2015, 02:51:33 PM
Perfect, thanks Rich, works as intended

sebus
Title: Re: UEFI bootable iso?
Post by: sebus on January 07, 2015, 08:00:53 AM
Well, sorry, but it does NOT work.

I got overexcited, as it did work, but ONLY if I had the iso mounted in Workstation as CD.

Without iso mounted (just the UEFI stick boot) it is a no go - no GUI

But I can "cheat" and copy the /cde folder to the root of USB (and it works this way)

sebus
Title: Re: UEFI bootable iso?
Post by: Juanito on January 07, 2015, 09:19:16 AM
Without iso mounted (just the UEFI stick boot) it is a no go - no GUI

There is no gui in the corepure64 iso, once booted via the uefi stick boot, you would need to download the required extensions
Title: Re: UEFI bootable iso?
Post by: sebus on January 07, 2015, 11:53:59 AM
I am using TinyCorePure64-6.0rc1.iso

sebus
Title: Re: UEFI bootable iso?
Post by: pema on January 14, 2015, 03:27:44 PM
Hej.
@ Sebus: May I propose the refind boot loader ? Works quite nice, on a windoze you just replace the original bootloader with refind: Instead of installing, just copy the refind bootx64.efi with config file into the efi partition boot directory and in to the windows dir (here it must be renamed though to bootmfgw.efi, same filename as original win loader), if not copied into win dir also your windoze will overwrite your boot settings at next boot. Your bios will start the refind bootloader instead of standard and refind will automagically scan and list all vmlinuz etc it finds and lists as bootable(depending to settings in config file), you now have the option playing freely with lots of lnx kernels without thinking about the bootloader, and its rather nice graphic with option to add your own icons. The uefi is capable of several partitions (128 ?) so you can chop up your harddrive as you wish. Refind can also scan and boot usb drives if configured for that.
Do not forget to backup original EFI partition before tinkering, I have heard of people making mistakes eventhough you and I dont have time for that.

Kindly Peter.

Edit: I confirm the issues of getting a desktop in the tinycorepure64 6.0 iso, made a post before I read your notice.
Title: Re: UEFI bootable iso?
Post by: Juanito on January 25, 2015, 03:42:08 AM
some progress being made, I can uefi boot a cd burned from a modified iso, but:

* with an external grub.cfg I get dropped to the grub prompt
* with an embedded grub.cfg I see "welcome to grub" and then a bunch of blocked out "?" like the efi font is not loaded

the almost total lack of documentation doesn't help...
Title: Re: UEFI bootable iso?
Post by: Juanito on February 12, 2015, 04:50:40 AM
I finally managed to create an iso that, when burned to CD/DVD, will boot in legacy bios and uefi modes - on my latitude e7240 both are listed at power on.

In uefi mode, the console should display at the native screen resolution.

The iso is much bigger than it needs to be, but there's not much point refining things if there is no demand for this kind of thing - although I wonder if the iso could also be "burnt" to usb stick...

Only tested so far on a usb external CD/DVD drive, if anytbody else would like to test CorePure64_mb-6.1rc1.iso available here:

http://tinycorelinux.net/6.x/x86_64/release_candidates/
Title: Re: UEFI bootable iso?
Post by: pq5190362 on February 12, 2015, 05:38:51 AM
Hello,

I finally managed to create an iso that, when burned to CD/DVD, will boot in legacy bios and uefi modes - on my latitude e7240 both are listed at power on.

In uefi mode, the console should display at the native screen resolution.

The iso is much bigger than it needs to be, but there's not much point refining things if there is no demand for this kind of thing - although I wonder if the iso could also be "burnt" to usb stick...

Only tested so far on a usb external CD/DVD drive, if anytbody else would like to test CorePure64_mb-6.1rc1.iso available here:

http://tinycorelinux.net/6.x/x86_64/release_candidates/

I tried to boot CorePure64_mb-6.1rc1.iso in VirtualBox 4.30.20 with the Machine -> Settings -> System -> Motherboard -> Extended Features -> Enable EFI (special OSes only) option activated and it seems to boot just fine.

Then I wanted to create a bootable USB flash drive from CorePure64_mb-6.1rc1.iso using Rufus 1.4.12 (https://rufus.akeo.ie/) with Partition scheme and taget system type set to GPT partition scheme for UEFI computer.

But I didn't even came that far, because Rufus 1.4.12 immediately complains when trying to load the ISO and throws the following error message:

Quote from: Rufus 1.4.12 when trying to load CorePure64_mb-6.1rc1.iso
Unsupported ISO

This version of Rufus only supports bootable ISOs based on bootmgr/WinPE, isolinux or EFI.

This ISO doesn't appear to use either...

I do not get this error message when loading a recent Ubuntu 64-bit ISO inside Rufus 1.4.12.

Regards
Title: Re: UEFI bootable iso?
Post by: core-user on February 12, 2015, 07:24:05 AM
Quote
Only tested so far on a usb external CD/DVD drive, if anytbody else would like to test CorePure64_mb-6.1rc1.iso available here:

http://tinycorelinux.net/6.x/x86_64/release_candidates/
Just booted from pendrive on my Acer netbook which seems to work OK if you use dd to create the pendrive.  8)
Title: Re: UEFI bootable iso?
Post by: pq5190362 on February 12, 2015, 07:44:09 AM
Just booted from pendrive on my Acer netbook which seems to work OK if you use dd to create the pendrive.  8)

Booted in which mode?

UEFI? Or BIOS?
Title: Re: UEFI bootable iso?
Post by: core-user on February 12, 2015, 08:56:42 AM
Sorry, I just left it to boot up, likely it was mbr/bios.
Title: Re: UEFI bootable iso?
Post by: Head_on_a_Stick on February 15, 2015, 11:05:28 AM
For anyone interested, I have Corepure64 booting up in EFI-mode using pure EFISTUB with no bootloader at all.

I am using it from a HDD shared with an Arch install with the kernel image & initial ramdisk copied to the EFI system partition.

To get it to boot I used the `efibootmgr` command to directly write a new NVRAM entry in my firmware (BIOS) -- this command could also be used from a live ISO.
Code: [Select]
# efibootmgr -d /dev/sdX -p Y -c -L "TinyCore" -l /vmlinuz64 -u "root=/dev/sdAB ro initrd=/corepure64.gz"Where "X" is the drive letter & "Y" is the partition number of the EFI system partition and "AB" is the drive letter and parition number of the location of the /tce folder.

TinyCore rocks! I love it :)

EDIT: It is also possible to use gummiboot -- /boot/loader/entires/tinycore.conf
Code: [Select]
title   TinyCore
linux   /vmlinuz64
initrd  /corepure64.gz
options root=/dev/sdAB
For this method, gummiboot must be installed in the "host" system ;)
Title: Re: UEFI bootable iso?
Post by: Juanito on February 28, 2015, 02:47:38 AM
I worked at this some more and managed to make an iso that will boot to an Xfbdev gui in both legacy-bios and uefi boot from a CD.

On my hardware at least, this will use the native screen resolution rather than being limited to something less. Depending on how your cd/dvd is connected, even with waitusb, you may have to let things boot to the gui (it takes a while) and then exit back to get a console at native resolution.

Now the only problem is that the iso is 50% larger than the standard one as I cannot (yet) get grub to use only the required modules in either embedded or normal mode.

See:

http://tinycorelinux.net/6.x/x86_64/release_candidates/TinyCorePure64_mb-6.1rc2.iso
Title: Re: UEFI bootable iso?
Post by: Juanito on February 28, 2015, 11:43:12 PM
'Managed to shave off 4mb:

http://tinycorelinux.net/6.x/x86_64/release_candidates/TinyCorePure64_mb-6.1rc3.iso
Title: Re: UEFI bootable iso?
Post by: coreplayer2 on March 01, 2015, 06:17:26 AM
Thanks :)