Macmini-linux

From Bashlinux
Revision as of 13:43, 6 June 2012 by (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Linux in the Macmini

How to install Linux from the CD/DVD drive

  1. Boot with OS X installation CD. Don't forget to press `"c"` key to boot from CD.
  2. On initial screen go to the top bar and choose "HDD Tools"
  3. Choose the current HD and select "Partition" tab
  4. Select "1 Partition", system type Unix
  5. IMPORTANT: Click in "options" and select boot from MBR in order to allow CentOS boots on Mac Mini.
  6. Save and reboot
  7. Press `"F12"` to eject the OS X CD and insert CentOS DVD
  8. Reboot
  9. Press `"c"` to boot from DVD
  10. Do the installation following instructions on screen
  11. When the installation finish, just click on reboot button.
  12. Press `"F12"` to eject CentOS DVD to avoid boot again on installation DVD

How to boot the Macmini from the network

To get this done is necessary to boot it up using an EFI image.

DHCP configuration to boot the Macmini from Linux using NetBoot

ddns-update-style none;
ddns-updates off;
ignore client-updates;
allow booting;
authoritative;

class "AppleNBI-i386" {
  match if substring (option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386";
  option dhcp-parameter-request-list 1,3,17,43,60;
  if (option dhcp-message-type = 1) { option vendor-class-identifier "AAPLBSDPC/i386"; }
  if (option dhcp-message-type = 1) { option vendor-encapsulated-options 08:04:81:00:00:67; }

  # The Apple Boot Loader binary image.  This file will in turn TFTP the kernel image and extension cache.
  filename "macnbi-i386/booter";

  ## JJM Root FS DMG on HTTP Server:
  # option root-path "http://172.10.0.1/Netboot/NetBootSP0/MacOSX10.4.5.i386.JJM.nbi/NetInstall-Restore.dmg";

  ## JJm Root FS DMG on NFS Server.
  # (Note the placement of the second ":"  This indicates where /var/netboot is mounted on each client.
  # The Resources folder should be in the folder indicated by the :, /nbi in this instance.

  ## NOTE: THIS ROOT PATH IS TOO LONG AND WILL NOT WORK.
  # option root-path "nfs:172.10.0.1:/disk/0/Netboot/NetBootSP0:MacOSX10.4.5.i386.JJM.nbi/NetInstall-Restore.dmg";

  ## NOTE: Try to keep the root path as short as possible.  I copy the DMG files to /nbi and export that folder.
  #option root-path "nfs:172.10.0.1:/nbi:NBI-i386.dmg";

  ## bashlinux path
  option root-path "nfs:172.10.0.1:/nbi:mac-linux.dmg";
}

subnet 172.10.0.0 netmask 255.255.255.0 {
  pool {
    range 172.10.0.100 172.10.0.199;
  }

  default-lease-time 7200; # 2 hours
  max-lease-time 86400; # 1 day

  option domain-name "sub.bashlinux.com";
  option routers 172.10.0.1;
  option subnet-mask 255.255.255.0;
  option domain-name-servers 172.10.0.1;
  option broadcast-address 172.10.0.255;
  option time-offset -18000; # EST
  allow unknown-clients;


How to boot the Macmini from HD

Linux boot process in an Intel Macmini is a bit tricky

CentOS

The `gptsync` tool provided by `refit` packege must be enough in order to boot Linux on an Intel Macmini.

Debian

  1. Ensure that partition with `boot` has the boot flag set.
 fdisk /dev/sda
 
  1. Install needed packages
 apt-get install gptsync grub-pc
 
  1. Install grub in MBR
 gptsync
 grub-install /dev/sda
 update-grub