This Document is Currently being worked on and is considered unreliable.
How to install Linux on a Mac Mini without a cd drive.
This little mini tutorial should help get you up and running with Arch Linux on your mac mini 2011 sans-cd drive. This guide can be used for any distro of your choice, just make sure you have a good understanding of the packaging/installation system. I have had no joy getting a dd'd usb device to boot on the mac mini, which is why I have created this guide. If anybody has any pointers as for ways to get FREE BSD running in this manor I would love to hear from you! Drop an email to nathanbaxter at pixelmasochist.net
DISCLAIMER
Use this guide at your own risk. I can not be held responsible for any damages or loss of data caused should you decide to attempt this installation.
Weapons Check!
You will Need.
Presumptions:
- You have an understanding of the Linux/UNIX command line.
- Your machines are connected to the internet
- You are currently running Arch Linux
- You have the means to view online documentation while you install Linux on your mac mini.
- There is only one drive connected to the machines which means the usb stick is on /dev/sdb
From the Linux machine
Create a usable base Arch Linux system
- Create a partition table on the usb stick
- Format the partition as ext2
mkfs.ext2 /dev/sdb1 - Mount the device
mount /dev/sdb1 /mnt - Get the arch install scripts
pacman -S arch-install-scripts -
Use pacstrap to create a base Linux system on the usb device
Most of this information has been lifted from the arch wiki.
There are a lot of configuration options that have been omitted due to the different hardware for the machines.
pacstrap /mnt base
arch-chroot /mnt /bin/bash
pacman -S gptfdisk arch-install-scripts
If you're going to need to ssh into the machine, now is the time to pick openssh up.
nano /etc/locale.gen
locale-gen
ln -s /usr/share/zoneinfo/[Region]/[Timezone] /etc/localtime
hwclock --systohc --utc
echo arch-install > /etc/hostname
If the usb stick is the only other device on your mac (besides the main hd) it should be safe to do the following. Otherwise, change /dev/sdb1 to the next device in the list.
echo "/dev/sdb1 / ext2 defaults,noatime 0 1" > /etc/fstab
passwd [to create a root pass word, can be skipped if you don't plan on keeping the os on the usb]Logout and umount /mnt
Now that we have a basic system set up it's over to the mac.
- Use the OS X partition tool to create a new partition. Might be an idea to name it something you'll remember so that when it comes to removing that partition after step 7 it will make life easier for you. something like arch-install.
-
Install fuse-ext2
Install refind -
Use fuse-ext2 to mount your linux usb drive
sudo mkdir /Volumes/arch
sudo fuse-ext2 /dev/sdb1 /Volumes/arch -
Now mount the mac's EFI partition
It should be on /dev/disk0s1, but to check this simply type
diskutil list
and look for the type name "EFI".
Then create the directory for the Arch Linux boot files.
sudo mkdir /Volumes/efi
sudo mount -t msdos /dev/disk0s1 /Volumes/efi
sudo mkdir /Volumes/efi/EFI/arch -
Copy the Linux kernel and initramfs files
cp /Volumes/arch/boot* /Volumes/efi/EFI/efi/arch/
cd /Volumes/efi/EFI/efi/arch
mv vmlinuz-linux vmlinuz-linux.efi -
Create the refind configuration file in the /Volumes/efi/*/arch directory
[$EDITOR] refind_linux.conf and add the following
"Boot to console" "root="/dev/sdb1 ro rootfstype=ext2 systemd.multi-user.target"
- Reboot. You should be presented with the refind menu system and Arch Linux should now be present.
-
Login as root and get your network up. I'd recommend starting of with the wired en* device and deal
with the wireless when you have set up the installatoin on the mac.
ip link list
ip link set [device] up