WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: install into ESP to boot via UEFI  (Read 3841 times)

Offline suare

  • WikiUser
  • *
  • Posts: 26
install into ESP to boot via UEFI
« on: May 05, 2015, 04:48:39 AM »
Are there some instructions on how to roll out tinycore+ into ESP partition so it could be booted directly by uefi firmware? Is there separate build perhaps?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12269
Re: install into ESP to boot via UEFI
« Reply #1 on: May 05, 2015, 06:02:13 AM »
'Not totally sure what you're getting at, but if you search these forums, you'll find instructions on how to (u)efi boot and the TinyCorePure64 iso is multi-boot as from v6.2

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10240
Re: install into ESP to boot via UEFI
« Reply #2 on: May 06, 2015, 01:45:53 AM »
The kernel supports direct EFI boot, so it should be enough to copy the files + edit your EFI bootloader entry with the desired bootcodes.
The only barriers that can stop you are the ones you create yourself.

Offline suare

  • WikiUser
  • *
  • Posts: 26
Re: install into ESP to boot via UEFI
« Reply #3 on: May 14, 2015, 07:55:00 AM »
The kernel supports direct EFI boot, so it should be enough to copy the files + edit your EFI bootloader entry with the desired bootcodes.

Thanks! Are there some more details documented somewhere:
- which files do I need to copy where?
- which .iso is recommended to use - core64+?
- I've got grub installed as efi loader by ubuntu alongside with dual-boot windows - shall edit grub conf to add smth specific to kernel command-line for tinycore?
- where do I store packages in this case - some folder inside /boot/efi?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12269
Re: install into ESP to boot via UEFI
« Reply #4 on: May 14, 2015, 09:13:11 AM »
The TinyCorePure64-6.2.iso will (u)efi boot directly if you burn it to cd/dvd, you just need to set your machine to (u)efi boot and it should find the cd/dvd and display a suitable menu item to boot from it. (f12 on a dell).

If you search the forums, there are several threads on (u)efi boot and the grub2-efi extension info file explains how to make a (u)efi bootable usb stick.

If you already have (u)efi boot set up, you just need to add a menu entry something like this:

Code: [Select]
loadfont unicode
insmod efi_gop
set gfxterm=auto
terminal_output gfxterm

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

menuentry "corepure64" {
  linux /boot/vmlinuz64 quiet noswap tce=UUID=f8422ac1-fef4-48ce-b79e-abce5a598e8a waitusb=10:UUID=f8422ac1-fef4-48ce-b79e-abce5a598e8a tz=GMT-4 blacklist=bcma blacklist=ssb blacklist=b43
  initrd /boot/rootfs64.gz /boot/modules64.gz
}

Offline suare

  • WikiUser
  • *
  • Posts: 26
Re: install into ESP to boot via UEFI
« Reply #5 on: May 15, 2015, 01:26:00 PM »
Thanks, could you clarify couple of bits:

menuentry "corepure64" {
  linux /boot/vmlinuz64 quiet noswap tce=UUID=f8422ac1-fef4-48ce-b79e-abce5a598e8a waitusb=10:UUID=f8422ac1-fef4-48ce-b79e-abce5a598e8a tz=GMT-4 blacklist=bcma blacklist=ssb blacklist=b43
  initrd /boot/rootfs64.gz /boot/modules64.gz
}

f8422ac1-fef4-48ce-b79e-abce5a598e8a - is this uuid of your / or /boot partition?
Why do you need waitusb in this case?
Why all the blacklists?

Also as far as I recall "menuentry" in /boot/grub/grub.cfg are generated automatically based on /etc/grub/default and /etc/grub.d - is it possible to alter it so it would find tinycore files automatically the same way it find windows and ubuntu at the moment?

An on related note - did I got it right that I've got to copy following files from .iso:
/boot/rootfs64.gz
/boot/modules64.gz
/boot/vmlinuz64

Is that all? What about tce? Are there any .efi files I should copy as well?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12269
Re: install into ESP to boot via UEFI
« Reply #6 on: May 15, 2015, 10:32:41 PM »
f8422ac1-fef4-48ce-b79e-abce5a598e8a - is this uuid of your / or /boot partition?
Why do you need waitusb in this case?
Why all the blacklists?
It's the uuid of the partition with /boot and /tce on it - waitusb is required to give the device time to settle before it can be read. The blacklists were for my wifi hardware with tc-5.x, so they can be ignored.

Quote
Also as far as I recall "menuentry" in /boot/grub/grub.cfg are generated automatically based on /etc/grub/default and /etc/grub.d - is it possible to alter it so it would find tinycore files automatically the same way it find windows and ubuntu at the moment?
Maybe, you'd need to read the grub documentation.

Quote
did I got it right that I've got to copy following files from .iso:
/boot/rootfs64.gz
/boot/modules64.gz
/boot/vmlinuz64
If you're copying from the iso, you just need corepure64.gz (= rootfs64.gz + modules64.gz) and vmlinuz64.

Quote
Is that all? What about tce? Are there any .efi files I should copy as well?
No other files required, they are already there if you're already (u)efi booting ubuntu and windows or are installed by grub if you make your own (u)efi bootable usb stick.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1051
Re: install into ESP to boot via UEFI
« Reply #7 on: May 15, 2015, 10:52:48 PM »
Also as far as I recall "menuentry" in /boot/grub/grub.cfg are generated automatically based on /etc/grub/default and /etc/grub.d - is it possible to alter it so it would find tinycore files automatically the same way it find windows and ubuntu at the moment?

Is that all? What about tce? Are there any .efi files I should copy as well?
If you have an existing Linux installation that utilizes Grub2, add your TinyCore installation to /etc/grub.d/40_custom. Make sure this 40-custom file is flagged executable. Then as root run 'update-grub'. Upon reboot you will have a TinyCore entry in the Grub menu.

Here's my TinyCore 40_custom entry as an example. I run 32-bit TinyCore and have vmlinuz and core.gz in hd1,1 (equivalent to sdb1). My tce (optional .tcz extensions) are located on the sda2 partition.
Code: [Select]
menuentry "TinyCore 6" {
set root=(hd1,1)
linux /tinycore/boot/vmlinuz nozswap showapps tce=sda2/home/tce
initrd /tinycore/boot/core.gz
}

Offline emmi

  • Newbie
  • *
  • Posts: 26
Re: install into ESP to boot via UEFI
« Reply #8 on: May 17, 2015, 01:54:46 PM »
did I got it right that I've got to copy following files from .iso:
/boot/rootfs64.gz
/boot/modules64.gz
/boot/vmlinuz64
If you're copying from the iso, you just need corepure64.gz (= rootfs64.gz + modules64.gz) and vmlinuz64.
You probably know that if you have grub2 and an iso image file, you don't need to extract anything:
Code: [Select]
menuentry "TinyCore 6.1 Pure 64" {
 set isofile=/iso-images/TinyCorePure64-6.1.iso
 loopback loop $isofile
 echo Loading vmlinuz64 ...
 linux (loop)/boot/vmlinuz64 -- tz=CET-1CEST,M3.5.0/2,M10.5.0/3 iso=LABEL="Intenso"$isofile cde nozswap swapfile loglevel=3 vga=791
 echo Loading corepure64.gz ...
 initrd (loop)/boot/corepure64.gz
}

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: install into ESP to boot via UEFI
« Reply #9 on: May 17, 2015, 03:33:07 PM »
You probably know that if you have grub2 and an iso image file, you don't need to extract anything:
Code: [Select]
menuentry "TinyCore 6.1 Pure 64" {
 set isofile=/iso-images/TinyCorePure64-6.1.iso
 loopback loop $isofile
 echo Loading vmlinuz64 ...
 linux (loop)/boot/vmlinuz64 -- tz=CET-1CEST,M3.5.0/2,M10.5.0/3 iso=LABEL="Intenso"$isofile cde nozswap swapfile loglevel=3 vga=791
 echo Loading corepure64.gz ...
 initrd (loop)/boot/corepure64.gz
}
Using the ISO boot method is handy when booting many ISO's from a USB sick for example, but a permanent install  to an HDD/SSD/USB is 
better to download each module directly which is available from http://tinycorelinux.net/6.x/x86_64/release/distribution_files/
 
:)

Offline suare

  • WikiUser
  • *
  • Posts: 26
Re: install into ESP to boot via UEFI
« Reply #10 on: May 22, 2015, 04:42:02 AM »
Excellent, thanks for all the tips!
Another thing - I see that some people use /tce as a path, other /home/tce. Is there are anything special about this directory? Can I place it anywhere? Does it have to be owned by root? Shall I drop .tcz files in there (if so - from there?) or it'll be done from inside of tc?

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: install into ESP to boot via UEFI
« Reply #11 on: May 22, 2015, 04:56:35 AM »
The default "tcedir" is  /tce , which will be automatically used if present, unless you specify another location via boot code:
Code: [Select]
tce=UUID="cb6f8b98-91fd-4c96-b115-3d2bb9cb3e57"/tce-6.x
This way you can use f.e. multiple installations on the same drive or just use a subdirectory for your convenience, if desired.
Download a copy and keep it handy: Core book ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: install into ESP to boot via UEFI
« Reply #12 on: May 22, 2015, 05:03:12 AM »
The layout looks like this:
Code: [Select]
"tcedir"/optional/*.tcz
"tcedir"/ondemand/*
"tcedir"/onboot.lst
"tcedir"/mydata.tgz
And, not necessary, but kinda makes sense:
Code: [Select]
"tcedir"/boot/vmlinuz
"tcedir"/boot/core.gz
Download a copy and keep it handy: Core book ;)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 7939
Re: install into ESP to boot via UEFI
« Reply #13 on: May 22, 2015, 06:53:27 AM »
Hi suare
Quote
Shall I drop .tcz files in there (if so - from there?) or it'll be done from inside of tc?
Most extensions have dependencies. Use the  Apps  utility to install them and the dependencies will be resolved for you.

Offline suare

  • WikiUser
  • *
  • Posts: 26
Re: install into ESP to boot via UEFI
« Reply #14 on: June 01, 2015, 08:02:16 AM »
If you're copying from the iso, you just need corepure64.gz (= rootfs64.gz + modules64.gz) and vmlinuz64.

In http://www.tinycorelinux.net/6.x/x86_64/release/ I see CorePure64-6.3.iso and TinyCorePure64-6.3.iso but contrary to the names TCP twice bigger than CP. Which of those should I use to extract corepure64.gz and vmlinuz64?

Also, I already have bootable GNU/Linux kernel on this machine (as part of ubuntu installation). Can I reuse this to boot tinycore or there's some specific patches by TC which would prevent that from working?