[MacTUG] mac.column.ted: Create a Leopard startup flash drive

Marlon A. Griffith m3griffi at engmail.uwaterloo.ca
Fri Apr 25 10:56:07 EDT 2008


mac.column.ted: Create a Leopard startup flash drive
Tuesday, April 22 2008 @ 09:50 AM PDT


Ted Landau


It's that time again. Time for me to check out the current status of creating an emergency boot drive — this time one with Leopard installed. Let's cut right to the chase: the ease of creating these startup drives continues to move in one direction: from bad to worse.

Creating a pint-sized custom startup drive, with your own selection of utilities, was a breeze in Mac OS 9 or earlier. It became much more difficult in Mac OS X, but was still manageable, all the way through Panther. With Tiger, most previously successful methods would no longer work; you had to be increasingly "creative" to find anything that would get the job done. I detailed this unhappy trend in a pair (one and two) of previous columns here at MacFixIt. In a further article, I provided step-by-step details for a workable solution — installing a version of Tiger on a relatively meager in size (but cost-effective) 1GB flash drive.

First off, there's the question as to why Apple continues to make this worthwhile task so difficult to do. The answer I keep hearing is that Apple's legal department insists on putting up these obstacles, supposedly to protect the copyright of Apple's OS. I am not sure this is the real reason, or exactly what dangers Apple needs protecting from, but that's what I hear. Apple does license the software for creating a bootable CD/DVD to a few companies — primarily disk repair utilities such as Alsoft, Prosoft and Micromat. But Apple is very restrictive here. Even if you are a dues-paying developer and are willing to pay extra for a license, you have to prove to Apple that you are truly worthy. And even those privileged companies have not yet been given a license to use Leopard on a disc. That's right. Alsoft's DiskWarrior and Prosoft's Drive Genius 2, for example, still ship with Tiger. I assume Apple will eventually permit these vendors to move up to Leopard, but it hasn't happ



ened yet. This is the current sorry state of affairs.

What's the problem?

"Wait a minute," you may be saying at this point, "What's so difficult about making a custom startup drive? Can't you simply install Leopard on any drive that is large enough to hold the essential software?" Yes, it is certainly possible to boot from an external USB or Firewire hard drive. There are several brands of portable (bus-powered) drives that are reasonably compact and would do the job. But they are still bigger and more expensive than what I had in mind. My goal was to find a very inexpensive and ultra-portable boot drive that could hold a custom set of troubleshooting utilities — allowing you to keep the drive handy at all times, conveniently taking it with you when you travel, ready for whenever an emergency or any unexpected problem occurs.


Another potential solution would be to install Leopard on an 8GB or greater flash drive. However, while the size here is ideal, these larger capacity flash drives exceed the price limit I was hoping to stay below. I also found that running a full install of Mac OS X from a flash drive to be irritatingly slow (launching almost software took well over a minute).

To keep both size and cost to a minimum, I was hoping to use a 4GB or less USB flash drive. You can get one of these drives for less than $20 and easily keep it in your pocket. True, such a drive will only boot an Intel Mac, but I was willing to accept that limitation.

Once you get down to 4GB, however, the essential OS X software for a "full" install will no longer fit, so the Leopard DVD won't even let you initiate an install to such a drive. The primary solution here is to edit the contents of a Mac OS X Install DVD down to less than 4GB and install that onto a flash drive. The idea is that the flash drive will boot from this stripped-down version of the OS, just as the DVD itself boots. From my experience, a drive with this OS also runs significantly zippier than one holding a full OS install. This is exactly what I did in the article I previously cited, where I managed to get the Tiger system software down to less than 1GB and still have enough room left over for adding my array of third party utilities.

A few weeks ago, I finally got around to checking out whether the same procedure would work with Leopard. It did not. Two issues emerged:

First, with Leopard, the best I could do was get the system software down to around 1.5GB. That's what led me to move up to a 4GB flash drive. But my troubles here were still not over. For reasons that remain mysterious (at least to me), I could never get my Mac to even recognize a 4GB drive, with Leopard installed, as bootable. For example, even when all I did was strip out non-essential contents from a Leopard Install DVD image, to get it down to less than 4GB, and then directly copy the contents to a flash drive (using either Disk Copy or SuperDuper!), the drive would not boot. To be clear, it would show up in the Startup Disk System Preferences pane as a potential startup disk. But it would not boot if selected. Similarly, it would not show up if you held down the Option key at startup, to get a display of all available bootable drives. With Tiger installed instead, the drive would boot just fine. It almost seems as if, with Leopard installed, the Mac refuses to boot fro
m any media less than 8GB. There may be a way around this logjam, but I have not been able to find it.

Second, with the Install-DVD-OS-to-flash-drive solution, you will likely want to find a substitute for the Installer (which is the application that launches by default when you startup). What you want instead is an application launcher utility that allows you to launch the other software that you add to the drive. With my Tiger solution, I used a utility called QuickerPicker — and found a way to modify the system software so that the flash drive would launch QuickerPicker instead of Installer at startup. Unfortunately, these modifications no longer work in Leopard. True, you could simply choose to stick with Tiger here, but this won't do if you have a newer Mac that only boots from Leopard.

[Note: In a pinch, you could let Installer launch and open Terminal (via its Utilities menu). You could then launch applications from Terminal. To make this easier to do, copy the "open" file from the /usr/bin directory on your Mac to the same directory on your flash drive, as it is not included on the Install DVD. But none of this is very user-friendly. I was seeking a less "geeky" solution.]

Finally, you might ask, "Why bother with using a flash drive at all, as opposed to a DVD-R disc?" The answer is that a flash drive is faster and its contents can be easily modified (so as accommodate software updates, for example). Additionally, a write-enabled drive may be required for some third-party utilities to even launch.

What's the (less-than-ideal, but the best I could do) solution?

Having failed with a 4GB drive, I reluctantly moved up to an 8GB drive. In my first attempt, I tried directly copying the entire Leopard Install DVD to the drive. Success at last! It booted and launched the Installer, just as would the Install DVD. Resigned to working with the more expensive 8GB drive, I turned my attention to getting it to boot using an application launcher instead of the Installer. As with Tiger, I selected QuickerPicker. I was initially concerned that it would no longer work in Leopard, but it did just fine. I did search for a more modern alternative utility, but found none that would work (presumably because they require resources not included in the minimal OS on the Install DVD). I could not even get Path Finder to work (as I had been able to do with Tiger).

Here are the step-by-step instructions detailing what I did get to work:

1. If necessary, use Disk Utility's Partition option to reformat the flash drive as GUID Partition Table or Apple Partition Map. The critical thing is that it not be a Master Boot Record partition.

2. Use Disk Utility's Restore feature to copy the Leopard Mac OS X Install DVD to an 8GB flash drive.

3. Temporarily make invisible files visible in the Finder, using one of any number of utilities (such as Invisibility Toggler). You need to do this to access the otherwise invisible folders mentioned in the next steps.

4. Copy QuickerPicker to the Applications folder on the flash drive. Next, to the same folder, add whatever other utilities you want on the drive. Optionally, if needed to free up space, delete unwanted applications and package files (by trashing all the unwanted stuff in the /Applications folder and all the packages in the /Optional Installs and /System/Installation/Packages folders).

5. Open the /private/etc/rc.install file in TextEdit. Locate the line that begins "The Launcher is responsible for the progress bar..." Delete everything from that line to the end of the document. Add the following to the end of the document:
 /Applications/QuickerPicker.app/Contents/MacOS/QuickerPicker
 /sbin/reboot
 The second line will likely not have any effect, but it won't hurt.
 [Note: This is the big change from the more elegant procedure I used in Tiger. The switch was needed because the Tiger procedure no longer worked.]

6. Save the edited file, clicking to Overwrite when asked. If you instead get a message that claims you cannot modify the file at all, go to the Info window for the flash drive and enable the "Ignore Ownership..." checkbox. Then try to save the file again.

7. Open the /etc/rc.cdrom file in TextEdit. Locate a line that reads: mount -u -o ro / and change it to mount -u /
 Save this modified file.

8. You now have a functional emergency flash drive and are ready to use it. Restart the Mac. As soon as you hear the startup chime, hold down the Option key. At the screen that appears, select to startup from the flash drive. The drive should boot successfully and launch QuickerPicker.

9. Select Rescan Applications from QuickerPicker's File menu to get your added applications to appear. Launch any program you wish. Not all added software will work, but most troubleshooting utilities will do just fine. Quit any open utility to return to QuickerPicker.

When you are done, you will need to do a hard shut down (such as by holding down the Power button until your Mac shuts off) to exit. I was not able to get the Restart or Shut Down commands to work. You can then reboot, as normal, from your internal hard drive.

This solution is not as cheap, nor as easy to create nor as simple to use as I would have preferred. But it works — at least until Apple changes things again. I don't claim to have reached the end of what may be possible here. If anyone knows how to improve on this procedure, by all means let me know.

Addendum: In my testing, I used three different flash drives, of different sizes and from different companies. I used a 4GB DataTraveler from Kingston, an 8GB cruzer from SanDisk and a 32GB Survivior from Corsair. They all performed well. I have no reason to believe that any problems or successes I had were due to a specific drive or brand, but I cannot entirely rule that out. I can say that my preferred choice overall was the cruzer. It had the most convenient design (unless you need the extra external protection of the Survivior) and appeared to be the fastest (in my informal testing).

To send comments regarding this column directly to Ted, click here. To get Ted's latest book, Take Control of Your iPhone, click the link.



mac.column.ted: Create a Leopard startup flash drive: 10 comments
The following comments are owned by whoever posted them. This site is not responsible for what they say.


Authored by: appleman on Tuesday, April 22 2008 @ 10:04 AM PDT

nice job in the EMERG. disc, will put it to good use.


A sleepimage file issue
Authored by: ted1 on Tuesday, April 22 2008 @ 10:34 AM PDT

A postscript to the article:

When working with an 8GB flash drive connected to a MacBook Pro, I found that the amount of free space on the drive would sometimes suddenly drop to almost zero. As it turned out, the reason was that the Mac had created a 2GB sleepimage file in the /var/vm directory of the drive.

If this happens to you, you can simply delete the file to recover the space. However, it will likely return again. There are utilities such as SmartSleep (http://www.jinx.de/SmartSleep.html) that may be able to prevent the creation of this sleepimage file. I have not tried doing this as yet. I also haven't explored what may happen if there is insufficient space to create a sleepimage file.

- Ted


Authored by: FixMaX on Tuesday, April 22 2008 @ 11:29 AM PDT

Ted, great article. Does make any sense to use a FireWire pendrive like this one (the only one, as far as I know) istead of a USB one? Is it faster than a USB pendrive? Thanks.

Kanguru Fire Flash (Firewire Flash Drive)
http://www.kanguru.com/fireflash.html


Authored by: Hal Itosis on Tuesday, April 22 2008 @ 11:33 AM PDT

Looks pretty good... thanks Ted!
Here's another method, using Pacifist:

"How to install a very small version of OS X on an external drive"

[haven't tested it myself]

-HI-


Authored by: Herb Myers on Tuesday, April 22 2008 @ 11:44 AM PDT

I think you got me at 'Intel only' Just to be crystal clear this will NOT work on my little iBook G4. Right?


Authored by: MacAdict4Life on Tuesday, April 22 2008 @ 12:09 PM PDT

Two thoughts:

If you are using only Apple's Disk Utility, couldn't you just use the GUI-free Darwin (freely downloadable)? Or does it not include Disk Utility? It seems like it would be small...

If you are using a third party utility, who cares if it doesn't use Leopard or even Tiger, as long as it can run the utility and the utility itself can repair Leopard?

---
-Ernest


Authored by: Fingal on Tuesday, April 22 2008 @ 12:49 PM PDT

My question is why don't you start with a regular copy of Leopard and strip that down rather than start with an install DVD copy? In other words, install Leopard on a hard drive, remove as much as possible and then clone it to your flash drive. It would be good information to have, in general, about what can be removed from a standard Leopard install without making it unbootable or useless in other ways. Does it really help that much to start with the copy on DVD?


Authored by: ted1 on Tuesday, April 22 2008 @ 06:40 PM PDT
Re: My question is why don't you start with a regular copy of Leopard and strip that down rather than start with an install DVD copy?

I had two problems here.

The biggest one was that I could not get the stripped down copy to work if I copied it over to a 4GB flash drive. That is, if I started with any version of Mac OS X and stripped it down so it would fit on a 4GB drive, it would boot fine on the original drive. But if I copied this stripped down OS to the 4GB drive, the smaller drive would not boot!

The smaller problem was that the full OS version seemed to run much slower than the Install DVD OS version.


Authored by: jimdoc on Wednesday, April 23 2008 @ 05:16 PM PDT

My thought would be to try to perform a stripped-down install directly to an attached (properly GUID-formatted) flash drive, either 4 GB or, if needed, 8 GB, rather than install-then-clone.


Authored by: WhiteDog on Tuesday, April 22 2008 @ 04:52 PM PDT

A larger flash drive might not meet Ted's price criterion, but it would be much easier to set up and use. You trade price for convenience. In this equation, you have to factor in what your time is worth - which is probably more than the extra cost of the drive. A 16 GB thumb drive can be had from $60 to $100 (or more). But you can install Leopard directly on such a drive and install, not just copy, your utilities of choice. Boot from the drive and serialize each one and you are ready to go. I haven't tried this approach because I use portable external hard drives with multiple partitions for my tech support work. But if all you need is to have an emergency drive handy in your laptop bag, a 16 GB flash drive would do the trick with minimum hassle.

In trying to force Leopard into a Tiger sized shoe, I think Ted is overlooking the obvious. While I applaud his efforts to save a few bucks, I think he's missing the more important factor for most people: ease of use.

---
Don't anthropomorphize computers.
They hate that.


Authored by: Tribble on Tuesday, April 22 2008 @ 04:56 PM PDT

Followed instructions. Using an 8 GIG Cruzier I just happened to pick up recently. Trying to start an Intel MacBook Pro. Getting past the startup choice no problem but getting a the little grey pinwheel under the grey Apple Logo forever - well at least till I shut down. I may be making a mistake during the production of the drive. I am creating it under Tiger and making the drive "extended - journaled" and "GUID". Though I do not think this is the problem as it is recognized as a startup disk by the laptop. I am not completely clear as to the replacement of "/Applications/QuickerPicker.app/Contents/MacOS/QuickerPicker
/sbin/reboot"

Do I remove the line "The Launcher is responsible for the progress bar..." or only the following lines?
Should there be a "#" before the line.
Though I do have a second generation iPod with TechTool Pro To Go that works great for fixing any Mac, I would love to have a second utility like this for Leopard.
Anyone manage to get this to work?
BTW Thanks Ted!!!


Authored by: ted1 on Tuesday, April 22 2008 @ 06:33 PM PDT

The # is a "comment" indicator and means that no commands contained on the line will be executed. There should not be any # preceding the two lines that you cited.

Aside from that, I assume that QuickerPicker is actually in the indicated location.

As a last resort, you might try APM formatting, rather than GUID, although I have had success with both formats (yes, even on Intel Macs).

- Ted


Authored by: johnsawyercjs on Wednesday, April 23 2008 @ 01:28 PM PDT

Two issues that sometimes prevent startup from an otherwise good OS X startup volume (though I have a hunch these two issues aren't what's causing your problem, they're worth looking at), are bad permissions, and having the "ignore ownership on this volume" option selected. In the Finder, do a Get Info on the volume, and look at the bottom of the Get Info window for this option's checkbox--if it's checked, remove the checkmark. Then repair permissions on the volume, and then try booting from it.


Authored by: toxdoc on Tuesday, April 22 2008 @ 06:09 PM PDT

Ted, you are correct that the Shut Down and Restart commands don't work. However, after I was finished running a session from my 8 GB Cruzer, I just quit QuickerPicker and my Macbook Pro automatically restarted. I presume you tried that, so I'm surprised why it didn't work for you.


Authored by: ted1 on Tuesday, April 22 2008 @ 06:28 PM PDT

Yup. I did try it and it did not work. I suppose I might not have waited long enough, but I doubt it. In any case, I'll try again. Thanks for the reply.

- Ted


Authored by: melfagan on Wednesday, April 23 2008 @ 09:16 AM PDT

You can also launch Terminal.app and type "halt" to shutdown or "reboot" to restart.




More information about the MacTUG mailing list