This describes a way how to build a simple media server at home.
Hardware:
- Mac mini (late 2012)
Software:
- Arch linux
- Kodi
We will be creating dual boot for OS X and Linux with no special boot loader. For other setup, refer to wiki. We will keep all data on an external hard drive, so we do not need huge amount of space for the linux system. We will install from an USB thumb drive (will need at least 1GB in size), newer Minis do not have CD roms.
Disk Utility and select the disk (not partition), click Partition (top tool bar).iso from download pageTerminal$ diskutil list and find out its name (let's say it is /dev/disk2)$ diskutil unmountDisk /dev/disk2 to unmount the drive# dd if=/path/to/arch-linux-image.iso of=/dev/rdisk2 bs=1m (we replaced disk with rdisk with os the "raw" disk in OS X and a lot faster, it is not a typo)$ diskutil eject /dev/disk2Alt while bootingInstallation 4.1. Connect to network
$ wifi-menu to setup wireless networking (assuming DHCP is available)
4.2. Setup time$ timedatectl set-ntp true$ timedatectl status
4.3. Partition the drive again ;-)# cgdiskArch tmp partition we created in 1.+128M for the start of the partition.Arch boot partition (~ 100 MB)Arch root partition (fill the space)# mkfs.ext2 /dev/<arch boot># mkfs.ext4 /dev/<arch root>
4.5. Mount the partitions# mount /dev/<arch root> /mnt# mkdir /mnt/boot# mount /dev/<arch boot> /mnt/boot
4.6. Edit mirror list# vim /etc/pacman.d/mirrorlist it will be used pac the next step, so take good care of it here
4.7. Install the base packages# pacstrap /mnt base
4.8 Configure the system# genfstab -U -p /mnt >> /mnt/etc/fstab# arch-chroot /mnt# echo <computer name> > /etc/hostname# ln -s /usr/share/zoneinfo/<zone>/<subzone> /etc/localtime# nano /etc/locale.gen uncomment locales you want# locale-gen# echo LANG=<your_locale> > /etc/locale.conf# mkinitcpio -p linux# passwdBoot loader
# exit or Ctrl + D# umount -R /mnt# rebootReferences: