As stated here you can place gPXE on a USB drive, unfortunately, the standard procedure will render your USB device unusable for any other purpose. The intention of this guide is to walk you through the process of deploying gPXE to a USB device and be able to still use it as storage media.
Note: This guide is a walkthrough for Mac OS X 10.5, also it uses BKO instead of gPXE, still I believe the process would be similar in Linux and/or for gPXE.
Important: Backup the data on your USB drive, as you WILL lose it in this process.
Download BKO's image for USB
Getting the device ready for deployment is not trivial in Leopard, as the OS mounts it to the desktop and the context menu removes it from the system. These few steps will prepare the USB device for deployment:
/dev
directory/dev/disk1
, that's the device name we'll use for the rest of the tutorial, adapt to whatever your disk identifier is.To deploy BKO to your USB drive, fire up Terminal and cd to the directory where you downloaded it. Deploy it by using
dd if=gpxe.usb of=dev/disk1
Remember to substitute disk1
for your own disk identifier.
If you're deploying a generic gPXE, just follow the instructions under Using removable media
At the moment, your BKO/gPXE should be up and ready, feel free to try it out. Nevertheless you will find that you're using your whole USB drive for a tool that uses barely 2MB of space. We will be redefining the partition table so we can use the remaining space. There is a screenshot of this process below.
fdisk -e /dev/disk1
fdisk: 1>
fdisk: 1> print
fdisk: 1> edit 1
0B
, that is the code for the Win95 FAT-32 filesystem.no
unless you know what you're doing.fdisk: 1> edit 1
fdisk: 1> write
fdisk: 1> quit
Now you will have your BKO/gPXE working and a separate partition for your storage, but Leopard still won't recognize the new partition, you need to format it.
You're all set! now your BKO/gPXE is working and you can still use your USB device as a storage media.
— Jorge Rodriguez García (A.K.A. Tiriel) 2009/09/24 16:57