January 14, 2010 -
Tested under Debian Lenny 32 bits.
This howto is based on http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/
Matthias’ post is very comprehensive. This post is basically a raw copy paste of commands, if you want more information, go see Matthias post.
If you find this useful, please give credit to Matthias
Why AFP (Apple Filing Protocol) ?
I wanted to see if AFP was faster than SMB.
A quick test showed my Macbook (running OS 10.6.2) is transfering files 20 % faster on AFP than SMB.
Build netatalk to support encryption
Starting with Netatalk version 2.0.4 (and Debian Squeeze) you won’t need to rebuild to support SSL (see Frank’s comment).
Lenny comes with version 2.0.3 so we still need to go through recompilation (which I recommend doing on another box).
# apt-get build-dep netatalk
# apt-get install cracklib2-dev fakeroot libssl-dev
# apt-get source netatalk
# cd netatalk-2*
# DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -rfakeroot
Install modified version of netatalk
# dpkg -i ../netatalk_2*.deb
# echo "netatalk hold" | dpkg --set-selections
/etc/default/netatalk
ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no
/etc/netatalk/afpd.conf
- -transall -uamlist uams_dhx.so -nosavepassword
/etc/netatalk/AppleVolumes.default
/home/seb "Seb's share" allow:seb
Start netatalk
/etc/init.d/netatalk start
Advertise the service with Avahi
You can skip this step, but it’d mean the server doesn’t magically appear as a Shared drive in your Finder.
apt-get install avahi-daemon
/etc/avahi/services/afpd.service
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h AFP</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>
# /etc/init.d/avahi-daemon restart
Firewall :
Allow tcp/548 (netatalk) and tcp/5353 (avahi)
August 20, 2009 -
Edit Jan 2010 : you can also run Time Machine backups on an AFP drive, which is faster (at least for me), see http://www.wains.be/index.php/2010/01/14/afp-server-in-under-15-minutes-debian/ for more info on installing Netatalk on your server.
Time Machine, the built-in backup utility of OS X is nice (in a “run and forget about it” way) but has a few limitations.
The major problem is it will only backup your data to a physically attached drive (through USB or Firewire) by default.
We will see how we can make it save your data to a Samba/Windows share (not that I like Samba, but OS X supports it well).
(On OS X) In a terminal type this :
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
(On the Samba server) Set up your share for Time Machine, here’s an example you can add to your smb.conf :
[timemachine]
path = /backup/timemachine
comment = Time Machine backup
browseable = yes
writable = yes
create mask = 0640
directory mask = 0750
valid users = user1
hosts allow = 172.16.27.111
Type this at the CLI :
mkdir /backup/timemachine
chown user1. /backup/timemachine
chmod 750 /backup/timemachine
Stay logged as we will need to check something in a minute, type :
cd /backup/timemachine
(On OS X) Make sure you can access the newly created share (and write to it).
Go into System Preferences > Time Machine :
Pick up the Samba share as destination
Wait for the first backup to start
(On Samba server) As soon as the backup starts, you should check the content of /backup/timemachine :
You should find a new directory named like this :
MacBook_002310d4c911.tmp.sparsebundle
The name is following this pattern :
<name of machine>_<en0 mac address>.tmp.sparsebundle
Write the name of the folder down, we will need that info in the next steps.
(On OS X) After a coupe minutes you should get an error from Time Machine :
“Time Machine Error – The backup disk image could not be created.”
This is supposed to happen, if it doesn’t I still recommend you to follow the next steps, or your backup could misbehave after a while.
Start the tool “Disk Utility”.
Click on “New Image”
Volume Name : Time Machine
Volume Size : whatever you want, I created a 100 GB volume (as I usually have around 50 GB or so on my machine). Do not worry, you don’t need 100 GB available on your drive.
Volume Format : Mac OS Extended (Journaled)
Encryption : none
Partitions : Single partition – Apple Partition Map
Image Format : sparse bundle disk image
Save the bundle disk image on your desktop as “MacBook_002310d4c911.sparsebundle” (this is the name we wrote down two steps earlier MINUS THE “.tmp” SECTION)
Copy that file to your Time Machine share on the samba server.
My supposedly 100 GB file was actually taking 86 MB. The file (which actually is a directory) will grow as backups are performed.
Now start Time Machine manually :
This should not produce errors anymore. The first backup will obviously take some time.
Voilà !
My suggestions :
- you may not want Time Machine to run when you are over Wi-Fi. This is why I limited access to the Samba share to my wired IP address only (option “hosts allow”).
- you can install Time Machine Editor which allows backup scheduling (fixing another lack of Time Machine)
- Time Machine Editor also allows to disable automatic backups when the Time Machine drive is connected, I highly recommend doing so : as we are using a network drive here, every time you wake your computer up, OS X automatically reconnects to the Samba share, and trigger Time Machine.
Last word :
- File Vault (built-in encryption system) and Time Machine do not get along very well, Google it up for details.
- Source : http://www.flokru.org/2008/02/29/time-machine-backups-on-network-shares-in-leopard/ and Apple forums.
May 5, 2009 -
Today I connected a MacBook Unibody (13″ and 2,4 Ghz CPU) into a 40″ LCD HDTV (Sony Bravia KDL40L4000) using a MiniDisplay Port to DVI connector, a DVI to HDMI converter and a 5 meter long HDMI cable.
I ran into an “overscan” problem. Overscan means edges of the image are not viewable on the HDTV, which is pretty bad when you maximize a window.
Found the answer online here :
http://forums.whirlpool.net.au/forum-replies-archive.cfm/1113758.html
Basically :
On the Bravia I selected MENU > Settings > Setup > Screen Settings > Display Area
It was set to NORMAL
I changed it to FULL PIXEL
Done !
And for those doubting (you know who you are
), the MacBook can play full HD (1080p) videos on the LCD without troubles (the MacBook comes with a Nvidia 9400M 256MB).
February 10, 2009 -
I’ve been running Mac OS X at home for the past two months.
I somewhat tightened Mac OS X security by disabling automatic logins, setting a password on the screensaver and such.. the usual steps.
Somehow I set the system in the way that whenever I log in, the keychain will be automatically unlocked in the process. I actually don’t want to type two (identical) passwords in a row..
For some reason when the screensaver was starting, the login keychain was automatically locked again, despite the system settings. Tedious when you lock your session (by starting the screensaver by moving the cursor in the lower right corner of the screen) even when leaving your desk for 30 seconds..
After some googling, I finally stumbled upon the solution at this link
http://www.macosxhints.com/article.php?story=20070927204456413
SSHKeychain was guilty.
So if you don’t want to lock your keychain when the screensaver starts :
- open SSHKeychain
- go in Preferences
- go under the Security tab
- select “Use custom security settings”
- Under “On screensaver” set the action you like. I set “No action”.
Voilà !
March 26, 2007 -
My Ipod froze the other day and had to Google around to find how to reset the small piece of hardware.
The following page has a nice interactive panel showing how to access hidden functions of your ipod.
http://www.command-tab.com/2006/03/30/hidden-ipod-commands/
February 16, 2007 -
I’ll describe here my experience with Mac OS X as my main OS after 5 days (installed it on Sun 11 Feb 2007).
I’ll keep this post updated with my latest discoveries.. Don’t blame me if I’m complaining about something while I’m just missing the point, drop a comment if so, I’d love to have feedback from Mac users.