LFS on a Mac Pro: It is possible!
I'm not sure if there is an audience for this, but if somebody is thinking of trying to put LFS on a Mac Pro ("macintel"), keep reading!
The subject line should say it all: Yes, it is possible. I just finished putting the 'basics' (a bootable lfs 6.2) on my Mac Pro.
At the moment I'm not planning to write a howto 'cause I'm not sure if anybody is interested. If anybody is interested just reply and ask away.
I will give a rough guide to what I did.
Goal: Os X + LFS (dualboot) on MacPro.
- Is dualboot at all possible: There are some links that claim success with triple boot setup (Ubuntu seems to be the linux flavor of choice) on MacBooks, I couldn't find any that had tried doing this on a MacPro. I basically combined/edited the guidelines of the following 3 links:
Installing Ubuntu Linux on a MacBook (Dual Boot) (edited, link no longer active)
Triple Boot via BootCamp
Triple Boot via BootCamp Ubuntu
After some failures I ended up with a dualboot Os X + Ubuntu system.
- Finding a suitable host for LFS: Obviously Ubuntu Dapper. Not my first choice, but this is one of the very few distro's that actually boot from the live cd (Ubuntu gains more respect!). I could not get LFS's own live cd or knoppix to boot on a macintel box.
Another downside: Ubuntu does not meet LFS's host system requirements. This implies doing an Os X/Ubuntu install first, with the partition layout that LFS needs later on.
- Installing LFS: After updating Ubuntu (also install bison, bash needs it in chapter 5) installing LFS went without a problem. I did not install grub, but installed lilo instead. Lilo needs as86, ld86 (Bin86), not a part of LFS 6.2. I also used kernel 188.8.131.52 instead of the 184.108.40.206 LFS uses.
- The hard part: It took a while before I figured out which kernel settings needed to be on and which should be off (ata/sata/pata/ide being the most important for mounting), this was after making sure that lilo wasn't the problem (I still get some warnings when running /sbin/lilo, but these can be ignored....).
I'm still in the process of getting it all to work, but at least I can boot into LFS and have a working kernel on the side in case I turn on/off the wrong kernel option(s). Makes it a lot easier and faster to correct mistakes :)
- Todo: A lot........ This is just a basic LFS that boots on a macintel box (proof of concept?). All 'basic' things work: apple keyboard, usb (1.1 + 2.0), disks, apple cinema display, all memory is detected, bluetooth and firewire (hardware is detected), network. Next is tuning (kernel mostly) and then BLFS.
- Known future issue: Sound is a known problem (noticed with Ubuntu): There is sound but way to soft. This should be resolved with a 2.6.20+ kernel and the newest alsa software (I need a working X env to test that....). It's also not a mac specific problem, it's the intel HD sound card (there's an unanswered thread on this board about this exact issue).
That's it folks. I hope I make some people happy with this information. If extra information is wanted/needed just ask.
Sure, write it up if you have the time. My next purchase will be a Macintell of some sort. Good how-tos' are always appreciated.
I'm working on a rough guide with a bit more detail. I'll post it when it's ready (can take a bit, I'm kinda busy atm).
GUIDE: LFS 6.2 and OS X on a Mac Pro (part I)
GUIDE: LFS 6.2 and OS X on a Mac Pro.
This guide explains how I installed LFS 6.2 and OS X in a dualboot configuration on a Mac Pro. This is not a 'copy-paste' tutorial and I strongly advice to read all the links that are given before diving head first into trying this.
Certain entries I will mention are explained in detail on the pages I refer to, I will not go into those, except if certain steps are done differently. The other parts of this guide show detailed information about all the software, hardware and .config that was used.
WARNING: The steps taken in this guide will destroy all data on your disk(s). Make sure you have a backup of all that is important to you.
--- Step 1: Install/Check OS X
- (re-)Install OS X.
I re-installed OS X (a very basic install). The only reason for this is that I'm only going to use OS X to get the firmware updates that come available. It will also save some disk space, which could be important for those with a single, 'small' disk.
OS X should be installed on one single partition (all the space available, this is default when installing OS X) and it should be a mac os extended (journaled) partition. Re-partitioning, to have partitions for Ubuntu and LFS, is done at a later stage.
- Update OS X and firmware.
- Install Boot Camp.
- Install rEFIt.
After restarting OS X, rEFIt should be present.
--- Step 2: Re-partition using OS X (part 1)
Show current partition layout after an OS X install:
Use diskutil list (from a terminal):
/dev/sda1 -> EFI (disk0s1)
/dev/sda2 -> Mac OS X (disk0s2)
Intended partition layout:
/dev/sda1 -> EFI (fixed) (disk0s1)
/dev/sda2 -> Mac OS X (disk0s2)
/dev/sda3 -> LFS (disk0s3)
/dev/sda4 -> Ubuntu (disk0s4) (temporary base for LFS)
Using apple's diskutil, /dev/sda2 - disk0s2 is split ('resized') into 3 partitions:
diskutil resizeVolume /dev/disk0s2 XXG Linux LFS YYG Linux Ubuntu ZZG
Substitute XX, YY and ZZ with the amount of disk space wanted/needed.
Do NOT reformat using diskutil, reformatting is done at a later stage (during Ubuntu install).
I have 2 disk, so I decided to put the swap partition (and some other partitions) on the second disk and use the Ubunbtu partition as a 'data' partition after LFS is installed and Ubuntu is removed. In theory you can use the Ubuntu partition for swap, after using gparted to resize the LFS partition and the Ubuntu/swap partition. I haven't tried this myself.
Check the new layout (with diskutil list from a terminal).
--- Step 3: Install Ubuntu
Boot from the Ubuntu livecd.
I used rEFIt to do this, not the 'chime, hold down the C key (to boot from CD)' combo. The end result is probably the same, but I did not try the latter.
After Ubuntu is up and running set up the network (if needed), a working ethernet is a must.
Format both linux partitions using parted (from the menu, no need to do this from a terminal). I had problems using parted from the installer to format the none OS X partitions. Using parted _before_ starting the installer solved this problem.
When the installer asks for the mount points remove the /mount/EFI entry from the list.
/ should be connected to /dev/sda4. /dev/sda3 isn't used yet, so there's no real need to mount it.
The Ubuntu installer will crash when it tries to install grub. Don't worry this is normal and can be ignored.
The Triple Boot via BootCamp Ubuntu link can be used for the remainder of the Ubuntu install (Start at: Boot off of the Ubuntu installation disc. The majority of the Ubuntu install.....).
Heads-up: The link provided uses /dev/sda3 for Ubuntu, this guide uses /dev/sda4.
After a reboot you should end up with a dual boot (OS X - Ubuntu) system. I had the same problem as described in the above link (had to boot 2 times into OS X before lilo 'fixed' itself and alowed me to boot into Ubuntu).
To be able to install LFS some extra Ubuntu packages are needed:
install: gawk, bison and build-essential.
--- Step 4: Install LFS
Installing LFS is straight forward. The only things I encountered where the missing base system packages (gawk, bison and build-essential). After installing those all went like a charm.
Do not install grub and the default kernel (220.127.116.11).
Install LFS 6.2
--- Step 5: Install bin86 and lilo
Instead of grub, install lilo. Lilo depends on the bin86 package, this package needs to be installed as well.
--- Step 6: Install kernel 18.104.22.168
Unpack the 22.214.171.124 kernel in /usr/src.
chown -R 0:0 <kerneldir>
Enter the newly created directory and execute the following commands:
This was one of the hard parts. It took some 'trail and error' before I had a setup that actually booted. At the end of this guide I've included the complete .config that seems to work.
I personally like my kernels as static as possible (I'm not a big module fan). I'm still working on the kernel so the one at the bottom of this guide is a bit of a mix between static and modular. Adjust to your liking.
cp -v arch/i386/boot/bzImage /boot/lfskernel-126.96.36.199
cp -v System.map /boot/System.map-188.8.131.52
cp -v .config /boot/config-184.108.40.206
ln -s /boot/lfskernel-220.127.116.11 /boot/vmlinuz
ln -s /boot/System.map-18.104.22.168 /boot/System.map
The following commands only need to be executed once:
install -d /usr/share/doc/linux-22.214.171.124 &&
cp -r Documentation/* /usr/share/doc/linux-126.96.36.199
I strongly suggest to copy the working kernel and add an extra entry to lilo.conf so you can always fall back to that one in case something goes wrong when tuning/editing your current kernel.
cp lfskernel-188.8.131.52 lfskernel-184.108.40.206.working
cp System.map-220.127.116.11 System.map-18.104.22.168.working
cp config-22.214.171.124 config-126.96.36.199.working
Add the following part to your lilo.conf:
That's it folks, the other parts of this guide hold information about the software, hardware and .config that was used.
BootCamp,rEFIt (there seems to be a newer version available, I used 0.8).
OS X 10.4.9: Install disk(s) that came with the box. Full upgrade after install.
Ubuntu (dapper/6.06): Full upgrade after install from Ubuntu livecd, (desktop/6.06)
Ubuntu extra: run LFS's version-check.sh.
Bison and 'build-essential' are not in the list, but are both needed.
LFS 6.2: Packages and patches
LFS extra: lilo 22.8,bin86, kernel 188.8.131.52
LFS not used: Grub, kernel 184.108.40.206
GUIDE: LFS 6.2 and OS X on a Mac Pro (part II)
Hardware overview (relevant output from Apple's System Profiler):
GUIDE: LFS 6.2 and OS X on a Mac Pro (part III)
kernel 220.127.116.11 .config (I)
GUIDE: LFS 6.2 and OS X on a Mac Pro (part IV)
kernel 18.104.22.168 .config (II)
Nice work. I, for one, appreciate the time and effort you put in to this. Later in the year I intend to buy some new equipment and I hope to be able to utilize some of your hard earned expertise.
Any tips, pointers and comments are welcome.
|All times are GMT -5. The time now is 06:36 AM.|