<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>the blog of Chris &#187; apple</title>
	<atom:link href="http://blog.christophersmart.com/tag/apple/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.christophersmart.com</link>
	<description>Fortiter Et Recte</description>
	<lastBuildDate>Wed, 28 Dec 2011 23:39:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Updated EFI GRUB2 tarball, including 64bit</title>
		<link>http://blog.christophersmart.com/2009/12/22/updated-efi-grub2-tarball-including-64bit/</link>
		<comments>http://blog.christophersmart.com/2009/12/22/updated-efi-grub2-tarball-including-64bit/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 06:15:34 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[efi]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[installer]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=1731</guid>
		<description><![CDATA[I&#8217;ve updated the EFI GRUB tarball that I created for my how to install Linux on an Apple Xserve EFI only machine instructions. The new 89MB file includes both 32bit and 64bit installers (sha1sum). For systems with a 64bit CPU, but not a 64bit EFI, installs of 64bit Linux are possible via the 32bit loader [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated the EFI GRUB tarball that I created for my <a href="http://blog.christophersmart.com/2009/07/23/linux-on-an-apple-xserve-efi-only-machine/">how to install Linux on an Apple Xserve EFI only machine</a> instructions.</p>
<p>The <a href="http://christophersmart.com/files/efi-grub.tar.bz2">new 89MB file</a> includes both 32bit and 64bit installers (<a href="http://christophersmart.com/files/efi-grub.tar.bz2.sha1">sha1sum</a>). For systems with a 64bit CPU, <a href="http://blog.christophersmart.com/2009/12/22/does-your-mac-have-64bit-efi/">but not a 64bit EFI</a>, installs of 64bit Linux are possible via the 32bit loader (bootia32.efi). Just boot it and select the relevant 64bit option from the GRUB menu.</p>
<p>It does also include a native 64bit EFI (bootx64.efi) loader which I have not been able to test because the Mac Pro I use does not have a 64bit EFI.</p>
<p>This version drops both Jaunty and Leonidas, but includes a newer Karmic kernel and support for Fedora 12 (Constantine). Thanks to sufehmi, there is also a sample GRUB and X.Org config file included for Debian/Ubuntu.</p>
<p><strong>Instructions</strong><br />
This is <a href="http://blog.christophersmart.com/2009/07/23/linux-on-an-apple-xserve-efi-only-machine/">covered in my original post</a>, but it essentially consists of the following:</p>
<p>Grab a suitably sized USB memory stick and let’s prepare it. Please know what device it is you’re partitioning!! I’ll use sdz just for example purposes only.<br />
Unmount it<br />
<code>su -c 'umount /dev/sdz1'</code></p>
<p>Partition and format it<br />
<code>su -c 'parted -s /dev/sdz mklabel gpt mkpartfs EFI fat32 0% 100% toggle 1 boot'</code></p>
<p>It should now automatically mount. If not, unplug it and plug it in again, or mount it manually.</p>
<p>Next you can extract my tarball onto the device, ensuring that it maintains the efi/boot/ directory structure on it and not create an extra directories because of the archiver. If it’s not right, then re-arrange things and eject the device.</p>
<p>You should now be able to plug it into your Mac and turn it on.</p>
<p>Hold down the Option key (Alt key on non-Apple keyboards) until you see the boot option. It should show “EFI” on the USB stick. Boot this and you should see the GRUB menu load. Choose the distro you want to install and away you go!</p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2009/12/22/updated-efi-grub2-tarball-including-64bit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Computers still too expensive in Australia, despite strong Aussie dollar</title>
		<link>http://blog.christophersmart.com/2009/12/10/computers-still-too-expensive-in-australia-despite-strong-aussie-dollar/</link>
		<comments>http://blog.christophersmart.com/2009/12/10/computers-still-too-expensive-in-australia-despite-strong-aussie-dollar/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 05:36:01 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[price]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=1640</guid>
		<description><![CDATA[Dell just released their new Vostro v13 for US$450 in the States. How much is it in Australia? AU$999. Based on exchange rates at the time of writing, US$450 = AU$490. We&#8217;re being ripped off over AU$500! That&#8217;s more than a second laptop costs in the USA! Sure, it&#8217;s all about the market, but with [...]]]></description>
			<content:encoded><![CDATA[<p>Dell just released their new Vostro v13 for US$450 in the States. <a href="http://www1.ap.dell.com/au/en/business/vostronb/vostro-v13/pd.aspx?refid=vostro-v13&#038;s=bsd&#038;cs=aubsd1">How much is it in Australia?</a> AU$999.</p>
<p>Based on exchange rates at the time of writing, <a href="http://www.xe.com/ucc/convert.cgi?Amount=450&#038;From=USD&#038;To=AUD&#038;x=0&#038;y=0">US$450 = AU$490</a>.</p>
<p>We&#8217;re being ripped off over AU$500! <strong><em>That&#8217;s more than a second laptop costs in the USA!</em></strong></p>
<p>Sure, it&#8217;s all about the market, but with the strong Aussie dollar it sucks that we cannot get some benefit when it comes to computers!</p>
<p>Apple does the same thing. The 13&#8243; Macbook Pro is US$1190. In Australia it&#8217;s AU$1599. A rip off of over AU$300!</p>
<p>On the flip side, it stops me from spending money..</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2009/12/10/computers-still-too-expensive-in-australia-despite-strong-aussie-dollar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux on an Apple Xserve EFI only machine</title>
		<link>http://blog.christophersmart.com/2009/07/23/linux-on-an-apple-xserve-efi-only-machine/</link>
		<comments>http://blog.christophersmart.com/2009/07/23/linux-on-an-apple-xserve-efi-only-machine/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 06:53:48 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[efi]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[loader]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xserve]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=1005</guid>
		<description><![CDATA[We have a few of these Apple Xserve machines at work which weren&#8217;t doing much, so I thought I&#8217;d make better use of them. Naturally, this meant installing Linux on them. These machines do not have a BIOS (or even any emulation), they use EFI and as such won&#8217;t boot the standard Linux install media. [...]]]></description>
			<content:encoded><![CDATA[<p>We have a few of these <a href="http://www.apple.com/au/xserve/">Apple Xserve machines</a> at work which weren&#8217;t doing much, so I thought I&#8217;d make better use of them. Naturally, this meant installing Linux on them.</p>
<p>These machines do not have a BIOS (or even any emulation), they use EFI and as such won&#8217;t boot the standard Linux install media. I knew that Fedora could boot EFI, so that&#8217;s where I started, with Leonidas (version 11). Unfortunately, the install media just wouldn&#8217;t work on this device, presumably as it has no BIOS emulation.</p>
<p>To cut a long story short, I had to <a href="http://homepages.tesco.net/~J.deBoynePollard/FGA/efi-boot-process.html">learn how EFI works</a> in order to get it booting and it wasn&#8217;t an easy thing to discover!</p>
<p><span id="more-1005"></span></p>
<p><strong>Booting EFI</strong><br />
In short, the Apple EFI boots and scans all available drives (including USB drives) for a GPT partitioned device which has a FAT formatted partition on it. Inside this partition it looks for an <code>efi</code> directory.</p>
<p>In that directory must be another from the <a href="http://www.uefi.org/specs/esp_registry">list of approved vendor named directories</a>, such as <code>redhat</code> or <code>apple</code>. The default is <code>boot</code> and this is what I used.</p>
<p>Inside that <code>boot</code> directory, EFI looks for a binary EFI file, which it can run. In my case, this is a GRUB2 EFI binary. The name of the file must match your architecture, so for me it is called <code>bootia32.efi</code> but if you&#8217;re running a 64bit system it should be <code>bootx64.efi</code>.<br />
<strong>NOTE:</strong> Your Mac <a href="http://blog.christophersmart.com/2009/12/22/does-your-mac-have-64bit-efi/">must have a 64bit EFI</a> to load the 64bit EFI Linux installer (bootx64.efi)). Else, try choosing the 64bit options when using the 32bit EFI installer (bootia32.efi), but either way your system must have a 64bit CPU.</p>
<p>The GRUB2 EFI binary I am using looks for the standard GRUB config file, which is called <code>grub.cfg</code>. This must also be in the efi/boot/ directory of the USB device. The kernel and initramfs for the net installer should also be in that directory.</p>
<p>I have made a Debian Squeeze, Fedora Constantine and Ubuntu Karmic installer <a href="http://christophersmart.com/files/efi-grub.tar.bz2">which you can download</a> and extract onto your USB device (<a href="http://christophersmart.com/files/efi-grub.tar.bz2.sha1">sha1sum</a>). You will still need to partition and format your device, so more on how to do that later.</p>
<p><strong>Partition USB Boot Device</strong><br />
So, once we understand how EFI works, next we need to get a bootable GRUB happening in order to install Linux.</p>
<p>Grab a USB memory stick and let&#8217;s prepare it. Please know what device it is you&#8217;re partitioning!! I&#8217;ll use sdz just for example purposes only.<br />
Unmount it<br />
<code>su -c 'umount /dev/sdz1'</code></p>
<p>Partition and format it<br />
<code>Partition and format it<br />
<code>su -c 'parted -s /dev/sdz mklabel gpt mkpartfs EFI fat32 0% 100% toggle 1 boot'</code></code></p>
<p>It should now automatically mount. If not, unplug it and plug it in again, or mount it manually.</p>
<p><strong>Prepare USB Boot Device</strong><br />
Next you can extract my tarball onto the device, ensuring that it maintains the efi/boot/ directory structure on it and not create an extra directories because of the archiver. If it&#8217;s not right, then re-arrange things and eject the device.</p>
<p>You should now be able to plug it into your Xserve and turn it on.</p>
<p>Hold down the Option key (Alt key on non-Apple keyboards) until you see the boot option. It should show &#8220;EFI&#8221; on the usb stick. Boot this and you should see the GRUB menu load. Choose the distro you want to install and away you go! See the &#8220;Installation&#8221; section below and skip the next few.</p>
<p><strong>Manual preparation &#8211; Building GRUB2</strong><br />
Before we can compile GRUB, we need some dependencies. If you&#8217;re using Debian or Ubuntu, then run the following:<br />
<code>sudo apt-get build-dep grub2<br />
sudo apt-get install libusb-dev</code></p>
<p>We need to check out GRUB from CVS and <a href="http://grub.enbug.org/TestingOnEFI">build it for EFI systems</a>. Note, my Xserve is 32bit only, so I&#8217;m installing 32bit version. If you&#8217;re using 64bit then use a 64bit OS. You can cross compile, see the link above for info if you need to.</p>
<p>Check out source from CVS:<br />
<code>cvs -z3 \<br />
-d:pserver:anonymous@cvs.savannah.gnu.org:/sources/grub \<br />
co grub2<br />
cd grub2</code></p>
<p>Or get source from Debian (which is more likely to compile):<br />
<code>apt-get source grub2<br />
cd grub2*<br />
</code></p>
<p>Build grub2:<br />
<code>./configure --with-platform=efi<br />
make</code></p>
<p>Now, make a temporary directory in which to put the GRUB EFI binary.<br />
<code>mkdir -p efi/boot/</code></p>
<p>Next we need to create the GRUB2 EFI program, and will specify a bunch of modules to include. This was a big stumbling block for me because someone removed the ability to read config files from module &#8220;configfile&#8221; and put it into &#8220;minicmd&#8221; requiring &#8220;sh&#8221;. The documentation I was following was not updated and I couldn&#8217;t work out why GRUB2 couldn&#8217;t parse my config (typing it in manually at the GRUB2 command prompt worked however). After lots of wasted time I emailed the GRUB list and had an answer within 20 minutes, which was a big relief.</p>
<p><code>./grub-mkimage -d . -o bootia32.efi part_gpt hfsplus fat ext2 normal sh chain boot configfile minicmd linux loadbios reboot appleldr halt search<br />
sudo cp bootia32.efi efi/boot/</code></p>
<p>The efi/ directory now just needs to be copied onto your FAT USB stick. Don&#8217;t forget to make sure the directory structure is correct, as laid out above.</p>
<p>Now you just need to create a GRUB2 config file, which we&#8217;ll do below after getting the kernel and initramfs.</p>
<p><strong>Manual preparation &#8211; Linux installers</strong><br />
I am using the netboot installers for each distro. This basically consists of a kernel, initramfs (which includes the installer). To know how to boot these in the GRUB config file, I read the isolinux configs included on the install CDs.</p>
<p>So, download the network installer of your choice in ISO format. Mount loop it and copy the kernel and initramfs onto the efi/boot/ directory on your USB disk.</p>
<p>For example (32bit), <a href="ftp://mirror.internode.on.net/ubuntu/dists/karmic/main/installer-i386/current/images/netboot/mini.iso">Ubuntu</a>, <a href="ftp://mirror.internode.on.net/pub/fedora/linux/releases/12/Fedora/i386/os/images/boot.iso">Fedora</a>, <a href="ftp://mirror.internode.on.net/debian/dists/squeeze/main/installer-i386/current/images/netboot/mini.iso">Debian Squeeze</a> (note that Fedora does actually have an <a href="ftp://mirror.internode.on.net/pub/fedora/linux/releases/11/Fedora/i386/os/images/efidisk.img">EFI boot disk</a> which you can dd directly to a USB stick and boot, however this didn&#8217;t work on my Xserve but it might be useful to grab the kernel and initramfs from as it&#8217;s smaller).</p>
<p>Mount loop ISO:<br />
<code>mkdir /tmp/iso<br />
sudo mount -o loop boot.iso /tmp/iso</code></p>
<p>Copy the kernel and initramfs from /tmp/iso onto your USB stick. You might need to look at the isolinux.cfg files under /tmp/iso in order to find out which is the kernel. On Debian and Ubuntu the kernel is called <code>linux</code> and the initramfs is called <code>initrd.gz</code>, both in the root directory.</p>
<p><strong>GRUB Config File</strong><br />
Now that you have the GRUB2 EFI binary (bootia32.efi), kernel and initramfs on the USB stick, we need a config file for GRUB to read when it loads.</p>
<p>Here is an example for all four distros that I use in my provided tarball.<br />
<code>set timeout=10<br />
set default=0<br />
menuentry "Debian Squeeze" {<br />
   linux /efi/boot/linux-squeeze priority=low vga=normal video=efifb<br />
   initrd /efi/boot/initrd-squeeze.gz<br />
}<br />
menuentry "Fedora Leonidas" {<br />
  linux /efi/boot/vmlinuz-leonidas nomodeset xdriver=fbdev noselinux<br />
   initrd /efi/boot/initrd-leonidas.img<br />
}<br />
menuentry "Ubuntu Jaunty" {<br />
   linux /efi/boot/linux-jaunty priority=low vga=normal video=efifb<br />
   initrd /efi/boot/initrd-jaunty.gz<br />
}<br />
menuentry "Ubuntu Karmic" {<br />
   linux /efi/boot/linux-karmic priority=low vga=normal video=efifb<br />
   initrd /efi/boot/initrd-karmic.gz<br />
}</code></p>
<p>Note that for Fedora I had to turn kernel based mode-setting <strong>off</strong>, and specify the Xserver driver.</p>
<p>The USB keyboard just wouldn&#8217;t work on either Ubuntu, but Debian Squeeze worked fine. I ended up choosing Fedora.</p>
<p><strong>Manual preparation &#8211; Install Linux</strong><br />
Once you have all the required files, plug the stick in and turn on the Xserve. Hold down the Option key (Alt key on non-Apple keyboards) until you see the boot option. It should show &#8220;EFI&#8221; on the usb stick. Boot this and you should see the GRUB menu load where you can boot your network installer of choice.</p>
<p><strong>Installation</strong><br />
When installing, you need to follow the same partition structure as the USB stick. I completely blew away all Apple partitions and am booting only Linux. The <strong>drives need to be GPT</strong> and to have a <strong>small FAT partition at the beginning</strong> with the efi/boot/ directory, GRUB2 EFI binary, GRUB config, kernel and initramfs.</p>
<p>There&#8217;s probably a better way to do this, I&#8217;m sure some distros will support GRUB2 and EFI out of the box soon. In the mean time I install the OS without a boot loader and create the efi/boot/ system manually. This means every time you update your kernel, you need to copy the kernel and initramfs, and update the GRUB config file.</p>
<p>The config file should be the same as the one used on the USB stick, except that the names of the kernel and initramfs will be different. For example:</p>
<p><code>set timeout=10<br />
set default=0<br />
menuentry "Fedora Leonidas" {<br />
  linux /efi/boot/vmlinuz-2.6.28-13-generic nomodeset xdriver=fbdev noselinux root=/dev/sda3 ro<br />
   initrd /efi/boot/initrd.img-2.6.28-13-generic<br />
}</code></p>
<p><strong>Conclusion</strong><br />
These are some rough notes to hopefully help others out there trying similar things. Please let me know how it works for you. I installed Fedora on my Xserve and it&#8217;s running quite well!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2009/07/23/linux-on-an-apple-xserve-efi-only-machine/feed/</wfw:commentRss>
		<slash:comments>132</slash:comments>
		</item>
	</channel>
</rss>

