My “Swiss Army” USB Flash Drive

Several months ago, I added a new item to my keychain: a 32GB USB memory stick.  This blog post is about what I did to make the most of this little device so that it would be able to:

  • Support file transfers among operating systems (primarily Mac OS X, and Windows)
  • Support files larger than 4GB
  • Be bootable for rescue purposes (using Hiren’s Boot CD)

IMG_7496

The plan

To fulfill the three objectives I had, I chose to setup the following partitions of equal size:

  1. FAT32 – for transferring files to pretty much any OS out there.  Also, Hiren’s Boot CD would reside on this partition.
  2. HFS+ – Mac OS X is the primary OS I use, so I figured most of the files (and probably ones that are >4GB) would go through Mac.

I thought about using exFAT for the first partition, which is a relatively new file system which overcomes the 4GB file size limit of FAT32.  However, the drawback is that exFAT isn’t supported natively by old versions of Windows (original Windows Vista without Service Pack and older).  In addition, Linux support is experimental and usually requires installation of additional drivers.  Making the second partition exFAT wouldn’t really help either since Windows only recognizes the first partition on removable drives.

There’s also talk on the internet about “flipping the removable bit” on the drive to make it appear as a regular disk and thus show multiple partitions.  I was not able to get this to work on my drive.

As much as I like Mac OS X, there are some things that are more easily done on Windows.  Most of the steps below require Windows because the tools for these things are more readily available on Windows.

Partitioning the USB flash drive

I used Bootice to partition the memory stick and make it bootable.

Bootice 1.0.4 Main Screen
Bootice 1.0.4 Main Screen

This is the main screen.  Make sure the correct destination disk is selected (it should be a USB disk).  If you forget, you will screw up your main drive’s boot record (not a good thing!).

Click Parts Manage to manage the partitions.  A list of existing partitions will come up.  Click ReFormat USB disk at the bottom to start the partitioning process.  (Note: at this point, you should have already copied anything you need off the stick because the data will be lost!)

Repartition menu
Repartitioning the flash drive

Select USB-HDD mode so that there can be more than one partition.  Click OK to continue.

Editing the desired partition sizes
Editing the desired partition sizes

Configure the partitions to your liking.  There’s no option to format partitions for HFS+, so leave the  HFS+ partition as any of the other options for now; we will deal with it later.

Click OK afterwards.  Bootice will ask to confirm before continuing.  After partitioning and formatting, the list of partitions will be shown.

List of newly created partitions
List of newly created partitions

Making the flash drive bootable

Close out of the partition listing screen to return back to the main screen.

Bootice 1.0.4 Main Screen
Bootice 1.0.4 Main Screen

This time, click Process MBR.

Selecting a boot loader
Selecting a boot loader

Select GRUB4DOS, because Hiren’s Boot CD is configured for it by default. Then click Install/Config.

Configuring grub4dos
Configuring grub4dos

I selected two options: Don’t search floppy for GRLDR, and GRUB4DOS version 0.4.6a, but I doubt either of these are necessary.  Click Save to disk to save the configuration.

Copying Hiren’s Boot CD

This part doesn’t have to be done in Windows.  Download the latest version of Hiren’s Boot CD.  Use any ISO reader of your choice to open it and copy its contents onto the flash drive.

The important step here is to copy grldr and menu.lst from the HBCD folder out onto the root of the drive.

Explorer window with HBCD flash drive
HBCD flash drive with grldr and menu.lst in the root

At this point, the flash drive should be bootable into Hiren’s Boot CD and act as a flash drive.  In case a HFS+ partition isn’t needed for your particular use case, you’re done!

Setting up HFS+ for Mac

Back in Mac OS X, open Disk Utility, select the partition that hasn’t been partitioned on the left bar.  In the Erase tab, select the format as Mac OS Extended (Journaled), and name it your choice.

Formatting a flash disk partition into HFS+
Formatting a flash disk partition into HFS+

Conclusion

And that’s it!  The flash drive should now be bootable with an array of rescue tools, and lots of space to transfer your files to and from computers.

I chose Hiren’s Boot CD because it was easy to get to boot from USB.  However, from some internet discussions it seems like there are some tools in Hiren’s Boot CD that aren’t legally distributable in the ISO.  One extension of this project would be to replace or augment Hiren’s Boot CD with other similar utilities such as Ultimate Boot CD or UBCD4Win.

Leave a Reply

Your email address will not be published. Required fields are marked *