As a system administrator, I sometimes need to use tools for checking and repairing hard drives, manipulating partitions, testing memory, etc. Being able to put all these tools onto a single USB stick is convenient, especially considering that some commodity servers don't have DVD/CD drives!

The sites that provide some of the tools make them available only as an ISO intended to be burned to a bootable CD or DVD, or as a utility that takes over the entire USB drive. This is not convenient. It's much better to put all the tools on a single USB stick. So, in the following procedure, I will show you how to extract the necessary files from these isos, put them on the USB stick and make them bootable.

This page tells you how to create a USB stick that you can use to:

  • boot Puppy Linux, a lightweight useful distribution that runs out of the box on lots of different hardware including laptops
  • boot FreeDOS, a simple operating system that provides useful tools
  • load Seatools from within FreeDOS
  • boot Memtest+, the defacto standard for testing RAM
  • boot Minitool Partition Wizard Home Edition, an extremely useful, graphical tool for manipulating partitions and filesystems

Ultimate Boot CD

Why follow the procedure given on this page, when you can download the excellent "Ultimate Boot CD" http://www.ultimatebootcd.com/ which contains a large number of useful utilities?  Two reasons:

  • Ultimate Boot CD does not provide Minitool or Linux
  • By following the procedure here you will learn how booting/Grub/partitions work and you will be able to add your own tools yourself later

About MBRs, PBRs and booting

I came across an excellent explanation once about the whole BIOS/x86 boot process with detailed descriptions of the role played by partitions. If I find it again I'll post the link here. For now, if you aren't familiar with the boot process and would like to learn more, do a search for terms like "MBR" "boot" "chainloader" "512 bytes"

Make three primary partitions

The quickest and easiest way to do this is use the free version of Minitool Partition Wizard Home Edition. With this tool you can both create the partitions and format the filesystems.  

  • the first one for Grub: 100MB Ext3

  • the second for Puppy Linux: 500MB FAT32

  • the third for FreeDOS: 500MB FAT16

Note that the Grub partition does not have to be formatted ext3. It can be any type of filesystem you like. Grub understands many different kinds. The same goes for the Puppy linux partition. Feel free to use EXT3 or something else instead of FAT32.

Use Minitool to set the Grub partition as the "Active" partition. This designates it as the default bootable partition on the USB stick. This means that when the BIOS boots the drive, it will load the Partition Boot Record from the first partition. We will not install Grub to the MBR.We will install it to the PBR of the first partition.  Doing this will place the appropriate code into the PBR to load Grub.

Install Grub to the first partition

Grub will be configured as the main boot manager to boot the other partitions or, in some cases, boot the tools directly.

If you already have a Linux system with grub, then insert the USB stick into that system. Otherwise, boot Puppy linux.

The following procedure shows how to install Grub with Puppy linux:

  1. First determine the USB device (/dev/sda, /dev/sdb, etc.)

  2. Setup > Grub Bootloader Config > Simple Setup

  3. Choose defaults for most of the stuff

  4. When prompted designate the first partition of the USB stick to install Grub: eg. /dev/sdb1

  5. When prompted, choose to "Install to the superblock". This will put Grub on the first 512 bytes (PBR) of the partition

Now there is a /boot/grub directory with a bunch of files. Leave them alone for now. After setting up the other partitions we will come back and edit /boot/grub/menu.lst. 

For now, make a backup copy of the first 512 bytes of the USB stick and the first 512 bytes of the first partition. 

Install Puppy Linux to the second partition

Just go through the normal installation. Be sure not to install the puppy bootloader to the main MBR of the drive. It's okay to install it to the second partition although it won't be used because we will use Grub to boot the kernel directly (bypassing the PBR). You may wish to make a backup copy of the first 512 bytes of the USB drive - the MBR - before installation, just in case the installation overwrites it and you need to put it back.

Install FreeDOS to the third partition

Note that Grub is unable to boot the FreeDOS kernel (kernel.sys) directly and therefore it is necessary to let the FreeDOS installer populate the PBR of the third partition with the appropriate boot code. Grub will simply "chainload" this PBR and the FreeDOS boot process will take it from there. Note that once kernel.sys is loaded it will look for a file called fdconfig.sys in the top level directory, so don't modify this file.

  1. download FreeDOS Base CD iso and burn to CD

  2. remove all hard drives from your computer. This is necessary so that FreeDOS can readily recognize the USB stick you will install to and so you don't accidentally overwrite something you want to keep.

  3. Boot the CD, go through default options

  4. When given the choice to run Xfdisk, go ahead and run it.

  5. We want the third partition to be the Active C:/ drive. Unhide ("show") the target partition. This should make it Active and should set it as the C: drive

  6. Continue the installation of FreeDOS with default selections.

  7. The installation will populate the PBR of the third partition with the appropriate code to boot FreeDOS. 

  8. Unfortunately it will also change the MBR of the USB drive, making the third partition the Active (bootable) partition. We don't want that, so after the installation is done, load Minitool Partition Wizard and set the first partition (Grub) back to Active. Also if any partitions have the "hidden" flag turned on, be sure to "unhide" these partitions. You may also use fdisk under Linux, instead of Minitool, to do this work.

Place Seatools on the FreeDOS partition

If you ever need to return a Seagate hard drive for warranty, you'll need to first run Seatools and get the error codes. Seagate requires this information to process the warranty. There are two different versions of Seatools: one is "Seatools for DOS" and the other is "Seatools for Windows." Seatools for DOS will work for IDE and SATA drives. SeaTools for Windows is what you would use for SAS drives, but you have run it in a Windows XP/Vista/7 environment. The following procedure installs Seatools for DOS.

  1. Download the "Seatools for DOS" iso: http://www.seagate.com/support/seatools/SeaToolsDOS110.iso

  2. Use 7-zip to open the iso

  3. Navigate to the [BOOT] folder

  4. Use 7-zip to open the "Bootable_1.44M.img" file

  5. Locate the STDOS.zip file and open it

  6. Locate the seatools.exe file and extract it

  7. Copy this file to the FreeDOS partition on your USB stick

When you boot FreeDOS, all you have to do is type "seatools.exe" at the C:\ prompt to launch it.

Install Memtest+

The mt86plus file is a bootable image of the kind that Grub knows how to boot directly, so there is no need to fool around with the boot record of the partition like we did for FreeDOS. The mt86plus file just needs to reside on a filesystem that Grub is aware of. This filesystem can be located anywhere on the USB drive. If you like you may create a partition which will contain only memtest, or you may place it on an existing partition alongside other files and folders.

Make a new partition and format it as ext3 or fat32 or whatever you like, or use an existing partition, or even use the partition that the grub boot files are on if you want. For this procedure we will put memtest on the Grub partition.

  1. Go to the memtest site and download the "Auto-installer for USB key"
  2. Locate a spare USB stick and run this installer on it - it will overwrite the whole stick
  3. When the installer is finished, copy the following files from the spare drive to the Grub partition on the target USB drive: Copying, Readme.txt, mt86plus

Install Minitool Partition Wizard

  1. Download pwe7.iso - the bootable CD iso - to your local hard drive

  2. Use 7-zip to open it

  3. Navigate into the [BOOT] folder

  4. extract the following two files: bzimage and tinycore.gz

  5. Make a directory called "Minitool" on the Grub partition of your USB stick

  6. Copy these two files to the "Minitool" folder.

There's a chance that you messed up the MBR when you installed Puppy Linux and FreeDOS. If you did, then use the backup copies to put them back.

Edit menu.lst

Now that we have installed the tools, it is time to configure Grub.

Go to the Grub partition and edit /boot/grub/menu.lst Remove all the "title" entries and replace with the following:

# Help
  title Usage. Readme if unable to boot these entries.
  pause Try replacing all occurences of hd1 with hd0 or hd2 or ...
  root (hd1,0)
# Puppy Linux
  title Puppy Linux on hd1,1
  root (hd1,1)
  kernel /vmlinuz
  initrd /initrd.gz
# FreeDOS on hd1,2
  title FreeDOS on hd1,2
  unhide (hd1,0)
  # hide the second partition because it is FAT
  # if instead you make it ext3, you dont' need to hide it
  hide (hd1,1)
  unhide (hd1,2)
  rootnoverify (hd1,2)
  chainloader +1
# Memtest on hd1,0
  title Memtest
  root (hd1,0)
  kernel /mt86plus

# Minitool Partition Wizard 7.0
  title Minitool Partition Wizard 7.0 on hd1,0
  root (hd1,0)
  kernel /Minitool/BZIMAGE ramdisk_size=102400 root=/dev/ram0 rw
  initrd /Minitool/tinycore.gz


Create a text file called "UTILITY_README.txt" on the first partition (Grub partition) and populate it with the following text. Grub can display this file at boot time if necessary.

When you insert a USB stick into a computer and power up the computer,
the BIOS will assign a device number to the USB stick. This number may
differ from one computer to the next depending on factors like the
total number of hard drives and other devices in the computer.
Grub refers to these devices as hd0, hd1, etc... The USB stick will have
one of these designations.
The Grub configuration file on this USB stick assumes the USB drive is
'hd1' and is configured accordingly. If you find that there is actually
a different drive designation, then take the following steps:
1. highlight the menu item you wish to boot
2. type 'e' for edit
3. replace all occurrences of 'hd1' with the appropriate designation
4. type 'b' to boot

Explanation of menu.lst

Help: display some explanation of device naming in case booting from (hd0) does not work

Puppy: Just load the kernel and initrd

FreeDOS: we have two FAT partitions on this drive. DOS doesn't like that. "Hide" the one we're not interested in so that FreeDOS thinks the third partition is the C:\ drive. Not necessary to hide the Grub partition since DOS doesn't understand ext3. 

Memtest: Grub can boot the kernel directly

Minitool: Grub can boot the kernel directly. Minitool is designed to use a RAM drive so we tell it to allocate a ramdisk and to mount its root filesystem on the ramdisk. 

How it Works

Grub is the active partition, and therefore gets booted automatically by the BIOS.

To boot FreeDos, Grub simply chainloads the PBR of the third partition (FreeDOS). Once that is done, Grub is out of the picture.

To boot Linux, Grub loads the kernel from the second partition and tells it to use the initrd from the second partition. Once loaded, the kernel unpacks the puppy filesystem (also on the second partition).

Minitool is a Linux kernel and Grub, of course, knows how to boot it natively.