|
Apple Mac Mini
How-to
|
Disk Partitioning
In order to install Linux on a Mac,
the hard disk must have several partitions.
It's possible to have a partition for Mac OS X
and be able to dual boot.
Since my intention is to use the Mini as a server 24/7,
Mac OS X isn't needed at all.
However, it's good to have a small Mac OS X partition
and be able to dual boot anyway
because if the Mac ever needs to be serviced,
the technician isn't going to know what to do with a Mac
that only boots Linux.
Using Disk Utility
For the kinds of partitions we need to create
(several small ones),
Apple's Disk Utility
has problems:
it doesn't keep the partitions the size you set them at
and trying to fix them messes up others.
The best way to partition the disk
is to leave most of the disk as "free space"
with only a single, small Mac OS X partition;
then later, during the disk partition phase of the Debian installer,
complete the partitioning.
Therefore, using Disk Utility,
I set aside 32 GB of free space
followed by an 8 GB partition for Mac OS X.
(You probably could get away with a 5 GB partition
for Mac OS X.)
Once done, install Mac OS X on the 8 GB partition.
Then boot the Debian CD.
|
Links
Notes
| |
The partition numbers are how they appear
in the Debian installer.
(Partitions 1-2 are various Apple driver things.)
The partition numbers later become the disk devices, e.g.,
the root partition becomes /dev/hda5.
|
| |
|
| |
For the file partitions,
I chose the Reiser filesystem, aka, ReiserFS.
It's supposedly much faster at dealing with lots of small files.
You're free to
do your own research.
|
|
Partition layout
I prefer having multiple Linux partitions
because it makes backups and repair (if needed) easier.
(The / and /usr/local partitions change infrequently,
so they don't need to be backed up as often; the /tmp partition
never needs to be backed up.)
I partitioned the Mini's 40 GB disk as follows:
| # |
Name |
Size |
Description |
| 3 |
bootstrap |
16 MB |
The boot partition where the boot script and
yaboot
get installed by
ybin.
The partition type is "NewWorld boot partition."
This partition is never mounted
by either Linux or Mac OS X.
For details, see: bootstrap(8), yaboot(8), ybin(8).
|
| 4 |
swap |
256 MB |
The swap partition.
The size of a swap partition should range from 128 MB
to the smaller of either
512 MB or the amount of physical RAM.
The purpose of swap is to act as a "safety valve"
for memory.
If what you're doing with a machine
requires it to use more than 512 MB of swap regularly,
it means you should add more physical RAM,
not more swap space.
|
| 5 |
/ |
4 GB |
The root partition where many critical OS files and software goes.
|
| 6 |
/var |
2 GB |
Mail, logs, caches, etc.
Having this seperate prevents something that's gone amok,
e.g., mail bombs/loops, some process logging lots of stuff, etc.,
from using up all the space on the entire disk.
|
| 7 |
/tmp |
2 GB |
This is where temporary files go:
downloading files, building software, etc.
I wanted to keep it separate from / (root)
to keep / fairly quiescent.
Plus, as mentioned, /tmp never needs to be backed up.
|
| 8 |
/usr/local |
4 GB |
This is where locally installed software
(compiled from source)
goes.
|
| 9 |
/home |
4 GB |
User home directories.
Since I'm the only user on the machine,
this doesn't have to be very large;
plus my real home directory is on my desktop Mac,
not the Mini server.
|
| 10 |
/space |
15 GB |
Extra space.
Rather than needlessly inflate the size of other partition(s)
just to use up the disk,
this partition is what's left over.
In my case, approximately 4 GB of this
is used to store my MP3 collection
since my Mini is also my
home music server.
|
| 11 |
MacOS |
8 GB |
The Mac OS X partition.
|
|