个人工具

“UbuntuHelp:MactelSupportTeam/EFI-Boot-Mactel”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(创建新页面为 '{{From|https://help.ubuntu.com/community/MactelSupportTeam/EFI-Boot-Mactel}} {{Languages|UbuntuHelp:MactelSupportTeam/EFI-Boot-Mactel}} == Introduction == This page will attempt...')
 
 
第5行: 第5行:
 
== Non-Working Hardware ==
 
== Non-Working Hardware ==
 
Because there are several unknowns about Apple's implementation of EFI, there are some things that do not yet work correctly.
 
Because there are several unknowns about Apple's implementation of EFI, there are some things that do not yet work correctly.
<ol><li>Your graphics are limited to using the framebuffer. This means no 3D Acceleration, no pretty desktop effects. (This is being worked on)
+
<ol><li>Your graphics may be limited to using the xorg fbdev driver (framebuffer) . This means no 3D Acceleration. But 3d accel with efi does work on Macs with intel graphics and intel driver, and with radeon chips with ATI fglrx in ubuntu 810 but not later, but not so far with nvida graphics.</li></ol>
</li><li>Item 2
+
</li><li>Item 3</li></ol>
+
  
 
== Basic Installation Procedure ==
 
== Basic Installation Procedure ==
第19行: 第17行:
 
== Getting GRUB2 EFI ==
 
== Getting GRUB2 EFI ==
 
Some sections may just contain a list of links. It is sometimes useful to include a short explanation of what the links are for. For example: 'Ubuntu includes the following Internet applications by default.'
 
Some sections may just contain a list of links. It is sometimes useful to include a short explanation of what the links are for. For example: 'Ubuntu includes the following Internet applications by default.'
=== Binaries ===
+
=== Binaries, debs ===
You can download Binaries from the latest revision of GRUB2 here.
+
As at June 2009, the latest ubuntu and debian grub-efi packages (depends  grub-common) have all the recent patches and tweaks for Apple Intel Macs, and the packages can be simply installed in linux, then using gru-mkimage and slected modules, create grub.efi.
 +
The grub-install utility needs some further changes to be useful on Apple as it assumes the use of a FAT EFI boot partition.
 +
You can apt-get install grub-efi in ubuntu karmic or debian sid but earlier versions are no good, download the debs fromn the packages.ubuntu.com or debian.
 
=== Compiling ===
 
=== Compiling ===
 +
Should not be necessary unless you want to hack the code.
 
==== Prerequisite Software ====
 
==== Prerequisite Software ====
 
<pre><nowiki>
 
<pre><nowiki>
sudo apt-get install build-essential subversion gcc-multilibs bison ruby autoconf
+
sudo apt-get install build-essential subversion gcc-multilib bison ruby autoconf
 
</nowiki></pre>
 
</nowiki></pre>
 
==== Checkout the Subversion Source ====
 
==== Checkout the Subversion Source ====
第31行: 第32行:
 
</nowiki></pre>
 
</nowiki></pre>
 
==== Compiling ====
 
==== Compiling ====
 +
<code><nowiki>cd grub2</nowiki></code> <<BR>>
 
<code><nowiki>./autogen.sh</nowiki></code> <<BR>>
 
<code><nowiki>./autogen.sh</nowiki></code> <<BR>>
 
<code><nowiki>./configure --with-platform=efi</nowiki></code> <<BR>>
 
<code><nowiki>./configure --with-platform=efi</nowiki></code> <<BR>>
 
<code><nowiki>make</nowiki></code> <<BR>>
 
<code><nowiki>make</nowiki></code> <<BR>>
<code><nowiki>./mk-grub-image</nowiki></code> <<BR>>
+
<code><nowiki>./grub-mkimage --help</nowiki></code> <<BR>>
<code><nowiki>cp</nowiki></code>
+
=== GRUB2 and Grub.cfg ===
=== Grub.cfg ===
+
Grub2 is the source for grub.efi and the grub-efi package. It is also the source for grub-common,  grub-pc, and grub-ieee1275, and the common features include the grub.cfg menu which replaces the old menu.lst for grub1, and has many new features. These generic GRUB2 aspects are described in the recent GRUB2 ubuntu-wiki page , refer to it for basics.  
The file format for the grub menu configuration has changed in GRUB2, and GRUB2 can be very picky about extra characters and small errors, and doesn't give very detailed errors about the problem.
+
<code><nowiki> https://wiki.ubuntu.com/Grub2  </nowiki></code>
==== Partition Notation ====
+
Note: if using a CD, refer to the [[UbuntuHelp:MactelSupportTeam/EFI-Boot-Mactel#rEFIt|rEFIt|section]] for proper partition notation.  
+
Legacy GRUB starting counting both disks and partitions starting with zero. GRUB2 counts disks from zero, but partitions start at one.
+
First disk = (hd0) <<BR>>
+
First Partition on First Disk = (hd0,1) <<BR>>
+
==== OS Entry Format and important kernel options ====
+
==== Example Config File ====
+
[[UbuntuHelp:attachment:grub.cfg|This]] is an example of a grub2 config file.
+
 
=== Installing grub.efi ===
 
=== Installing grub.efi ===
 
==== Locations ====
 
==== Locations ====
 
On the OSX partition or on another hfsplus (Macos Extended) partition.
 
On the OSX partition or on another hfsplus (Macos Extended) partition.
 
Also on a FAT32 partition if using rEFIt.
 
Also on a FAT32 partition if using rEFIt.
 +
There are 3 grub.efi shown here to illustrate the 3 locations, not normally a good idea.
 
https://help.ubuntu.com/community/MactelSupportTeam/EFI-Boot-Mactel?action=AttachFile&do=get&target=grubfiles.png
 
https://help.ubuntu.com/community/MactelSupportTeam/EFI-Boot-Mactel?action=AttachFile&do=get&target=grubfiles.png
 
== Other OS Tweaks ==
 
== Other OS Tweaks ==

2009年11月17日 (二) 19:54的最新版本

Introduction

This page will attempt to document the status and procedure for booting Ubuntu Linux via EFI on Intel-Based Macintosh Computers (mactels). This is highly experimental and very different from the current recommended method of installation on a Mac. (See the [MactelSupportTeam/AppleIntelInstallation] Page). If you are interested in trying out something new, and is more native to how your Mac operates, please proceed. If you are looking to install a stable, reliable system, this is probably not for you.

Non-Working Hardware

Because there are several unknowns about Apple's implementation of EFI, there are some things that do not yet work correctly.

  1. Your graphics may be limited to using the xorg fbdev driver (framebuffer) . This means no 3D Acceleration. But 3d accel with efi does work on Macs with intel graphics and intel driver, and with radeon chips with ATI fglrx in ubuntu 810 but not later, but not so far with nvida graphics.

Basic Installation Procedure

The basic installation of Ubuntu is not really different from installing on any other Mac, but there is some software that you really need in addition in order to boot via EFI.

rEFIt

Both a CD install of rEFIt and a local install on the Mac OS partition will work. However, The CD install will shift the device identifier (ie. (hd1,1) instead of (hd0,1) and sdb1 instead of sda1) due to the way that the apple boot loader orders devices.

Installing Ubuntu

https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=warning2.pngNOTE ON EXTERNAL HARD DRIVES:

Getting GRUB2 EFI

Some sections may just contain a list of links. It is sometimes useful to include a short explanation of what the links are for. For example: 'Ubuntu includes the following Internet applications by default.'

Binaries, debs

As at June 2009, the latest ubuntu and debian grub-efi packages (depends grub-common) have all the recent patches and tweaks for Apple Intel Macs, and the packages can be simply installed in linux, then using gru-mkimage and slected modules, create grub.efi. The grub-install utility needs some further changes to be useful on Apple as it assumes the use of a FAT EFI boot partition. You can apt-get install grub-efi in ubuntu karmic or debian sid but earlier versions are no good, download the debs fromn the packages.ubuntu.com or debian.

Compiling

Should not be necessary unless you want to hack the code.

Prerequisite Software

sudo apt-get install build-essential subversion gcc-multilib bison ruby autoconf

Checkout the Subversion Source

svn co svn://svn.sv.gnu.org/grub/trunk/grub2

Compiling

cd grub2 <
> ./autogen.sh <
> ./configure --with-platform=efi <
> make <
> ./grub-mkimage --help <
>

GRUB2 and Grub.cfg

Grub2 is the source for grub.efi and the grub-efi package. It is also the source for grub-common, grub-pc, and grub-ieee1275, and the common features include the grub.cfg menu which replaces the old menu.lst for grub1, and has many new features. These generic GRUB2 aspects are described in the recent GRUB2 ubuntu-wiki page , refer to it for basics. https://wiki.ubuntu.com/Grub2

Installing grub.efi

Locations

On the OSX partition or on another hfsplus (Macos Extended) partition. Also on a FAT32 partition if using rEFIt. There are 3 grub.efi shown here to illustrate the 3 locations, not normally a good idea. EFI-Boot-Mactel?action=AttachFile&do=get&target=grubfiles.png

Other OS Tweaks

Blacklist AGP

This may be needed for MacBook2,1 and some others using the intel video chip, if the 'fix_video' option is not used. Should not be needed for later model macs with radeon and nvidia graphics. Copy this text to a file named blacklist-agp. Code:

blacklist agpgart
blacklist amd-k7-agp
blacklist amd64-agp
blacklist sworks-agp
blacklist ati-agp
blacklist via-agp
blacklist sis-agp
blacklist efficeon-agp
blacklist intel-agp
blacklist ali-agp
blacklist nvidia-agp

then copy it to the /etc/modprobe.d/ directory

Set the xorg driver

Save a copy of existing xorg.conf for changing back to existing x configuration. Here is a single Section mini xorg.conf for intrepid xubuntu on a Mac``Book to use the fbdev driver. If you have an xorg.conf with Section "Device", just edit that Section in the Driver line, leave the Identifier line as is. /etc/X11/xorg.conf Code:

Section "Device"
	Identifier	"Configured Video Device"
	Driver 		"fbdev"
EndSection

Tested Hardware

  1. Mac Version String (See how to find this here)
  2. GRUB2 revision
  3. Any Applied Patches
  4. Synopsis of how it went / any problems?

MacBook4,1

  1. Model: MacBook4,1
  2. Grub2 revision: 2194 (64-bit)
  3. Linux: Jaunty 64-bit (2.6.28 kernel), patched with attachment:e820.patch
  4. Boot commands:
    fix_video
    linux /vmlinuz root=/dev/sdb2 video=efifb
    initrd /initrd.img
    
  5. Notes:
    1. Boots ok, graphics are accelerated
    2. Console goes scrambled after X starts
    3. fixvideo must be part of the Grub2 core image, not a module

    See Also

    • [1] - Ubuntuforums discussion
    • [2] - Apple Users Forum on ubuntuforums.org.
    • MactelSupportTeam - The Mactel-Support Team.
    • <Link> - Explanation of link.

    External Links

    • [3] - GNU GRUB Wiki.
    • [4] - GNU GRUB Wiki/TestingOnEFI.
    • [5] - GNU GRUB Wiki/TestingOnMacbook.
    • [6] - GRUB2 Page.
    • [7] - Wikipedia article on EFI.
    • [8] - Intel EFI Page.
    • [9] - UEFI Homepage.
    • <Link> - Explanation of link.