Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: Juanito on June 09, 2012, 11:48:17 AM
-
Did anybody try to boot tinycore via UEFI boot on a non-mac machine?
After tiring of trying to get grub-efi to work on a mac mini (as per grub2 devs, it probably won't work until linux-3.3), I noticed my laptop has an option to use UEFI and prepared a usb stick with grub-efi - the trouble is the laptop (dell latitude e6220) does not recognise the usb stick as efi bootable...
-
I am hearing of issues booting tc on notebooks using the IsydeH2O UEFI BIOS, that covers notebooks models by acer, Intel, Dell, Toshiba, HP etc etc... manufactured over the last few years
Am considering compiling a newer kernel which is UEFI aware to support booting on macs as well as other UEFI pc's. I too am going around in circles trying to boot tc on a USB with grub2 efi
-
hi friends,
a project in that direction would be very appreciated.
more and more macs are in my direct environment... friends and relatives.
and more and more pcs getting uefi, too.
hopefully there will be a multifunctional solution, without change of the configuration of the booted system...
... so it will remain a live-system that need no change at the booted system :)
thank you all for your contributions...
-
I can confirm that with a mac (mac mini at least) the combination of rEFIt and grub legacy works.
I suppose grub2 in bios mode would also work with rEFIt, but I didn't try.
I tried grub-efi compiled from bzr a few days ago and it doesn't want to work with either the mac mini or dell uefi, which tends to indicate a newer kernel is required (and/or a less buggy efi/uefi).
-
Maybe try Fedora's grub legacy fork? It has uefi support and is still updated.
-
I can't use rEFIt since it requires installation on the host machine. My goal is a bootable USB to boot mac's with of course TC. This is possible and have been successful with other distributions. So am convinced we need to simply compile a newer kernel that is EFI aware to boot TC with.
-
Given I've had a GPT/EFI usb stick that booted on Macs with the 3.0.3 kernel, I don't think the kernel version is the issue.
-
coreplayer2 sent me a PM about more instructions, replying here because it might help others too.
It's been a few months since then, so this is all from memory. It was some version of TC4 with the 3.0 kernel.
1. Grab a grub2 efi image (BOOTX64.EFI) from a deb package. I just wanted to quickly get a GPT test USB stick running, so didn't bother building it.
2. Format an empty usb stick with GPT, one fat32 partition (required by EFI to be fat32).
3. Create directories efi/boot and put BOOTX64.EFI under there.
After that it was simply a grub2 config file and the usual TC setup.
-
hi curaga,
for me it's no problem to partition in the "old school" ways... like fdisk, cfdisk etc.
is there a own boot-block for gpt?
would you be so kind and be more specific how to use gpt?
could you please provide your grub2-configuration?
there are so many ways, perhaps there are some tiny differences to use grub2 with gpt,
perhaps it's just one line or a tiny variable...
does it work on an usbstick, even to multiboot different distributions, live-isos or frugal-installed-files?
thank you for your contributions.
-
Yes, you need a GPT-able partitioning tool, like parted or the GPT fdisk tools (http://www.rodsbooks.com/gdisk/ ). Though I think our parted extension is too old for GPT. It's not much different from MBR, with the exception that there is no boot block at all.
I don't have the stick anymore, so I can't show the grub2 config etc.
It was only TC on that stick, but the grub2 menu showed OK, so dualboot should work. As for the iso loop boots, I really think those shouldn't be done, they have many downsides for the only gain of not properly installing the distro (aka a couple minutes of your time).
edit: Ah, I see we have gdisk.tcz in the repo.
-
Thanks curaga
I find a GPT partition is mandatory. I simply format the whole partition FAT32
it appears the magic source is in the cfg file and it's it's location. Still have not managed to boot a kernel less than 3.2.x yet, but if you say you've done it then I'll continue on those lines..
I've found this a great reference http://www.rodsbooks.com/efi-bootloaders/efistub.html (http://www.rodsbooks.com/efi-bootloaders/efistub.html)
-
Yep, that is a nice way to avoid a bootloader altogether, kind of like direct-booting a kernel from a floppy used to be.
Though, I've heard many reports of extremely buggy EFI bioses where using efibootmgr caused an unbootable system, and having to replace the bios chip.
-
Yeah it sounds great until you try :( weeks if not months later I'm still trying... lol
-
After using gdisk to create the gpt partition, the usb stick is at least recognised in uefi boot mode on the dell, and grub2-efi creates BOOTX64.EFI automatically (rather than grub.efi).
..but the os is not found
Now I suppose I need an efi enabled kernel to be able to use efibootmgr...
-
os? Does that mean the bios doesn't load grub, or grub doesn't load tc?
-
It doesn't get as far as grub, that's why I was thinking efibootmgr was required, but maybe there's a way to do it from the uefi setup on the dell if I can figure out what exactly to enter...
-
Some progress :)
The dell setup allows you to create a uefi boot order and to specify a file - entering \\EFI\\BOOT\\BOOTX64.EFI boots from a usb stick to the grub-efi menu
From the grub command menu the following works: insmod efi_gop gfxterm font videotest videoinfo
loadfont unicode
videoinfo
videotest..and I get the expected ouput (as far as I know) from videotest/videoinfo
So I've managed to move from "missing operating system" to "booting a command list", but then the boot hangs without error message.
Hopefully this is just a grub.cfg issue :P
-
I guess I have to start by saying this system works, every time on my macbook pro
Booting the ISO directly within this construct works flawlessly with Ubuntux64 v12.04 or Mintx64 v13 (both efi aware kernels, with the iso renamed boot.iso) using BOOTX64.EFI from the "ISO-2-USB EFI-Booter for Mac 0.01" archive
A USB partitioned with GPT, formatted with FAT32, (and NO boot flag) and the following directory/file structure
/EFI/BOOT/
/EFI/BOOT/boot.iso
/EFI/BOOT/bootx64.efi
This will always be detected by the quirky Mac EFI BIOS which displays a USB bootable system in the option key invoked menu, and never ever fails to boot. rEFIt not required, neither is grub2 required to be installed to the partition's boot sector. The above two items is all that is needed.
Well, this is one method.
-
Some of my observations, an efi BIOS expects to find required config files in a specific location, eg.
bootx64.efi in /EFI/BOOT/
A bootx64.efi file located as above will always be detected and displayed in the efi boot options menu.
A configuration file can be co located with bootx64.efi and may be named grub.conf
normally the grub efi configuration file is named grub.cfg and is located at
/boot/grub/
either one appears to function,
Each distribution has compiled their version of grub efi not only with different versions of grub but with various options and modules. selecting TAB at the grub command line shows modules that are available to manually load the kernel and initrd.
This is about as far as I've managed to go with booting any kernel. manually loading the kernel, initrd and boot parameters at the grub command line, though have yet to complete the boot process I think due to core not having vesa or the preferred Xfbdev loaded.
However when ever I try to use the grub.cfg file the path gets lost somewhere between set root='(hd0,msdos1)'/boot/core.gz and the kernel boot parameters..
Strange that I can proceed further when entered manually than when using the cfg file..
Have also found that remastering tinycore with core64 and vmlinuz64 is a lot more challenging than I'd like.
-
The uefi boot is finding grub.cfg since it complains about a typo that I made in the file and then proceeds further when I correct it.
Since I'm not getting the "blind boot" message, I've made some progress on the video front, but obviously not as far as seeing error messages once the kernel starts to boot - more trial and error obviously required...
-
So am curious, what is your USB directory structure??
In most documentation I've read on efi and grub booting the recommended structure is
/EFI/BOOT/
/EFI/BOOT/boot.iso
/EFI/BOOT/bootx64.efi
/boot/grub2/grub.cfg
Strange thing is, Ive seen cfg files in several locations and still function. In one distribution (maybe Fedora) they have duplicates in a couple of locations. ie one each in the above structure. Reading the grub info it appears the conf is an old format included perhaps only for rescue mode?? ok I'm done with conf am working only with the new cfg format from now on
Am going to have to read the source more..
-
ok, I think the only thing left is configure, compile, make grub config on the actual efi environment. brb
-
Juanito
you might find this interesting, that is if you don't have it already.. http://www.gnu.org/software/grub/manual/grub.html#Command_002dline-and-menu-entry-commands (http://www.gnu.org/software/grub/manual/grub.html#Command_002dline-and-menu-entry-commands)
-
So am curious, what is your USB directory structure??
/EFI/BOOT/BOOTX64.EFI [grub-efi created BOOTX64.EFI rather than grub.efi as soon as I used gdisk]
/EFI/BOOT/grub/grub.cfg
/EFI/BOOT/grub/x86_64/*mod
/EFI/BOOT/grub/fonts/unicode.pf2
All I did was create /EFI/BOOT, "grub-install" did the rest.
-
According to the manual, the default structure is
/EFI/BOOT/BOOTX64.EFI
/BOOT/grub/grub.img
/BOOT/grub/grub.cfg
/BOOT/grub/x86_64/*mod
/BOOT/grub/fonts.pf2
Having said that, when the grub search feature is enabled I think grub can find any required files. the BOOTX64.EFI file can be built complete with all the cfg, *mod, and img files internally..
Meanwhile, any luck yet??
-
cracked it - and posting from an efi usb stick boot on a dell latitude e6220 8)
The problem might have been that the usb stick had one of those u3 partitions not readily visible to linux - neither u3-tool nor full-fat hdparm wanted to remove it, but I found a windows tool that seems to have done the trick. The problem may also have been that I did not load Xorg-7.6 and graphics-3.0.21-tinycore "onboot" and thus I was not getting any display previously.
Used gdisk to create 2 partitions: $ gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.6.11
l
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 2006673 sectors, 979.8 MiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7CF13D85-1AA7-427F-990C-F31663DCD1F0
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 2006639
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 34 245793 120.0 MiB EF00 EFI System
2 245794 2006639 859.8 MiB 0700 Linux/Windows data
and: $ sudo mkfs.vfat /dev/sdb1
$ sudo mke2fs /dev/sdb2
Used grub from bzr of a few days ago: $ sudo grub-install --target=x86_64-efi --boot-directory=/mnt/sdb1/EFI/BOOT --efi-directory=/mnt/sdb1 --removable..note that this will create /EFI/BOOT and copy files as follows:
/EFI/BOOT/BOOTX64.EFI
/EFI/BOOT/grub/grubenv
/EFI/BOOT/grub/x86_64-efi/*mod
/EFI/BOOT/grub/fonts/unicode.pf2
/EFI/BOOT/grub/locale
Used the following: $ cat /mnt/sdb1/EFI/BOOT/grub/grub.cfg
menuentry "core" {
linux (hd1,gpt2)/boot/vmlinuz quiet noswap tce=sdb2 tz=GMT-4 blacklist=bcma blacklist=ssb blacklist=b43 text
initrd (hd1,gpt2)/boot/core.gz
}
..I didn't bother loading fonts, efi_gop, gfxterm, etc and things still seem to have worked.
In the F2 dell menu, you need to change from legacy (bios) boot to uefi, create a boot entry and navigate to /EFI/BOOT/BOOTX64.EFI - somewhat annoyingly it doesn't seem to remember this across boots...
-
Congrats!!! Good job Buy that man a beer :)
Ok am going to duplicate this and hopefully make an image of the whole package :)
BTW FB driver works in efi mode and is what I've been using on all macs
Interesting partition table, two partitions?? how about one?? like one gpt?
Looks like I've been using the wrong grub version, looking at the directory structure and considering I've entered manually the boot commands manually but getting only as far as loading the initrd which is where the process fails for me..
But hey Great Job Juanito, thanks so much for making progress
-
Hmm - 'doesn't want to boot on the mac mini though :(
On the bright side powering on with the <alt gr> key pressed brings up an icon for a removable efi device and grub-efi starts and accepts commands.
Since videoinfo works, but videotest doesn't work, I'm wondering if there's some kind of video issue that prevents the mac mini usb stick boot.
-
how about the FB
-
I've entered these commands manually at the grub prompt
linux (hd1,gpt2)/boot/vmlinuz
initrd (hd1,gpt2)/boot/core.gz
and got a response like "Loading Kernel"
yet the process seems to hang up after "Loading initrd"
I didn't have any driver though not Xvesa or XFBdev, so maybe that was the problem. Have been meaning to try an older tc version, one before the core so that all components needed to boot were present..
-
Anyhow, I'm going to bed.. good luck Juanito we're hoping you'll crack this some more :)
-
and got a response like "Loading Kernel"
yet the process seems to hang up after "Loading initrd"
I've never managed to get anything echoed to the terminal once the boot process starts, so you're doing better than I am.
I didn't have any driver though not Xvesa or XFBdev, so maybe that was the problem.
The key for me seemed to be loading graphics-3.0.21-tinycore "onboot" so that the terminal switched into kmode - it's only at this point that I see something on the screen again.
Of course, this might be an issue specific to intel hd3000 graphics, which is common both to the dell e6220 and the mac mini.
-
EFI does not have a text mode, bios has the VGA text mode to fall back on. To see an EFI console either use KMS as you found or the VESA framebuffer, vga=792 and so on.
Note that it doesn't matter what resolution you give to the vga argument, the efi fb will be the screen's native resolution anyway.
Also, too bad to hear Dell's EFI doesn't do USB sticks as nicely as Apple's.
-
EFI does not have a text mode, bios has the VGA text mode to fall back on. To see an EFI console either use KMS as you found or the VESA framebuffer, vga=792 and so on.
No amount of messing around seems to fix this - I'm wondering if some obscure setpci command is required to get the video going...
Also, too bad to hear Dell's EFI doesn't do USB sticks as nicely as Apple's.
I spoke too soon, it remembers the uefi setting now - even when I switch to bios mode and back again :)
-
You still had to add an entry, as it's a removable device it should just be shown in a list if it's there, just like in most bioses.
-
now that I think about it, I remember trying to boot a remaster which included XFBdev extension, however I don't believe I entered the vge=791 boot option that i normally use with it..
Will have to give this a try asap
-
What's puzzling me is that I'm using the same usb stick for both laptop and mac.
Since the laptop boots from the usb stick (albeit with uefi v2.x), you'd think the mac would boot from the same usb stick (albeit with efi v1.x).
I edit grub.cfg once booted to the grub prompt on the mac to allow for the fact that the mac finds the usb stick at (hd2,gpt1) instead of (hd1,gpt1) on the laptop, but everything else should be the same.
Both laptop and mac have intel hd3000 graphics, so you'd think that when graphics-3.0.21-tinycore loads "onboot" on the mac, messages would become visible again on the screen as they do on the laptop.
Without anything to go on, I'm assuming the mac boot doesn't get as far as loading extensions - using vga=792 (or similar) does not change anything - but I have no way of knowing for sure...
-
Well, I of course attempted to boot vmlinuz + core.gz remastered with the frame buffer driver using the boot code vga=791, no change.. :( Still hangs without any way of establishing why, no log's or onscreen indication.
I find it easier to boot grub2 without a config file and enter the commands manually at the grub command line.
I'm still working on creating a bootable efi aware cd image of core, bootable by grub2. If Ubuntu and Mint can be successful 100% of the time, I mean neither ever fail to boot, you'd think we too should be able to accomplish this small task.
-
Am reading about the race condition, and UGA resolution. Are either of these a factor.? I have a feeling that only a new kernel is going to fix this lock up at boot.
-
Are you trying to boot on a mac or a pc?
As mentioned earlier, I have efi boot working on a pc, but not on a mac.
On the mac mini (which uses 64bit efi), I get two results:
usb stick: boots to grub and then I get a blank screen when booting the kernel
hd: boots to grub and then to X, but usb keyboard/mouse do not work.
The usb stick is the same one that boots using uefi on the pc, the hd is the same one that boots without problems using rEFIt/grub legacy.
I'm using the latest mac mini firmware.
-
At this time am only interested in booting a Mac with tinycore from a USB stick, whether there is a internal drive installed on the mac itself is of no importance. To make file editing easier I sometimes connect a drive with OSX 10.7.4 installed on it. Having said that, it's only a question of time before all new pc's use EFI, I would say at least withing two years.
Strange thing, one day I accidentally grabbed the wrong drive and connected it to the macbook, on start it booted up into Windows 7 immediately without any issue on the macbook, next time I looked the system was loading new drivers (the drive had been temporarily removed from a windows pc.. ) lol
Anyhow, back to core.. is there a way to verify that linux has been compiled with the efi flag ?
As an experiment, I installed rEFIt to a USBstick with tc and elilo.efi, which at least loads vmlinuz and core.gz but crashes then promptly reboots before I can figure out why.
update, having better success with vmlinuz64 & core64.gz but still no cigar
-
Some incremental progress in that this allows the usb stick tc boot partition to be found automatically on both laptop and mac mini (where the uuid is the partition id).
search --no-floppy --fs-uuid --set=root e94de7a3-149b-4554-bc02-6129467534a9
menuentry "core" {
linux /boot/vmlinuz quiet noswap tce=UUID=e94de7a3-149b-4554-bc02-6129467534a9 tz=GMT-4 host=boxdell blacklist=bcma blacklist=ssb blacklist=b43 text
initrd /boot/core.gz
}
..but no progress in booting the mac mini (and the results are the same with core/core64)
-
Anyhow, back to core.. is there a way to verify that linux has been compiled with the efi flag ?
The config files are at release/src/kernel at any mirror. CONFIG_EFI is indeed disabled, rather curious how it didn't affect my booting.
edit: Maybe the grub2 config file/bootx64.efi included fakebios. Can't remember.
-
I've tried "fakebios" without any positive result on the mac and plan to try kernel boot codes "noefi" and "add_efi_memmap" next chance I get.
Is your mac efi 32bit or 64bit (mine is 64bit)? I saw a couple of comments implying that only pure 64bit distros would work on some 64bit efi macs - however, both core and core64 work on the 64bit uefi laptop.
-
I think it's 64, since I used bootx64.efi - isn't the 32-bit one named differently?
-
Having said that, it's only a question of time before all new pc's use EFI, I would say at least withing two years.
Most systems I've seen made in the last 1-2 years are uEFI capable.
-
ioreg -l -p IODeviceTree | grep firmware-abi
..from a mac terminal will show it, but yes, the 32bit one is BOOTIA32.EFI
-
Since the laptop boots from the usb stick (albeit with uefi v2.x), you'd think the mac would boot from the same usb stick (albeit with efi v1.x).
If I recall correctly, they are quite different in certain aspects, hence the name and major version change. From what I remember, EFI left too much up to the implementer to fudge with while uEFI "leveled the playing field" by ensuring consistency.
-
Juanito, LABEL's should work just as good and will be more flexible then UUID's I believe (well am hoping we don't need to go either of those routes). Some efi boot loaders use the find function to overcome this.
elilo has pre-built binaries available, this just need renaming bootx64.efi and works well, except with tc's initrd.
I have found that Installing the boot loader at (USB_Stick)/EFI/BOOT/BOOTX64.EFI on a gpt partition formatted with either FAT or HFS+ (while Fat32 is not case sensitive capitalization is a wise fall back method), the obscure Apple efi will list the USB as a choice to boot without needing for either rEFIt or refind, Bless or anything else. Place the USB stick in the mac and hold "Option Key" during boot.
Grup is expected in (USB_Stick)/BOOT/GRUB/grub.efi but with refind installed to the USB stick it will find any kernel or boot loader no matter how deep you bury it (within reason). Additionally, refind will boot the linux kernel directly (without any boot loader required) as long as the kernel has been compiled with the efi stub enabled (I think available only from 3.3..0 onwards whilst kernels since 2.6.34 which are efi aware will need a boot loader apparently).
I have yet to boot tc from a USB stick on a UEFI mac despite having all these tools and options available. :(
I did find an interesting distro which after extracting to the gpt/FAT32 USB stick booted immediately on my mac, and has some very interesting cfg file(s) ( check out grml small )
Am not 100% sure but the issue appears to be related to extracting the file system to memory. So am wondering if we can specify the starting location for creation of the ram disk in memory?
-
Not wanting to jump the gun here,, but I think we have a solution :) the noefi boot option allowed both the kernel and initrd to finish loading without crashing. Working on fixing the black video now.
Hav installed to the USB stick
refind
grub 1.99-21
core
core64
vmlinuz
vmlinuz64
-
So - despairing of ever finding a way to make this work, I recompiled the core64 kernel with only the following changes:
CONFIG_EFI=y
CONFIG_FB_EFI=y
CONFIG_EFI_VARS=y
CONFIG_EFI_PARTITION=y
..and the mac mini boots from power-on <alt gr> and I get a display, usb keyboard/mouse and (icing on the cake) the ahci driver loads automatically 8)
From dmesg: BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000008e000 (usable)
BIOS-e820: 000000000008e000 - 0000000000090000 (reserved)
...
BIOS-e820: 0000000100000000 - 000000026fe00000 (usable)
NX (Execute Disable) protection: active
EFI v1.10 by Apple
ACPI=0x8ad8e000 ACPI 2.0=0x8ad8e014 SMBIOS=0x8ad3b000
Kernel-defined memdesc doesn't match the one from EFI!
EFI: mem00: type=7, attr=0x80000000000000f, range=[0x0000000000000000-0x000000000008e000) (0MB)
EFI: mem01: type=0, attr=0x80000000000000f, range=[0x000000000008e000-0x0000000000090000) (0MB)
EFI: mem02: type=7, attr=0x80000000000000f, range=[0x0000000000090000-0x00000000000a0000) (0MB)
EFI: mem03: type=2, attr=0xf, range=[0x0000000000100000-0x0000000000d1f000) (12MB)
...
EFI: mem304: type=11, attr=0x8000000000000000, range=[0x00000000ffed0000-0x00000000fff00000) (0MB)
DMI 2.4 present.
DMI: Apple Inc. Macmini5,3/Mac-7BA5B2794B2CDB12, BIOS MM51.88Z.0077.B10.1201241549 01/24/2012
e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
...
efifb: probing for efifb
efifb: framebuffer at 0x91000000, mapped to 0xffffc90009e00000, using 5120k, total 5120k
efifb: mode is 1280x1024x32, linelength=5120, pages=1
efifb: scrolling: redraw
efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
Console: switching to colour frame buffer device 160x64
fb0: EFI VGA frame buffer device
...
EFI Variables Facility v0.08 2004-May-17
...
fb: conflicting fb hw usage inteldrmfb vs EFI VGA - removing generic driver
fbcon: inteldrmfb (fb1) is primary device
fbcon: Remapping primary device, fb1, to tty 1-63
fb1: inteldrmfb frame buffer device
drm: registered panic notifier
input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input12
ACPI: Video Device [IGPU] (multi-head: yes rom: no post: no)
[drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
So far everything seems to be working - I still need to mess with HDA Analyser to get sound line out, but otherwise OK.
-
To summarise:
Dell Latitude E6220 UEFI: EFI v2.00 by American Megatrends
ACPI 2.0=0xdffff98 SMBIOS=0xc8846f98 ..will boot both stock and efi modified tinycore kernel from usb stick (hd not tested as ntfs)
Apple Mac Mini EFI: EFI v1.10 by Apple
ACPI=0x8ad8e000 ACPI 2.0=0x8ad8e014 SMBIOS=0x8ad3b000..will boot efi modified tinycore kernel from hd and usb stick
All tests using grub from bzr 20-Jun-12 (grub2~beta6)
Compiled with: ./configure --prefix=/usr/local --with-platform=efi --target=x86_64
..and installed with: $ sudo x86_64-grub-install --target=x86_64-efi --boot-directory=/mnt/sdb1/EFI/BOOT --efi-directory=/mnt/sdb1 --removable
grub.cfg as follows: $ cat /mnt/sdb1/EFI/BOOT/grub/grub.cfg
search --no-floppy --fs-uuid --set=root e94de7a3-149b-4554-bc02-6129467534a9
menuentry "core64" {
linux /boot/vmlinuz64 quiet noswap waitusb=10 tce=sdb2 tz=GMT-4 host=boxdell blacklist=bcma blacklist=ssb blacklist=b43
initrd /boot/core64.gz
}
usb stick partitioned using gdisk:
partition 1: ef00 efi system formatted vfat
partition 2: 0700 linux/windows data formatted ext2
-
Finally, Juanito cracked it!!!! Great job, 8)
-
Hav installed to the USB stick
refind
grub 1.99-21
core
core64
vmlinuz
vmlinuz64
On the mac (with 64bit efi) neither the stock nor efi modified tinycore 32bit kernels will boot. The stock 64bit kernel will not boot, but the efi modified 64bit kernel does boot.
On the dell (with 64bit uefi), all four 32bit/64bit stock/efi modified kernels will boot, but only the 64bit efi modified kernel shows "Kernel-defined memdesc doesn't match the one from EFI!" and efifb messages in dmesg.
The above makes me wonder if the dell uefi boot "fakes" a bios for a non-efi kernel and/or non 64bit kernel.
So you finally got the usb stick boot to work then?
-
No I didn't :( I managed only to load the kernels and initrd without crashing but that's as far as I have manged to get with core. However I believe I can loop mount the 32 bit and x64 ISO, just need more time. The grub version I've listed above appears to be compatible, It's clear we need an efi configured kernel, I believe those from 2.6.35 (?) and up are good, I was contemplating getting a new kernel and attempt to build it with efi stub loader support to discard grub entirely, you know that is coming..
If you have compiled a 64 bit kernel with standard core configuration + efi from 3.0.21 then we'd be really grateful for a copy ;D
Or are there plans to upload the new x64 kernel supporting efi to the core download site ??
I never had any doubt about booting tinycore after the kernel from grml64 with it's ramdisk copied to a USB just booted up with the minimal grub configuration, of course was using refind as a boot manager and grug 1.99-21 for the boot loader. In fact I'm really content with refind as a boot manager, am thinking about a custom gui for it already.
-
No I didn't :( I managed only to load the kernels and initrd without crashing but that's as far as I have manged to get with core.
How do you know - unless you're using ssh from another machine?
Without efifb enabled in the tinycore kernel, I'd have thought you'd get a blank screen from the time you boot from the grub-efi prompt until graphics-3.0.21-tinycore64 loads "onboot"...
-
Well there is always the headless connection approach thanks, I was thinking next plan was to insmod the video modules and fonts.
via this handy script
insmod efi_gop
insmod efi_uga
insmod font
if loadfont ${prefix}/unicode.pf2
then
insmod gfxterm
set gfxmode=auto
set gfxpayload=keep
terminal_output gfxterm
fi
Though iirc you had gone that route earlier without any success, it's still an option though I guess.
Am really liking the idea of loop booting the ISO meanwhile I have work to do lol
:)
-
And Juanito thanks for persevering, I know this has been a lot of hard work Am glad you made headway, it is greatly appreciated
You deserve a beer or two :)
-
via this handy script
If grub-efi is installed as mentioned below, this is enough to switch the grub-efi display
loadfont unicode
insmod efi_gop
set gfxterm=auto
terminal_output gfxterm
..but, in my testing at least, on booting the kernel, the display will be blank without efifb enabled until graphics-3.0.21-tinycore64 loads.
When efifb is enabled in the kernel, then the tinycore image and boot messages appear
..such as: irq17: nobody cared (try booting with the "irqpoll" option)
handles:
[<ffffffffa001d105>] ffffffffa001d105
Disabling IRQ #17..but things still seem to work
-
Thanks to Juanito for recompiling the linux 64 bit kernel we now have a solution to booting efi, Huge thanks to Juanito.
My working EFI USB frugal configuration uses rEFInd and Grub2 with Core64 + vmlinuz64 (Juanito modded version). I can make an image, copy to any USB and boot efi based mac's (and possibly pc's). no matter what drive configuration exists.
Now I really appreciate the use of Label's. Never thought I'd need to but without a label on the USB file system Core would never find the tce directory during boot. That is unless I renamed tce to cde (but I think that has some drawbacks).
USB is GPT partitioned and formatted with FAT32
USB Directory structure:
/EFI/
/EFI/BOOT/
/EFI/BOOT/BOOTX64.EFI
/EFI/BOOT/grub64.EFI
/EFI/BOOT/refind.conf
/EFI/BOOT/icons/(icon's)
/EFIBOOT/linux64/(core kernel)
/boot/grub/
/boot/grub/(all grub module's)
/boot/grub/grub.cfg
/tce/
/tce/mydata.tgz
/tce/onboot.lst
/tce/xwbar.lst
/tce/ondemand/
/tce/optional/(all.tcz's)
Configuration file : refind.conf
timeout 30
#textonly
scan_driver_dirs EFI/tools/drivers,drivers
scanfor internal,external,optical,manual,cd,bio.ternal
also_scan_dirs boot,EFI
scan_all_linux_kernels
maxtags=0
default_selection 1
# Minimal Grub entry
menuentry "MYTOOLS" {
icon EFI/boot/icons/os_linux.icns
label="LINUX"
loader /EFI/boot/grub64.efi
}
Configuration file : grub.conf
# grub2 configuration
loadfont unicode
insmod part_apple
insmod part_bsd
insmod part_gpt
insmod part_msdos
insmod search
insmod all_video
insmod gfxterm
set gfxmode=640x480x32
set gfxpayload=1024x768x32
terminal_output gfxterm
insmod fixvideo
#Timeout for menu
set default=0
set timeout=10
#search --no-floppy --fs-LABEL --set=root LINUX
#FrameBuffer Menu Entry
menuentry " EFI Desktop Mode " {
linux /boot/linux64/vmlinuz64 quiet tce=LABEL=<MyDriveLabel> vga=792 waitusb=10 noswap tz=GMT blacklist=bcma blacklist=ssb blacklist=b43
initrd /boot/linux64/core64.gz
}
#Text Mode Menu Entry
menuentry "EFI Text Mode (Recovery) " {
linux /boot/linux64/vmlinuz64 quiet tce=LABEL=<MyDriveLabel> vga=792 waitusb=10 noswap text tz=GMT blacklist=bcma blacklist=ssb blacklist=b43
initrd /boot/linux64/core64.gz
}
I had renamed the modded linux kernel to vmlinuz64 due to testing with ELILO boot loader (which was unsuccessful.
My only weird issue remaining is that colors displayed on a MACbook screen are currently switched/inverted if you like. ie: Red is displayed as Blue, Yellow is Cyan and Blue is some kind of dirty Red, which can make for some memories of psychedelic days! The video adapter / driver is displaying the correct colors as shown in a screenshot (or aiui another monitor out).
I think this is due to Grub2 v1.99-21 being compiled on a PC instead of a MAC. Am going to recompile, then try again., heck I might even try Grub2 EFIv2.0 ?
-
My working EFI USB frugal configuration uses rEFInd and Grub2 with Core64 + vmlinuz64
Is rEFInd required?
I think this is due to Grub2 v1.99-21 being compiled on a PC instead of a MAC. Am going to recompile, then try again., heck I might even try Grub2 EFIv2.0 ?
I think it's more likely the latest version of grub that's required :)
-
No it's not required. rEFInd's installation amounts to it's img and config files be copied to the efi/boot directory on the USB stick. It's really just a manager, but definitely a reliable extension of Apples efi adding dynamic menus to a stubborn Apple. Whether it ends up in the final build I couldn't say. I think I'm going to take my USB sticks down to the local store and try booting a few MACBOOKS's with them, see which one (with rEFInd and without) comes out on top. Need more apple stores :D
Yes I do believe you're right about the monitor colors being skewed. The hardware info being passed for boot loader to kernel was skewed, that's how i see it. Though I experimented again (unsuccessfully with ELILO) which appeared to have other issues besides color distortion.
Have been creating a build system, a spare SSD I had lying around for nothing more than building on this macbook. Needed to get a match on the architectures of all components involved. I think I have got it down despite much use of " make distclean "
-
BTW, do we really need ZFS support when compiling grub2??
-
BTW, do we really need ZFS support when compiling grub2??
No :)
-
Thanks, I couldn't believe we'd need this file system support but was concerned of possible errors in the compile process without it..?
Anyhow I found ZFS and ZFS info, so build and installed those modules just in case..
-
Meanwhile building the nightly GRUB2 BZR is not going so well. Each bzr reports missing files, like (vga_common.c) errors during make often referenced potfile update.
Am finding that the pot files just needed to be regenerated.. ::)
find . -name '*.c' -print | sort > po/POTFILES.in
ok that worked, time to start over.
-
ok am back to square one finally. Almost a week of compiling different versions of grub2 (inc bzr latest) on various build systems (OS's) on a macbook 5,1
I still have monitor detection issues :( symptoms manifest themselves as a reversal of colors as previously mentioned; ie red is displayed as blue, blue displayed as red, cyan displayed as yellow etc etc but otherwise perfect (not counting lack of mac wireless support of course).
The monitor detection is an issue only with x86_64 builds but not with i386 builds, neither is it an issue when checking screenshots which all displayed correct colors despite what appeared on the monitor.
All tests used (and am still using) the Frame buffer drivers, both in grub2 and tinycore. Am unable to make Xorg drivers work but have only attempted in confless mode which thats ok due to their size and I don't need a permanent 24/7 operation from this build so Xfbdev works great for my needs thanks.
Seems like there is a hurdle to jump around every corner and there are so many corners in building the grub2, though the biggest issue was rebuilding the language support in the bzr version which was resolved as in previous post. Next big issue for me was the confusion of building and installing for another drive (USB) on a system using a different version of grub. The remedy for most of my troubles was build on a machine using the same architecture ie same machine for the intended use, though building in an environment which already booted into full efi mode helped it seems, though clearly is not that critical. For my current build system I installed ubuntu 12.04 x86_64 for this which presented it's own set of problems. When all said and done these were mostly a path issue, so I'd like to try again using a tinycore build system soon.
sudo ./grub-install -v
grub-install (GRUB) 2.00currently have built and am using the above grub version ( I thought it was the latest bzr..)
on a macbook 5,1 from a USB booting the modded vmlinuz64 kernel with core64 in EFI mode. A different directory structure than previous post (will update that asap).
configure and make commands as Juanito used more or less.. Install success only with my variation of the command issued from grub2 build directory
sudo ./grub-install --root-directory=/media/<MountedDriveLabel> --no-floppy --recheck --force
Undoubtedly the most important and useful command for my level of experience in this project was
./configure --help
;D
Thanks again to Juanito for building the modded vmlinuz64 without which booting in efi mode would not have been possible.
-
Oh yes, and if we remove video drivers like efi_gop and similar dependencies (of all_video) we can add instead " insmod all_video " to the grub.cfg file then videotest and info modes work fine.
:D
-
Juanito, in the end I didn't use rEFInd and had the opportunity to test the tinycore USB toolbox on these new mac's
MacBookPro 9,2 13" (2011)
MacBookPro 9,1 15" (2011)
MacBookPro 10,1. (2012) New macbookpro with retna display and dual video cards ;D
iMac 10,2 iirc (2011) with ATI video and Bluetooth magic mouse
and of course my own macbook
MacBook5,1 13" (2008)
The EFI modded USB bootloader booted all the machines tested immediately with the "Alt" key.
Only two small issues,
one with the monitor detection with my macbook5,1 which still leads to color reversion,
and another with the MacBookPro9,2 (2011) which had issues booting with a mouse or keyboard. need to investigate that more.
I'd say Grub 2.0 installed to a USB stick is a success ;)
-
I'd say Grub 2.0 installed to a USB stick is a success
'Good to hear :)
-
Never could fix the monitor detection with my macbook5,1 which still boots with severe color distortion/reversion, output from the graphics card is correct as validated by a screenshot which depicts true colors, it's just the monitor whose colors are reversed (ie: blue is shown as red, red is shown as blue etc etc).. I am not alone with this obscure color distortion as other similar mac models show the same phenomena with fbdev
Have so far been unsuccessful in installing any version of Xorg with intent to provide better graphics and trackpad support. In all attempts have used confless I must be missing something..?
-
The only problem I have with the mac mini is most likely due to the hdmi -> dvi adapter (oem supplied) that I'm using to connect to my monitor.
The display is fine colour-wise, but I cannot set the dpi and thus most gtk2 windows are too big.
-
Never could fix the monitor detection with my macbook5,1 which still boots with severe color distortion/reversion, output from the graphics card is correct as validated by a screenshot which depicts true colors, it's just the monitor whose colors are reversed (ie: blue is shown as red, red is shown as blue etc etc).. I am not alone with this obscure color distortion as other similar mac models show the same phenomena with fbdev
Have so far been unsuccessful in installing any version of Xorg with intent to provide better graphics and trackpad support. In all attempts have used confless I must be missing something..?
Have you looked into "xgamma" as a rudimentary workaround?
-
Well actually no have not.. thx I'll take a look
-
I would really like to get TinyCore to boot from a flash drive on my iMac (x86_64) but I've been having some trouble with GRUB2. I installed GRUB 1.99 and tried grub.cfg files similar to what you guys tried. The boot process keeps getting to the GRUB command line but refuses to load the linux kernel after that. The files are:
/boot/core64.gz
/boot/vmlinuz64
EFI/BOOT/boot.iso #boot.iso is a TinyCore.iso file
EFI/BOOT/bootX64.efi
EFI/BOOT/grub/grub-x86_64/* #*.mod + everything else
EFI/BOOT/grub/grub.cfg
(can't do 'code' brackets yet sorry)
$ sudo grub-install --target=x86_64-efi --boot-directory=/mnt/sdb1/EFI/BOOT --efi-directory=/mnt/sdb1 --removable
How did this command work? Some of the options ("--target=x86_64-efi", "--efi-directory=/mnt/sdb1" and "--removable") were not valid arguments. I checked man grub-install, ./configure --help, and the GRUB2 manual but I didn't see anything.
linux (hd1,gpt2)/boot/vmlinuz64
With this command (and any other disk/partition I try) GRUB cannot locate the kernel file. I might try reinstalling the latest GRUB2. The vmlinuz64 3.0.3 patched kernel seemed to work thanks to the EFI .config commands posted earlier :)
Do you guys have any tips for the GRUB install, grub.cfg, or anything else?
-
$ sudo grub-install --target=x86_64-efi --boot-directory=/mnt/sdb1/EFI/BOOT --efi-directory=/mnt/sdb1 --removable
How did this command work? Some of the options ("--target=x86_64-efi", "--efi-directory=/mnt/sdb1" and "--removable") were not valid arguments.
I believe you need at least grub-2.00 - I think I used grub-2.00-beta-6
-
hi boot TC thru a grub2 version 1.99-23 onto a 32 bit TC but have normal msdos partitions sorry.
You may be interested in some other wikis?
https://wiki.archlinux.org/index.php/GRUB2#Install_to_UEFI_SYSTEM_PARTITION
https://help.ubuntu.com/community/UEFIBooting
http://wiki.gentoo.org/wiki/GRUB2
in particular
Note: To do this, you need to boot using UEFI and not the BIOS. If you booted by just copying the ISO file to the USB drive, you will need to follow this guide or grub-install will show errors
and that link takes you to
https://wiki.archlinux.org/index.php/UEFI#Create_UEFI_bootable_USB_from_ISO
hope that helps someone, because one day UEFI is going bite me as well
-
To boot a 32bit EFI you'll need to compile a 32bit GRUB 2
To boot a 64bit architecture, you'll need to compile a 64 bit GRUB 2, additionally use the modded 64bit 3.0.21 kernel with EFI support, which Juanito kindly compiled for us, and core64
-
"modded 64bit 3.0.21 kernel with EFI support, which Juanito kindly compiled for us, and core64"
Hello Juanito or Coreplayer2, how can I obtain the modded 64bit 3.021 kernel with EFI support?
I would like to make a usb drive that will boot Tiny Core on the majority of intel mac computers and then try to get nwipe to work with Tiny Core.
-
I can't boot ANY thing off of usb, but most of the distros I've tried work off of cd, not all distros though. Tinycore off of cd works for me, but not ubuntu (it freezes at boot).
I had to change security settings in bios (UEFI) though.
-
I found a very informative UEFI with linux article from a commercial linux magazine online
if interested google and take the first hit
Coping with the UEFI Boot Process
-
tinycore-5.x update
The tinycore-5.x kernel supports (u)efi boot without the need for any kernel modifications.
An example corepure64 grub-2 config for a usb stick that boots on both pc and mac might look like this: 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
}
menuentry "corepure64_base" {
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 base norestore
initrd /boot/rootfs64.gz /boot/modules64.gz
}
Note:
* The first four lines are required if you need a screen display between choosing a "menuentry" <cr> and the graphics-KERNEL extension loading.
* The UUID is the linux partition containing the tce folder.
* The above config works with both pc and mac 64-bit (u)efi without modification.
* Use "corepure64_base" to perform e2fsck and then "sudo tce-setup" to load tinycore.
* Substitute "rootfs.gz" for rootfs64.gz for a core64 installation.