Building a Micro Server – Part 1

You might recall a number of months back [I was working on repurposing an old iMac][a_100209211734] into a web server. I was doing this more because it could be done and not because I had to. Truth is I have two other servers which have more then enough head room to take on the additional, and somewhat minor load of web serving duties. But it was the challenge — or complete and utter geek indulgence — that drove me to waste spend my time making something of the old iMac G3.
However, the footprint of an iMac G3 (both physically and environmentally) is not ideal. You can’t rack mount an iMac G3, or stick it on a shelf or hide it under a desk… So I promptly ditched the idea and trumped it up as good bit of fun and some R&D.
But the bug for a smaller server had been planted… I was really liking the idea of a mini server that I could stow away under my desk (and not in a sound proof closet). Not just a web server, but a little *everything* server.
I had initially toyed with the idea of buying a Mac Mini for this but thought my wife would likely kill me for buying a new Mac as an experimental toy server while she continues to work from a PowerMac G4 (that happens to be dying a slow death). So I set about seeing what it would take to build my own micro server with all new parts that would approximate the Mac mini. Could it be done for less?
This is what I found (no affiliation):
* [1u micro server chassis][a_100209224857] – $79.99
* [mini server motherboard][a_100209225129] – $109.99
* [2.2GHz Dual-Core CPU][a_100209225613] – $51.99
* [1u 4 pin CPU fan][a_100209230228] – $47.00
* [2GB DDR2 SDRAM][a_100209225754] – $56.99
* [160GB HDD][a_100209230613] (optional as I had a few laying around) – $51.99
The total, if you include the hard drive, is $397.95 ($345.96 without hard drive). That’s more then $250 – $300 less then the Mac Mini. I know it’s a bit like comparing apples to oranges; the chip is slower, the bus is slower, the footprint is bigger and the I/O doesn’t really compare. On the flip side, the Mac mini doesn’t have a server grade power supply, is limited to slower laptop HDD’s and can’t be rack mounted. There are tradeoff’s either way but when I look at what I am hoping to use it for — web/file/media server — the differences will be outweighed by the 40% – 45% savings of the home built micro server.
This was enough for me, I was sold on the idea. If for nothing else then the pure geeky joy of it… so I went ahead and ordered the parts.
In part two I will show you the assembly of the micro server once the parts arrived, and some of the hiccups I had.
[tags]how to,server,mac mini[/tags]
[a_100209211734]: http://adam.merrifield.ca/2009/09/29/imac-g3-web-server-part-1/ “Adam Merrifield { the collective – the collective thoughts and web works of adam merrifield}”
[a_100209224857]: http://www.newegg.ca/Product/Product.aspx?Item=N82E16811152131 “Newegg.ca – SUPERMICRO CSE-502L-200B Black 1U Rackmount Mini Server Chassis for Intel Atom Platforms w/ 200W Power Supply – Server Chassis”
[a_100209225129]: http://www.newegg.ca/Product/Product.aspx?Item=N82E16813182168 “Newegg.ca – SUPERMICRO MBD-X7SLM-L-O LGA 775 Intel 945GC Micro ATX Intel Core 2 Duo/Pentium D/Pentium 4/Celeron D Server Motherboard – Server Motherboards”
[a_100209225613]: http://www.newegg.ca/Product/Product.aspx?Item=N82E16819116075&nm_mc=TEMC-RMA-Approvel&cm_mmc=TEMC-RMA-Approvel-_-Content-_-text-_- “Newegg.ca – Intel Celeron E1500 Conroe 2.2GHz 512KB L2 Cache LGA 775 65W Dual-Core Desktop Processor – Processors – Desktops”
[a_100209225754]: http://www.newegg.ca/Product/Product.aspx?Item=N82E16820146526&nm_mc=TEMC-RMA-Approvel&cm_mmc=TEMC-RMA-Approvel-_-Content-_-text-_- “Newegg.ca – Crucial 2GB (2 x 1GB) 240-Pin DDR2 SDRAM DDR2 667 (PC2 5300) Dual Channel Kit Desktop Memory Model CT2KIT12864AA667 – Desktop Memory”
[a_100209230228]: http://www.networksupply.ca/product/1455487/SNK-P0032A-4.html “Supermicro SNK-P0032A4 – processor cooler – 1U”
[a_100209230613]: http://www.newegg.ca/Product/Product.aspx?Item=N82E16822136112 “Newegg.ca – Western Digital Caviar Blue WD1600AAJB 160GB 7200 RPM 8MB Cache IDE Ultra ATA100 3.5" Internal Hard Drive -Bare Drive”
Creating Unique ID's For… Anything!
There are numerous reasons you might need a unique identifier on something; you upload files with common names to the same ftp site, you use the id attribute for internal links on a blog that might display multiple posts (the chances of repeating yourself are good), you want to sign your emails with a unique, one time id for your own verification… Whatever the case, a unique id could come in handy.
The easiest thing to do is use a timestamp and a shell script can do that easily enough for us. For everyday use, the year, month, day, hour, minutes and seconds should suffice (unless you need multiple unique id’s per second). Here is how the bash script would look:
date +%y%m%d%H%M%S
Entering this string into the Terminal.app would yield a twelve digit number like this:
091027191546
The first pair of digits is the year, the second pair is the month, the third pair is the day, then the hour, minutes and seconds (all in pairs). Run this script in Terminal.app as many times as you like and you will never get the same number.
So you could enter this into your terminal every time you wanted a unique id… or you could make this shell script work *for* you from anywhere.
## TextMate Snippet ##
TextMate makes running shell scripts dead easy — all you need to do is create your own snippet. To do this:
* open your Bundle editor — `Bundles > Bundle Editor > Show Bundle Editor` ***or*** `⌃⌥⌘B`
* create a new bundle (if you don’t already have your own) from the + icon
* within that bundle create a new snippet from the + icon
* in the edit window, type:
`date +%y%m%d%H%M%S`
* define a Tab Trigger or Key Equivalent
* leave the scope selector blank to have the snippet apply to all language types
Now you have a snippet that is accessible in any language scope you use TextMate for. This is handy if you write reference links in HTML articles, such as:
Or for reference style links in MarkDown:
Check out our site, [seyDoggy][a_091027194631], for some
really cool tips and tricks.
[a_091027194631]: http://www.seydoggy.com/ “seyDoggy’s really cool site”
### Download ###
Download your fresh copy of “[Unique ID.tmSnippet][a_091027205118]” from seyDoggy.com.
## AppleScript to clipboard ##
Say you’re not a TextMate user but you still want a quick way to run this shell script with as little effort as possible. AppleScript makes quick work of this task with it’s `do shell script` functionality. We need to make an AppleScript that runs the shell script, then copies the results to the clipboard. Then we can paste that result into what ever we’re working with at the time; file renaming, email signing, etc…
Here is how the script looks:
set uniqueID to (do shell script “date +%y%m%d%H%M%S”)
set the clipboard to uniqueID
display alert “\”" & uniqueID & “\”" & “Has been copied to your ¬
clipboard” giving up after 1
### Download ###
Get your fresh copy of “[UniqueID.scpt][a_091027205534]” from CodeCollector.net
[tags]applescript,shell,script,textmate,snippet,terminal,unique id[/tags]
[a_091027205118]: http://www.seydoggy.com/downloads/UniqueID.tmSnippet.zip “Download from seyDoggy.com”
[a_091027205534]: http://www.codecollector.net/view/55260B3D-599D-489A-BC7E-C51AF597B2D0 “Download from CodeCollector.net”
Scripting LittleSnapper
[
][ls]I hate clutter in my Dock… I also hate being slowed down looking for things. You can imagine these two positions are at odds with each other quite often. I don’t use the Dock in Mac OS X as a place to launch apps so much as I use it as a visual reminder of the things I can do, but don’t on a regular basis.
Like [LittleSnapper][ls] for instance. I use it maybe once a day, and for pretty much the same thing — I open it up, I snap the current web page and then proceed to tag it, rate it and upload it to my [ember Pro][em] account — but I don’t keep it open. I quit LittleSnapper when I am done and cary on with the rest of my day. This kind of usage doesn’t warrant a coveted position in my Dock, but if I have to search for the app (Spotlight, Google QSB, QuickSilver) or dig for it in Finder, the inspiration to snap that web page may well pass.
So what does a magna nerdulosa like myself do to address this situation? I automate! AppleScript to the rescue!
The first thing I want to do is launch LittleSnapper and I do that by tossing a little bash in AppleScript using the following:
tell application “LittleSnapper” to activate
And now LittleSnapper is ready to have it’s buttons pushed[*][buttons]:
tell application “System Events”
tell process “LittleSnapper”
click menu item 1 of menu “Capture” of menu bar 1
end tell
end tell
It’s as simple as that! The full script will:
* Luanch LittleSnapper
* tell LittleSnapper to go into the “Capture” menu
* click “Snap Web Address from Safari”
You can then cary on with tagging, annotating or whatever else tickles your LittleSnapper fancy.
## Now what? ##
For me the next step is to save the script in `~/Library/Scripts/` add a hot-key combo to it using [Red Sweater Software's][rssw] [FastScripts.app][fsa]. You could also use this in [LaunchBar][lb], [QuickSilver][qs], [Butler][btlr], or any other means you may use to run AppleScripts.
## Full Script ##
– This script launches LittleSnapper
–
– and tells it to snap the current web page
– By Adam Merrifield
– r4 10-08-09 08:12 (removed delays)
tell application “LittleSnapper” to activate
tell application “System Events”
tell process “LittleSnapper”
click menu item 1 of menu “Capture” of menu bar 1
end tell
end tell
## Download ##
[Get it fresh from CodeCollector.net][ccdn]
## Notes ##
[buttons]: http://www.seydoggy.com/2009/09/30/scripting-littlesnapper/#buttons
## References ##
* [Apple Developer Connection][apldev]
* [MacScripter][mcscrpt]
* [Mac OS X Hints][mcoshnt]
## EDITS ##
### r4 10-08-09 08:12 ###
I’ve removed the delays I once needed before each section. The modifier keys I was using (specifically ⌥) in my hot-key sequence were being passed to LittleSnapper and causing LittleSnapper to prompt me to choose a new image library. Taking ⌥ out of the sequence negated the need for the delays.
### r2 09-30-09 11:42 ###
While there is technically nothing wrong with the original script, the bash line — `do shell script “open -a LittleSnapper”` — throws an error in console and some part of that line looks as though it will not be supported for much longer. So I have changed this line to the slightly more verbose `tell application “LittleSnapper” to activate`
I have also split the 1 second delay into two 0.5 second sections, one at the front end and one before system events. It seems [FastScripts.app][fsa] really is fast and is getting ahead of itself when executing the script with hot-keys. That causes issues for me but may not affect you, depending on what you use to run your scripts.
[tags]applescript,automation,littlesnapper[/tags]
[ls]: http://www.realmacsoftware.com/littlesnapper/ “LittleSnapper – Screenshot and Website Capture for Mac OS X Leopard”
[em]: http://emberapp.com/seydoggy/ “View all images :: Ember”
[rssw]: http://www.red-sweater.com/ “Red Sweater – Amazing Mac Software”
[fsa]: http://www.red-sweater.com/forums/viewtopic.php?id=878 “How can I set keyboard shortcuts for FastScripts menus? (Page 1) – FastScripts – Red Sweater Software”
[lb]: http://www.obdev.at/products/launchbar/index.html “LaunchBar 5″
[qs]: http://code.google.com/p/blacktree-alchemy/ “blacktree-alchemy – Project Hosting on Google Code”
[btlr]: http://www.manytricks.com/butler/ “Many Tricks · Butler”
[ccdn]: http://www.codecollector.net/view/FCD7F708-8EB8-404D-B173-A8D2C6254B48
[apldev]: http://developer.apple.com/applescript/
[mcscrpt]: http://macscripter.net/
[mcoshnt]: http://www.macosxhints.com/search.php?query=applescript&mode=search&type=all&keyType=all
TextMate Tip: Use Color Picker in All Bundles
After reading this [TextMate tip](http://textmatetips.com/general/2009/06/color-chaning-on-the-fly-via-cmd-shift-c/ “Color chaning on the fly via cmd-shift-c | TextMate Tips”) this morning about using the color picker in TextMates CSS bundle, it reminded me of an article I thought I wrote once about extending this same color picker functionality to the other bundles I commonly use in TextMate (namely Property List). After a quick search here and on other blogs of mine, I was unable to find it. So I [Googled it](http://www.google.com/search?hl=en&client=safari&rls=en-us&q=textmate+color+picker+command+plist+seydoggy&aq=f&oq=&aqi= “Google”) and as it turns out, I blogged about it on Flickr of all places. Knowing the information wasn’t of much use there, I thought I had better revisit this tip for the benefit of other geeks.
### Use Color Picker in Other Bundles
So here is the gist of it; in the CSS bundle in TextMate you can quickly pick colors for your CSS properties. This is great, but I do a lot with hex colors in other bundles too, like the Property List, Javascript and jQuery bundles. So here is what I did…
I opened the Bundle Editor (⌃⌥⌘B), went into the CSS Bundle, found the “Insert Color…” command and made a copy of it (it’s the ++ icon at the bottom of the panel). I selected and renamed the command and changed it’s Scope Selector from “source.css” to “text, source”. This will enable color picker for just about everything. “text” will cover all of the plain text based languages like HTML, XML, Property List, Markdown, BB Code, LaTeX, etc… While “source” will cover all the programatic languages like CSS, Javascript, PHP, Ruby, etc…
Now keep in mind that this particular command is going to add the hash (#) as a prefix. This may not suite you needs for some languages so you may choose to make another “Insert Color…” command for those languages and modify the appropriate lines, then use “source.actionscript.2″, for example, as your Scope Selector.
Play around with the poosibilities and have fun.

[tags]textmate, bundles, plist, css, color picker[/tags]
Enabling Double Arrows in the Scroll Bar
Ohh, ohh, ohh, I can’t forget this one! This is one of those options you forgot you enabled with a utility like [Onyx](http://www.titanium.free.fr/pgs/english.html “Titanium Software”). So when you go and do your clean install of OS X and realize that some things are just not the same as they were, it’s the the little things like having double arrows at the top and bottom (or left and right) of a scroll bar that you miss.
Having vowed to take matters into my own hands with this install and being acutely aware of every system hack I make, I am documenting everything I do (on this blog) and I am making sure it’s something I can control via the terminal. So, instead of using Onyx, here is the terminal hack for enabling double arrows in your scroll bars:
defaults write "Apple Global Domain" AppleScrollBarVariant DoubleBoth
If you ever need to go back you just open the System Preferences (`/Applications/System Preferences.app`), click on appearance and choose one of the two defaults from “Place scroll arrows:”; “Together” or “At top and bottom”.
Control your processors in Mac OS X 10.5
Remarkably after nearly one month I am still trying to tweak my system just so. I think this is one of the last things though, my processor preference pane. By default, the CPU controls in Mac OS X 10.5 and not enabled and in fact, can’t be enabled unless you have the developer tools installed.
I like to be able to turn off some of my processors when I am just doing day to day web design and theme development. It’s a good way to save some energy (it’s good to be green) and to be totally honest, coding in HTML, CSS, PHP, Javascript and XML isn’t all that processor intensive. With the developer tool installed you can do this. There two things you can do, you can run the CPUPalette.app and/or you can install processor preference pane.
The CPUPalette.app can be found in `/Library/Application Support/HWPrefs/`. It’s a simple app that doesn’t allow much other than turning the processors on or off. If you click the little pill button in the top right-hand corner you can see a couple of basic preferences for window type, sampling rates and information display. It’s a quick and easy way to both monitor how your cores are being taxed and whether or not you can afford to shut a few of them down.
Your other option, if you you are already familiar with your processor usage, is to install the processor preference pane. Go to `/Developer/Extras/PreferencePanes` and find `Processor.prefPane`. Double click to install it. Once installed I highly suggest you click the “Show control in menu bar” for quick access. You’ll notice by installing the processor preference pane you get access to the CPUPalette.app without having to dig for it.
Auto mount/unmount your Mac volumes when required
Earlier this month you might recall the solution I gave you for [keeping unused volumes unmounted](http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/ “seyDoggy Web and Graphic Design – seyDoggy weblog – my thoughts on the web and the mac”) on your mac. The next part of the equation, automatically mounting those volumes when needed to run my backup scheme, took me a little longer to sort out. In fact I wasn’t able to write a solution on my own, try as I might, so I finally went searching for one.
I needed a script of some sort that would mount my unmounted volumes when it was time for [ChronoSync](http://www.econtechnologies.com/pages/cs/chrono_overview.html “ChronoSync | Perform File and Folder Synchronizations and Backups Like Clockwork | Econ Technologies”) to run and then unmount my volumes when ChronoSync was finished. After several IRC queries, forum posts here and there and countless Google searches I finally stumbled upon [this post](http://www.macosxhints.com/article.php?story=20060308154312630 “macosxhints.com – A script to mount/unmount a volume on app launch”) at Mac OS X Hints. This solution was the answer I needed and it works perfectly. I won’t recap the whole thing here, but I will give you the bits that were most important to me.
Copy the following script into *Script Editor.app* (`/Applications/AppleScript/Script Editor.app`), changing the `diskname` and `appname` to suite your needs:
property diskname : "MyDisk"
property appname : "ChronoSync"
on idle
tell application "System Events"
set x to the name of every process
if appname is not in x then
if (exists the disk diskname) then
do shell script "disktool -l | egrep -i "Mountpoint = '/Volumes/" & diskname & "" | cut -d\' -f2 | xargs -n1 disktool -p"
end if
else
do shell script "disktool -l | egrep -i "Mountpoint = '', fsType = 'hfs', volName = '" & diskname & "" | cut -d\' -f2 | xargs -n1 disktool -m"
end if
end tell
end idle
Next you need to save it as a bundled app and select “*Stay Open*”, give it a useful name and save it where you will be able to find it. In my case I chose `/Library/Scripts/ChronoSync/`:

Then you have to make it run in the background. To do this, find your newly created app, right click on it, “*Show Package Contents*”, find the Info.plist and open that in your favorite plain text editor. Above the key that says `CFBundleAllowMixedLocalizations` you want to add the following:
<key>LSBackgroundOnly</key>
<string>1</string>
Get out of the package and find your app again and double click on it. It should launch in the background but not show in the dock. You can see that it’s running by opening *Activity Monitor.app* (`/Applications/Utilities/Activity Monitor.app`):

Now to truly make this process automated, you need this app to be on when your computer is on, so it needs to launch when you login. So open your Accounts preference pane in System Preferences.app (`/Applications/System Preferences.app`), select the *Login Items* tab, select the  button and add your newly created app:

And that’s it! Next time your backup program fires up to do it’s regularly scheduled backups, your disk mounting app will mount your volume, wait for your backup app to finish and then quietly tuck your volume back up for the night.
##Other references
1. [A Script to mount/unmount a volume on app launch](http://www.macosxhints.com/article.php?story=20060308154312630 “macosxhints.com – A script to mount/unmount a volume on app launch”)
2. [An AppleScript to mount, run, unmount a disk image](http://www.macosxhints.com/article.php?story=20040905112951299 “macosxhints.com – An AppleScript to mount, run, unmount a disk image”)
3. [MountPart](http://www.well.com/~jfw/software/mountpart/ “John F. Whitehead – MountPart – Mount/Unmount Individual Partitions”)
YourHead launches Stacks 1.0
Fellow RapidWeaver developer, Isaiah of [YourHead Software](http://www.yourhead.com/ “YourHead Software”) announced today that [Stacks](http://www.yourhead.com/stacks “Stacks”), a fluid layout plugin for [RapidWeaver](http://www.realmacsoftware.com/rapidweaver/ “RapidWeaver 4 – Powerful Web Design Software for Mac OS X”), is now official, hitting the big version 1.0. Those of you familiar with YourHead’s previous heavy hitting page layout tool, [Blocks](http://www.yourhead.com/blocks/ “Blocks”), will immediately recognize what this RapidWeaver plugin is all about, but the two are as different as night and day.
Don’t get me wrong, Blocks is a brilliant feat of plugin engineering and is the life blood of literally throngs of RapidWeaver users unable to do such layouts on their own. But it’s not a plugin that ever fit my web design sensibilities. The web is fluid, ever changing, growing, shrinking… for me, Blocks was too rigid.
Enter Stacks; a completely fluid, flexible, drag’n'drop all about layout tool for RapidWeaver that can generate oodles stacked up, blocked up, split up, embedded here and there kind of page layouts that only a pocket full of hand coded snippets could achieve perviously. Just like Blocks, Stacks allows to drop in text, HTML, images and whatnot, but then it allows to stacks onto stacks and those onto more stacks. You can make columns, columns in columns, columns where one column is an image, one is some code, one is some text, etc… drag that under some more columns… before you know it, you’ve got your very own [960 Grid System](http://960.gs/ “960 Grid System”) built into a RapidWeaver plugin.
If you are looking for the ultimate in flexible page layout with RapidWeaver, go [check out Stacks](http://www.yourhead.com/stacks/ “Stacks”). There are some great movies demonstrating the raw power of it and there is also and [Stacks API](http://www.yourhead.com/wikiwiki/index.php?title=Stacks_Library_API “Stacks Library API – YourHead”) if you’re interested in creating a custom Stacks library or two.
Keeping unused hard disks unmounted
##The question
How do you prevent Mac OS X Leopard from auto mounting disks, drives and volumes when the computer boots up or a user logs in? ([skip to the solution](http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/#shortcut02-11-09-22-27))
##The preamble
I have spent days (literally) searching for the answer to this one; I have a Mac Pro running Leopard with (count them) 4 internal hard drives. One is my system disk and the other 3 are backup disks. Two are weekly mirrors of my system while the third is a daily snap shot of my user account. We won’t even get into the external disks I have. Yes I am THAT anal about my data.
So what is the trouble here? When you have this many disks containing duplicate data, [Spotlight](http://www.apple.com/macosx/features/300.html#spotlight “Apple – Mac OS X Leopard – Features – 300+ New Features”), [QuickSilver](http://groups.google.com/group/blacktree-quicksilver “Blacktree: Quicksilver | Google Groups”), [Launchbar](http://www.obdev.at/launchbar/ “LaunchBar 5 Beta”), [Google QSB](http://code.google.com/p/qsb-mac/ “qsb-mac – Google Code”), etc… they all want to serve up information found on each disk. That would include duplicate information that you most likely don’t want to inadvertently open and/or edit. But further to this, why spin up a disk, potential shortening it’s life span and wasting precious energy, when it only gets used on occasion?
One way around this is to diligently eject each volume every time you boot up your system. But that is both a pain in the butt and no where near as geeky as it should be. So do a quick search on Google for a solution to “unmount disk on login” or “prevent volumes from mounting at the boot up in Mac OS X Leopard” and you get a great deal of outdated info, inefficient Apple Scripts, overly complex bash commands, apps that wrap bash in an executable app that you launch at login when the moon is at… you get the idea.
So I set forth to put together the best of the best and simplest of the simple and post it here, for my own reference, exactly what *I* did to prevent my back up volumes from mounting on boot up.
##My Solution (proceed at your own risk)
First off, what you are going to find with most solutions out there is the need for a file called [fstab](http://en.wikipedia.org/wiki/Fstab “fstab – Wikipedia, the free encyclopedia”) in the systems hidden “/etc” folder. The trouble is that later versions of OS X (10.4.x and later) don’t have this file. *However*, there *IS* a redundant file called fstab.hd. *WE ARE NOT USING THIS FILE*. Instead we will create our own fstab file. So with *that* out of the way, let’s get started:
###The short of it
1. Start by making a backup of your system. If you bugger up your system you’ll have something to recover from.
2. Open terminal (/Applications/Utilities/Terminal.app)
3. Do one on the following:
* In Terminal, type the following (with your volume name) and return [`*`](http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/#note1):
`diskutil info /volumes/DiskName`

* Or, you can use Apples Disk Utility app (/Applications/Utilities/Disk Utility.app), select the disk in question and choose “info” from the toolbar.

4. Find the Volume [UUID](http://en.wikipedia.org/wiki/UUID “Universally Unique Identifier – Wikipedia, the free encyclopedia”) (Universal Unique Identifier). Copy the UUID to your clipboard [`**`](http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/#note2).
5. In Terminal enter and return [`***`](http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/#note3):
`sudo pico /etc/fstab`
6. Enter your password and return.
7. You’ll enter a window that looks like this:

8. Enter the following (with your UUID) and return [`****`](http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/#note4):
`UUID=87635CC4-B2EF-3114-B854-F64347A39630 none hfs rw,noauto 0 0`
9. Repeat step for each device you with to hide, each on a new line.

10. Exit pico (⌃X) and save (Y).
11. Press return when prompted with:
`File Name to Write: /etc/fstab`

12. All that’s left to do is is cross your fingers and reboot your Mac.
###The long of it
* `*` substitute “DiskName” for the name of the volume you wish to hide. If your volume name contains a space, like “Macintosh HD” you need to escape the space with a backslash so it looks like “Macintosh\ HD”
* `**` We use the “Volume UUID” as the disk identifier since it is not prone to change like “Device Identifier” (i.e. “disk0s2″) which can change with each and every start up.
* `***` This will create/edit your “/etc/fstab” file with [pico](http://tinyurl.com/bstnru “Pico (text editor) – Wikipedia, the free encyclopedia”), a simple text editor.
* `****` The string you are entering is the device id followed by the mount point, the filesystem, the mount options, the dump and fsck booleans. In this case:
* the device is my UUID (UUID=87635CC4-B2EF-3114-B854-F64347A39630)
* the mount point is “none” (because we won’t be mounting it)
* the file system is “hfs” (since it’s formatted for Mac)
* the mount options are “rw” (read-write) and “noauto” (volume will not auto mount)
* the dump option (backup utility) and fsck option (filesystem check utility) booleans are both set to 0 (false, off, nil, nada) since we don’t plan to mount the volume and therefor don’t need to backup or check them
For more on fstab column structures, visit [tuxfiles fstab help](http://www.tuxfiles.org/linuxhelp/fstab.html “How to edit and understand /etc/fstab”).
##The wrap-up
For whatever reason, Apple decided to nix fstab from it’s own Unix core. Perhaps for security or perhaps they just deemed it unnecessary. If you look in the *other* file I mentioned, “/etc/fstab.hd” (in terminal, enter and return: `sudo pico /etc/fstab.hd`), you’ll see the message:
> IGNORE THIS FILE.
This file does nothing, contains no useful data, and might go away in
future releases. Do not depend on this file or its contents.
However, I see no harm in extending the life expectancy of my disks and saving energy at the same time. All while doing away with the annoyance of long indexing times and being inundated with duplicate search results. If you have anything to add, please feel free to leave a comment.
##Other references
1. [Mac OS X Hints from 2006](http://www.macosxhints.com/article.php?story=20060218083814209 “macosxhints.com – Unmount a volume (on login) via AppleScript”)
2. [Mac OS X Hints from 2005](http://www.macosxhints.com/article.php?story=2005052804075538 “macosxhints.com – Unmount a volume at startup”)
3. [Mac OS X Hints from 2004](http://www.macosxhints.com/article.php?story=20040624012142602 “macosxhints.com – A script to unmount cloned backup volumes at login”)
4. [Mac OS X Hints from 2003](http://www.macosxhints.com/article.php?story=20030227194830916 “macosxhints.com – Create a more dynamic fstab using UUIDs”)
5. [MacSeven from 2007](http://www.macseven.com/files/20070719_how_to_prevent_a_drive_volume_from_mounting.html “How to prevent a drive volume from mounting | Tips & Tricks | MacSeven.com”)
6. [Garbage In Garbage Out from 2007](http://www.gigoblog.com/2007/05/01/prevent-mac-os-x-from-mounting-a-hard-drive-volume-at-boot/ “Garbage In Garbage Out : Tech Blog – » Prevent Mac OS X from mounting a hard drive volume at boot”)
7. [UUID on Wikipedia](http://en.wikipedia.org/wiki/UUID “Universally Unique Identifier – Wikipedia, the free encyclopedia”)
8. [Pico on Wikipedia](http://tinyurl.com/bstnru “Pico (text editor) – Wikipedia, the free encyclopedia”)
9. [How to edit and understand fstab files](http://www.tuxfiles.org/linuxhelp/fstab.html “How to edit and understand /etc/fstab”)
Rebuilding after all of these years!
Rebuilding after all of these years. Seriously, it’s been years since I have done a clean install… since Mac OS X 10.2 to be exact. I have been pulling all the crud I have collected over the years along with me like barnacles on the bottom of of the ship of life. And like the real thing, those barnacles have been slowing me down.
This became painfully obvious recently when I made a new user account to make some tutorial movies. The new account was *fast* and *responsive* in a way I hadn’t experienced in years. If this wasn’t evidence enough, I was having a nagging problem with [TaskPaper from Hogbay Software](http://www.hogbaysoftware.com/products/taskpaper “TaskPaper — Simple to-do list software”) where for no obvious reason, it would quite with every launch. Between Jesse and Apple they were able to nail it down to a webcam component that was not proper GC code but was pretending to be. The point is, I have no idea where I ever picked up that component or when even. It was time to nuke and rebuild.
The reason I haven’t in so many years is because I have come to rely on so many hacks over the years, things that Mac OS X wasn’t either capable of or didn’t do well enough. It was a scary thought to try and get by on a stock system or try and replicate those hacks again. For the last little while I’ve been trying to change my habits, trying to use less 3rd party hackery and find native solutions or terminal commands that accomplish the same thing.
For instance, years ago I used to use [USB Overdrive](http://www.usboverdrive.com/ “”) to ramp up my mouse tracking and and assign special functions to various mouse button combinations. When support for it waned I turned to [SteerMouse](http://plentycom.jp/ “Main Page”) which did almost exactly the same thing. But now-a-days I barely use the mouse and when I do all I really need is a speed boost which is easily [achieved in the terminal](http://www.macworld.com/article/49691/2006/03/turbomice.html “Turbocharge mice and trackpads | Mac OS X Hints | Macworld”):
> If you have a mouse:
>> `defaults write -g com.apple.mouse.scaling some_number`
>If you have a trackpad:
>> `defaults write -g com.apple.trackpad.scaling some_number`
>The some_number at the end of each of the above lines must be replaced by, well, an actual number indicating the speed you’d like to use—the higher the number, the faster the tracking will be. As a starting point, the default value for maximum mouse speed is 3.0, and maximum trackpad speed is 1.5. So you might try a starting value of 5.0 for your turbo-charged mouse, and 2.5 or 3.0 for a turbo-charged trackpad.
> The easiest way to make your changes take effect is to log out and then log in again (Apple menu: Log Out user name ).
I guess my point is this (wearing my nutMac/productivity hat), if you are going to spend any time as a developer of any sort, keep your system customizations to a minimum, install only those apps you honestly think you’ll need or use, find native solutions to mods you can’t live without, document those mods carefully and alway be prepared to do a clean install from time to time. The less cluttered your system is the better chance you have using a migration assistant so you don’t have to do it all manually like I did.
That’s where I am at now. I have spent nearly two whole days manually moving preferences and folders for the apps I need so that I can be sure not to take all the other crap with me again. Now that I have done my clean install I should have no trouble keeping it clean every six months now.

