WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: UEFI Boot  (Read 95582 times)

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: UEFI Boot
« Reply #60 on: July 06, 2012, 01:06:40 AM »
My working EFI USB frugal configuration uses rEFInd and Grub2 with Core64 + vmlinuz64
Is rEFInd required?

Quote
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  :)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: UEFI Boot
« Reply #61 on: July 06, 2012, 02:25:30 AM »
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 "


 

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: UEFI Boot
« Reply #62 on: July 06, 2012, 02:29:32 AM »
BTW, do we really need ZFS support when compiling grub2??

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: UEFI Boot
« Reply #63 on: July 06, 2012, 03:07:55 AM »
BTW, do we really need ZFS support when compiling grub2??

No  :)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: UEFI Boot
« Reply #64 on: July 08, 2012, 04:07:31 AM »
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..








« Last Edit: July 08, 2012, 04:33:41 AM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: UEFI Boot
« Reply #65 on: July 08, 2012, 04:33:14 AM »
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.
« Last Edit: July 08, 2012, 01:02:26 PM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: UEFI Boot
« Reply #66 on: July 09, 2012, 03:32:01 PM »
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.

Code: [Select]
sudo ./grub-install -v
grub-install (GRUB) 2.00
currently 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
Code: [Select]
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
Code: [Select]
./configure --help 
 ;D

Thanks again to  Juanito for building the modded vmlinuz64 without which booting in efi mode would not have been possible.

« Last Edit: July 10, 2012, 02:58:13 AM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: UEFI Boot
« Reply #67 on: July 09, 2012, 04:18:39 PM »
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

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: UEFI Boot
« Reply #68 on: July 10, 2012, 11:41:47 PM »
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 ;)


« Last Edit: September 21, 2012, 10:49:37 PM by coreplayer2 »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: UEFI Boot
« Reply #69 on: July 11, 2012, 08:30:31 AM »
I'd say Grub 2.0 installed to a USB stick is a success

'Good to hear :)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: UEFI Boot
« Reply #70 on: September 21, 2012, 11:01:39 PM »
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..?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: UEFI Boot
« Reply #71 on: September 22, 2012, 01:29:00 AM »
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.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: UEFI Boot
« Reply #72 on: September 22, 2012, 02:31:44 AM »
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?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: UEFI Boot
« Reply #73 on: September 22, 2012, 03:05:31 AM »
Well actually no have not..   thx I'll take a look

Offline greenyouse

  • Newbie
  • *
  • Posts: 1
Re: UEFI Boot
« Reply #74 on: October 11, 2012, 02:31:40 AM »
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)
Quote
$ 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?