Installation of Debian on a MacMini

I've tried several howtos to install Linux on my mini. None of them worked perfectly. So I decided to document my installation procedure here.

I decided to install Debian to an external USB disk. You need the following for this howto:

Install EFI boot loader

First boot MacOS. You need to download the precompiled binary tarball from the [http://refit.sourceforge.net/#download rEFIt] project. Untar it as root somewhere. Then install rEFIt with the supplied enable.sh script.

cd
wget http://switch.dl.sourceforge.net/sourceforge/refit/refit-bin-0.2.tar.gz
cd /
tar zxvf ~/refit-bin-0.2.tar.gz
mv refit-bin-0.2 refit
cd refit/efi/refit
./enable.sh

Compile Kernel

Now you need your working Debian machine.

Set up hard disk

Connect the hard disk and create some partitions. The first primary partition should be a vfat partition. It is needed to boot elilo from the EFI bootloader. Because my mini has a lot of RAM I left out the swap partition. But it might be a good idea to create one. Here my partition table:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          30       30704    c  W95 FAT32 (LBA)
/dev/sdb4              31       38204    39090176    5  Extended
/dev/sdb5              31       14336    14649328   83  Linux
/dev/sdb6           14337       38204    24440816   83  Linux

The next step is to format the partitions:

mkfs.vfat -n Debian /dev/sdb1
mkfs.ext3 /dev/sdb5
mkfs.ext3 /dev/sdb6

The volume label of the vfat partition is diplayed late in the EFI bootloader.