Use diskutil and installer on the Mac OS X Install CD

Nov 09, '04 09:07:00AM

Contributed by: macevangelist

An earlier hint showed us how to use such command line tools as diskutil and installer while in single user mode under Mac OS X 10.3. I wanted to do the same thing, but while starting up from the Mac OS X Install CD. Since the CD itself is write protected, there are couple of additional steps needed to make this work. The good thing is that all the steps are actually right there in a file called rc.cdrom, located in /etc. The only thing we have to make sure is that the script rc.cdrom ends before it invokes the GUI and starts the Installer application.

We still have the problem that the CD is write-protected, so we cannot just edit the rc.cdrom file and run it. Apart from that, there is no text editing tool (like vi or pico) installed on the CD. But luckily there is a tool named head. With head, you can print a self-defined count of lines back to the shell from the file you specify.

The most important thing is to find the line you would want the rc.cdrom script to stop at. I guess that would be right before the /System/Installation/CDIS/splash command is defined. In my case, that was line 168. Adapt the line number to the rc.cdrom script you find on your Install CD in /etc/. So finally here's the walkthru:

  1. Insert the Mac OS X Install CD and reboot / turn on your Mac
  2. Press the C key and wait for the Apple logo to appear
  3. Immediately press and hold cmd - s until the Apple logo dissappears
  4. Wait for the command line prompt
  5. Execute the command: head -n 168 /etc/rc.cdrom | sh
  6. Press the return key to get your prompt back after the script has finished
Now you can use diskutil or installer right from the CD. Especially when you install the OS, this is a real time saver.

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20041108063942847