creating fancy stuff and more…

Installing Backtrack Linux 5 R3 on a Macbook Pro via EFI

Posted Fri, 16 Nov 2012 09:39:55 GMT Linux OpenSource

Setting

I just added a new 1 TB HDD parallel to a SSD into a MacBook Pro (replacing the internal DVD-ROM) and decided to add a 60GB partition for Linux.

Installing Linux I faced several problems, such as
  • no more CDROM to install from
  • BootCamp on 10.8 only supports Windows 7
  • Bad or not working documentation on installing Linux with USB stick or manually onto an existing environment

Disclaimer

Your use of the Site is at your own risk. THE OWNER PROVIDES THIS SITE, ALL CONTENTS, AND ALL SERVICES OFFERED THROUGH OR FROM THE SITE AS IS WITHOUT EXPRESS OR IMPLIED WARRANTY, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.

Prerequisites

  • make a backup!
  • an EFI enabled Apple computer (tested on Macbook Pro 5,4)
  • Mac OS X <= 10.8.2 installed (not verified with higher versions)
  • a free partition on with more than 4GB space
  • an USB stick or SD card > 4GB, FAT32 (for temporary use)
  • BackTrack live cd (64bit) with install functionality
  • rEFInd / rEFIt
  • "elilo.efi" and "grubx64.efi" (grub might be enough, just download "efi-tools.zip" (below the post), or extract them from current linux distributions such as CentOS or Ubuntu)
  • some hands on skills (you should know how to use the terminal)

Preparational steps

  • Install rEFInd using the documentation on the developers website
  • Download the Backtrack live cd iso, preferably the 64bit version
  • Mount the live cd in OS X
  • copy the "casper" folder from the live cd to the FAT32 formatted USB stick
  • from the "casper" folder of the live cd copy the files "vmlinuz" (the linux kernel) and "initrd.gz" (the init ramdisk) into "/efi/refit" of your OS X partition
  • copy "elilo.efi" and "grubx64.efi" into the same folder

Off we go

  • unmount all DMGs and ISOs and reattach the USB stick
  • go into your favorite terminal emulator and find out which disk your usb stick is by running "diskutil list"

Output of "diskutil list" on my mac. In this case the usb stick is located at "/dev/disk2" which in Linux naming would be "/dev/sdc"

create a file named "/efi/refit/elilo.conf" with following content:
prompt
timeout=10
default=btinst

image=vmlinuz
label=btinst
initrd=initrd.gz
append="boot=casper text vga=791 splash quiet ro"
root=/dev/sdc
read-only
create a chainload grub config "/efi/refit/grub.conf":
insmod /efi/refit/grub-efi/relocator.mod
insmod /efi/refit/grub-efi/linux.mod
timeout=5 
menuentry "Chainload Grub" {
configfile (hd1,gpt2)/boot/grub/grub.cfg
}
This file will later allow to load non EFI linux kernels (by loading "linux.mod") and chainloading the configfile from a locally installed grub. You will need to replace "(hd1,gpt2)" by the destination partition of your linux installation! (in this case "hd1,gpt2" means "/dev/sdb2").

Reboot and choose "elilo.efi" as you boot loader in the rEFIt menu. This will load elilo with the configuration from above, which will load the backtrack kernel and the backtrack initrd. The initrd will find its root drive on "/dev/sdc" (which is the USB/sd card drive). On its root, it will search for the "casper" folder and boot the BT live system.

Installation

  • Login as root, password toor
  • run "startx"
  • Select the Backtrack install application and install backtrack onto your harddrive (don’t repartition!!), in my case to /dev/sdb2
  • Reboot
  • Select grub as boot loader in rEFInd and chainload into the installed grub configuration of Backtrack
  • There might be partition problems with the generated grub conf, since the EFI grub sees "(hd1,gpt2)" instead of the usual "(hd1,2)" partition scheme. We are investigating how to fix grub here.

Wallaby Application Framework is now available on GitHub

Posted Mon, 29 Oct 2012 12:31:29 GMT Allgemein CouchBase CouchDB OpenSource Wallaby
Wallaby is a powerful yet simple framework for building Qt-based, cross-platform applications in PyQt/PySide with a CouchDB/CouchBase and Elasticsearch backend.

Fork it on GitHub!

Last posts:

Archive:

Categories: