Wednesday, November 19, 2008

Recently completed

Fixed audio so it stopped screeching painfully in my headphones
Switched from "Office for Mac" to OpenOffice
Installed a USB-based printer

Tuesday, November 18, 2008

Dual booting Windows XP and MacOS X

(distilled from this helpful guide)...

As a precaution, disable all other disks in BIOS.

Install XP on NTFS
Shrink its partition to 40Gb (using gparted or PartitionMagic)
Add (FAT32) partition for future OSX

Boot OSX DVD
Disk Utility
  • erase (Journaled) OSX partition
  • verify it's mounted
Terminal
  • diskutil list
  • fdisk -e /dev/rdiskN (0 if other disks are disabled)
  • print
  • flag X (to make new OSX partition active (bootable))
  • write
  • exit
Install OSX
Reboot and remember F8!

Tuesday, November 11, 2008

Using dd(1) to copy disks at super-user prompt in Darwin

To binary-level copy one disk to another (including partition, boot record and boot loader data):

1. Boot OSX for interactive Darwin bootloader and use '-s' for single-user mode to get a root prompt (#).

2. Assuming source=disk0 and destination=disk1, issue:
# dd if=/dev/disk0 of=/dev/disk1 bs=4096

Important:
Eliminate confusion by disabling (in BIOS or by unplugging) all irrelevant disks in BIOS before proceeding.

1. If source & dest are mistakenly reversed when dd is run, the source disk will be quietly overwritten. Avoid this.

2. A type of disk signature(s) get copied as well, so that Disk Utility subsequently interprets the two (now identical) disks as having the same partitions names, even if they are manually changed later.

3. dd is not verbose (so issue 'iostat disk0 disk1 &' first, for status).
I saw ~100Gb/hour on my slow SATA-1 drives.

4. After the copy, if both source and dest disks are active in BIOS, Windows XP will get confused (since both disks are named "C:"). Avoid by deactivating one in BIOS before booting XP.