Snow Leopard Upgrade

by Sebastien Mirolo on Sat, 29 Aug 2009

Operating System and Applications

Snow Leopard was released Friday for $29 so I could not resist a stop by the Apple Store to pick a fresh copy up. As I decided to take the opportunity to upgrade other everyday tools as well, it took me about ten hours to complete the process.

My disk is partitioned in two. The operating system, /Applications, /Library, etc. is mounted on the first partition while /Users is mounted on the second partition. None-the-less, I did a backup of the home folder before shuffling the Snow Leopard DVD in. I also reviewed my post-installation script in order to update all relevant applications at the same time.

Carbon Emacs2009/01/112009/07/25
VMware Fusion2.

I tried updating Graphviz to version 2.24 but the installer failed. Hopefully, I kept the installer for 2.22 around and ended-up putting that version back. I also try to install GIMP 2.6.7 for Leopard but it failed because it could not find the python2.5 framework. Of course, since python2.6 is the framework installed on Snow Leopard.

As I was playing with compiling VirtualBox and qemu, I only found useful packages in MacPorts. With Snow Leopard, I definitely switched to using MacPorts for installing most open source software on the macBook.

After final checks, I insert the DVD into the macBook. Surprise, nothing shows up and the disk does not show-up as mounted. Maybe I will get lucky if I switch to an administrator account. Nope. Time to reboot holding down the 'c' key... I do not trust OS upgrade processes anyway. I believe it is better to install the system clean and post configure afterward. That is the main reason I keep two partitions after all. I booted from the DVD, went through the Language screen, and in "Disk Utility", I erased the "Macintosh HD" disk drive before proceeding with the installation.

I definitely have a dual personality on my machine :). When the installer asked for account information, I enter _username with a full name of "firstname Admin" because the installer will mark this account as an Admin account. Later on, I create a standard account with my everyday login and real firstname/lastname. I then re-apply standard security configuration such as:

  • System Preferences > Accounts
      Turn off automatic login
  • System Preferences > Accounts > Login Options
      Display login window as name and password
  • System Preferences > Security > General
      Require password immediately after sleep
  • System Preferences > Security > Firewall
      Turn on Firewall
  • Disable remote control infrared receiver

I tried to mount /Volumes/Home directly as /Users using a previously working change to /etc/fstab but it did not work.

[host]$ cd /
[host]$ sudo sh -c 'echo "LABEL=Home /Users hfs rw 0 1" >> /etc/fstab'
[host]$ sudo rm -rf /Users/* /Users/.localized

The machine booted, black screened and shut down. I had to boot from the DVD and fix the directory structure in order to get the OS to boot again correctly. Short of ideal, I ended-up soft linking /Users to /Volumes/Home.

[host]$ ln -s /Volumes/Home /Users

The order I had previously setup the accounts in Leopard was reverse from what I did this time around so I fixed the UIDs and GIDs accordingly.

[host]$ cd /Users
[host]$ sudo chown -R username username/
[host]$ sudo chown -R _username _username/
[host]$ sudo chgrp -R admin _username/

At this point, I had to fix the hostname of the machine.

[host]$ sudo scutil --set HostName macBook

I then was able to run my post-install script in order to install everyday third-party applications such as Emacs, XCode, etc. As I prefer to check was goes on when installing software, I make a fingerprint of the system partition before installing new packages. It took about 20min to complete the mtree command on the system partition at this point. Of interest, Snow Leopard comes with python 2.6.1 installed by default.

Virtual Machines

I use three Virtual Machines for testing my code: one Fedora, one Ubuntu and one Windows Vista. I decided to re-install all three fresh, upgrading from Fedora 10 to Fedora 11 in the process. First I made the directory where the virtual machine live.

[host]$ sudo mkdir -p "/Library/Virtual Machines"
[host]$ sudo chgrp staff "/Library/Virtual Machines"
[host]$ sudo chmod 775 "/Library/Virtual Machines"

Once VMware Fusion starts, it prompts for the serial number and moves on to the Virtual Machines window. I was surprised to see my previous machines there since they resided on the "Macintosh HD" which got wiped out. There must be some files in my home directory somewhere for that to happen.

I used the following settings for the Virtual Machines:

  • 1Gb of RAM
  • 10Gb of disk space
      (Windows complain it needs more so I bumped this to 30Gb on that machine)
  • Share Home folder and rename it from "username on My Mac" to "username".
Ubuntu 9.04Fedora 11Vista
distributionamd64 Desktop CDx86_64 DVDUltimate with Service Pack 1 (x86)
VMware Settings UbuntuOther Linux 2.6.x kernel 64-bit.Windows Vista x64
aptitude install openssh-server
chkconfig sshd on
# After installing Cygwin
# and downloading "Net > openssh"
chmod 666 /etc/passwd /etc/group
chmod +x /var
ssh-host-config -y
chmod 644 /etc/passwd /etc/group
cygrunsrv --start sshd

Remains to assign a static IP to each virtual machine by, first, finding the MAC addresses of each virtual machine:

[host]$ find /Library/Virtual\ Machines -name '*.vmx' -exec grep -H 'ethernet0.generatedAddress ' {} \;

then, add the following lines to /Library/Application Support/VMware Fusion/vmnet8/dhcpd.conf

host armada {
    hardware ethernet 00:0c:29:ba:c7:d6;
    option host-name "armada";

host mealua {
    hardware ethernet 00:0c:29:86:3d:7a;
    option host-name "mealua";

host queixada {
    hardware ethernet 00:0c:29:d8:12:4b;
    option host-name "queixada";

and finally, reboot the DHCP daemon

[host]$ sudo /Library/Application\ Support/VMware\ Fusion/ --restart

Virtual Machines Specific Notes

There are more detailed notes on a previous post about setting-up a development system. Here are only the specific notes this time around.

Fedora 11 specific notes

Fedora 11 is a live CD. That means you will boot in a running system off the CD and click on "install on hard drive" to install it on the Virtual Machine. An error shows up about "processing drive sda, Maybe it needs to be reinitialized". Click re-initialize the first time the error shows up. Canceling, going back and changing your mind does not seem to work to move the installer further. I picked "Replace Existing Linux System" when asked.

Ubuntu 9.04 specific notes

VMWare Fusion 2.0.5 identifies the Ubuntu 9.04 CD correctly and thus installs fine with no prompting. Nice.

Vista specific notes

This time around, I used username (i.e. the same one as used on OSX) for account information. It made the installation of sshd way smoother.

by Sebastien Mirolo on Sat, 29 Aug 2009