Macbook Pro with Fedora Core 6 and lvm

From Mactel-Linux

Jump to: navigation, search

I just finished configuring my brand new 15" Macbook Pro for dual booting MacOS X and Fedora Core 6. The configuration was largely based on information I found on this site, but with some important changes.

I thought I'd share my experiences here because until the time of this writing, I only found information on Gentoo or Ubuntu on this site.

My final setup is as follows:

  • 1 MacOS X partition
  • 1 Linux root partition
  • 1 lvm physical volume partition, which contains a home partition and a swap partition
  • rEfit as bootloader


Contents

LVM

LVM stands for "Logical Volume Manager". It allows to create multiple logical partitions in one or more physical disk partitions. This can be advantageous for advanced disk management. More information on lvm can be found here.

I wanted to try and use LVM for a couple of reasons:

  • Due to several limitations explained elsewhere on this site, it is currently not possible to have more than 4 physical partitions on the internal disk. The first is required for EFI, the second is for MacOS X. So this only leaves two partitions for Linux. Other howto's on this site suggest a root partition and a swap partition. However, I prefer to have a separate partition for home as well.
  • Proof of concept. I wanted to test if the two partition limit could be overcome. I could have setup a root partition and a home partition, and use a swap file instead of a swap partition. Instead I chose to go for three linux partitions:
    • a root partition
    • a home partition (inside lvm)
    • a swap partition (inside lvm)
Note

To move the / partition to lvm, you need to have a /boot partition outside:

  • a /boot partition for the kernel and bootloader,
  • a root (/) partition (inside lvm)
  • a home partition (inside lvm)
  • a swap partition (inside lvm)

The problem with this setup is that anaconda will fail to properly configure grub. No error will be displayed, but linux will not show up on rEfit. To fix the installation you need to boot with the install dvd in rescue mode and run the commands:

chroot /mnt/sysimage
sfdisk --force -c /dev/sda 3 83
grub-install /dev/sda3

Partitioning

To partition the disk I used the following sequence:

  1. I chose to use bootcamp to resize the Mac OS X partition. Note that as my Macbook Pro is a recent model (december 2006), I didn't need to install any firmware update before using bootcamp.
  2. Install rEfit.
  3. Boot with a Knoppix live CD (version 5.01). This CD comes with a parted version that understands lvm
  4. Using parted,
    1. Remove the windows partition Bootcamp created
    2. Create an ext3 partition for root
    3. Create an lvm partition for the other partitions
  5. The other partitions won't be created yet, that will be for the fedora installer !
  6. Save the changes, and reboot
  7. In rEfit choose the partition utility and have it recreate the BIOS partition table


Fedora Core 6 Installation

Fedora Core 6 comes with support for the Mactel hardware, so installation is fairly easy. The only special thing is the partitioning.

Boot from a Fedora Core 6 installation CD and start the installation process a usual.

When asked about the partitions to use, choose the option to setup a custom partitioning scheme.

Note
Don't touch the EFI or Mac OS X partitions ! You risk losing your data !
  1. Assign the first partition created above with parted to "/".
  2. You may have to define this partition as ext3 again. I believe the rEfit partition utility removes the partition type. I don't remember this exactly anymore.
  3. Assign the second partition to a new volume group (you can give a an arbitrary name, I chose "base")
  4. You can now select this volume group as if it was another hard disk.
  5. Continue creating a home and swap partition inside this "virtual hard disk" (lvm) and assign them the correct properties (mount point, filesystem type,...)
  6. When you are finished, you can continue with the rest of the installation.
Note
Be sure enable the extra yum repository when asked if you want to use the livna repository (see below) later on. The livna repository depends on it.

After rebooting, you will see another boot option in the rEfit menu for your linux installation.

Post installation configuration

I haven't fully configured the system yet. In this section, I will add more items as I finish more configuration steps.


Updates

After I first booted into linux, the system informed me that there were a lot of security updates available. I chose to install them all.

Fedora is known to ship without any proprietary software. This means no proprietary drivers for the Video card (Ati X1600), no Airport, no mp3 support, hardly any video playback support and so on. The livna yum repository provides rpm packages for many of these missing items. To ease my life, I chose to add this repository to the yum configuration. Luckily this is quite easy:

  • Open a terminal
  • Become root (su -)
  • Enter this command:
 # rpm -ivh http://rpm.livna.org/livna-release-6.rpm


Accelerated X

The default Fedora Core installation managed to configure the X server rather well: it managed to figure out the optimal screen resolution: 1440x900. Unfortunatly, the vesa driver being used by default doesn't know this resolution and as such X falls back to 1152x864 instead. Changing this again via System->Administration->Display to 1440x900 doesn't fix this. The next login uses 1152x864 again. This causes images to be deformed (they are stretched), which is very inconvenient. Additionally, the vesa driver used by default doesn't do hardware accelleration.

Recent versions of the proprietary ATI driver do support the graphics card in the Macbook Pro. I first tried to install it by hand, but I didn't manage due to some dependency problem. I didn't bother fixing this, as the livna repository already has a driver available: kmod-fglrx I used the Add/Remove Software tool (pirut) to install it, to make sure it installed the version that matched my kernel.

Update 06-02-2007
According to this link, it is strongly advised NOT to install the proprietary ATI driver from source (or tarball). Instead, use the rpm's from the livna repository.

After that, I ran as root:

# aticonfig --initial

From then on my screen resolution was correct.

Note
I don't think my system is using hardware accelleration yet, as fglxrinfo shows it's using mesa. I probably still have to fiddle with the correct options in the xorg.conf file. I read something about that on the Phoronix forums, but I have to search again.
Update 06-02-2007
Hardware acceleration was indeed not working. I have followed this howto. There is a list of instructions for Fedora Core 6. Note that yum couldn't find the package xorg-x11-drv-fglrx-libs-32bit. I ran the yum commands without this package. Hardware accelation seems to work without this also.

Sound

Added 06-02-2007

I managed to get sound working via the alsamixer tool (I followed the suggestions on this page).

I had to start

  • alsamixer -V All
  • Unmute (ie type m when that item is selected) Surround, Center, LFE, Side, Line In As Output
  • Increase the gain of Capture and Mux

After these changes, sound is working. I can use the gnome volume manager in the top right of the screen to increase/decrease the sound volume. Music players installed from the livna repository play mp3 and other formats nicely.

To do/to investigate

  • Configure wifi (apparently the livna repository comes with a kmod-madwifi package that supports Airport)
  • Configure keyboard to map to the azerty mac keyboard instead of a pc one


--Gjanssens 14:27, 11 January 2007 (PST)

Personal tools