Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: suare on May 05, 2015, 04:48:39 AM

Title: install into ESP to boot via UEFI
Post by: suare 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?
Title: Re: install into ESP to boot via UEFI
Post by: Juanito 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
Title: Re: install into ESP to boot via UEFI
Post by: curaga 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.
Title: Re: install into ESP to boot via UEFI
Post by: suare 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?
Title: Re: install into ESP to boot via UEFI
Post by: Juanito 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
}
Title: Re: install into ESP to boot via UEFI
Post by: suare 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?
Title: Re: install into ESP to boot via UEFI
Post by: Juanito 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.
Title: Re: install into ESP to boot via UEFI
Post by: nitram 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
}
Title: Re: install into ESP to boot via UEFI
Post by: emmi 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
}
Title: Re: install into ESP to boot via UEFI
Post by: coreplayer2 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/ (http://tinycorelinux.net/6.x/x86_64/release/distribution_files/)
 
:)
Title: Re: install into ESP to boot via UEFI
Post by: suare 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?
Title: Re: install into ESP to boot via UEFI
Post by: Misalf 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.
Title: Re: install into ESP to boot via UEFI
Post by: Misalf 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
Title: Re: install into ESP to boot via UEFI
Post by: Rich 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.
Title: Re: install into ESP to boot via UEFI
Post by: suare 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?
Title: Re: install into ESP to boot via UEFI
Post by: core-user on June 01, 2015, 08:31:31 AM
You should be looking in here. ;)
http://www.tinycorelinux.net/6.x/x86_64/release/distribution_files/
Title: Re: install into ESP to boot via UEFI
Post by: Juanito on June 01, 2015, 10:12:58 AM
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?

As long as your existing installation is (u)efi boot, yes.
Title: Re: install into ESP to boot via UEFI
Post by: suare on June 02, 2015, 02:24:49 AM
You should be looking in here. ;)
http://www.tinycorelinux.net/6.x/x86_64/release/distribution_files/

Thanks! It's kinda confusing that bigger TinyCP got EFI inside while smaller CP doesn't.
Title: Re: install into ESP to boot via UEFI
Post by: Juanito on June 02, 2015, 02:41:12 AM
The (u)efi files in TinyCorePure64 are only there so it can be (u)efi booted when burned to cd/dvd.

Since you already have a (u)efi installation, you only need to copy corepure64.gz and vmlinuz64 to a suitable location and add an additional menu item in your boot loader configuration file to get things working.