Rmprepusb: Important: Always Run These Utilities With Administrator Privileges
Rmprepusb: Important: Always Run These Utilities With Administrator Privileges
Introduction
RMPrepUSB is a Windows utility that can be used to format any USB storage device,
e.g. USB Flash drive (UFD) or USB hard disk. It can be used to partition, format,
write a Master Boot Record, partition table and/or Volume Boot Record (sometimes
called a Partition Boot Record) and operating system boot code to a USB drive.
Note: Except for the Install Grub button, all other coloured blue/red buttons will erase
the USB drive contents. If you have any important files on the USB drive, copy them
to a safe place first!
You do not need to install RMPrepUSB, just ensure that all files (RMPrepUSB.exe,
RMPartUSB.exe, RMPrepUSB.pdf and MSVBVM60.DLL are the essential ones) are
present in the same folder (it is recommended you do not use a folder on the Desktop
or My Documents folder, use C:\RMPrepUSb for instance).
RMPrepUSB and RMPartUSB are free (Freeware) for private use only; however they
are not Open Source programs. For commercial use and licensing please contact
support@rm.com. Distribution, sale or use in a commercial solution is forbidden
without permission from RM Education plc (see FAQs below for more information).
RMPrepUSB can be used on USB Flash memory drive, USB hard disk drives or other
USB storage devices.
When you click on one of the Prepare Drive, Test, Clean, Image Tool or Info buttons,
RMPrepUSB will call the Windows command line utility RMPartUSB and the
command line that is used will be shown to the user. If you prefer, you can use
RMPartUSB in your scripts or batch files rather than use RMPrepUSB. Type
RMPartUSB from a Windows command line to see full instructions on how to use the
utility.
Note: The ‘Install Grub’ function and imaging operations (FiletoUSB and USBtoFile)
are totally independent of any other settings within RMPrepUSB (i.e. the NTLDR,
FAT32 and all other options have no affect when imaging – a binary image is simply
copied to or read from the UFD, no additional ‘tweaking’ is done by RMPrepUSB or
RMPartUSB). No extra files are copied.
6 Steps to make your USB drive bootable
1. Select the USB drive in the listbox if more than one is present and either leave
the size as MAX or change it (e.g. type 512 for a partition size of 512MiB).
2. Change the volume label text if you want to.
3. Set the type boot loader that you want installed onto the new partition after it
has been formatted.
4. Change the Filesystem and Overrides. You may need to experiment with these
before you can find a combination that works. Different models of PCs or
Noteboooks may require different settings.
5. If you want to, you can copy the contents of a folder to the new empty
partition after it has been formatted. Tick the COPY FILES box if you want
this. Note: RMPrepUSB will not place any boot files on the USB drive and it
will not be bootable unless you copy the boot files onto it.
6. Click on the blue Prepare drive button.
Note: Before you unplug the USB drive, click on the Eject button to prevent file
corruption.
Hint: Check your BIOS menu options! Some BIOSes have an option to boot a USB
drive as a ‘Fixed Disk’ or a ‘Removable Disk’. Try different BIOS settings if you are
having difficulty getting your USB drive to boot!
About the COPY FILES option
RMPrepUSB prepares a USB drive by partitioning it, formatting it and placing boot
code in the Master Boot Record (MBR) and Volume Boot Record (VBR, sometimes
called the Partition Boot Record or PBR). The USB drive will not boot however
unless you copy the required boot files onto the drive. You can automatically copy
files to the USB drive after it has been formatted by ticking the COPY FILES option.
If you do not tick this option then you must copy the boot files onto the USB drive
manually afterwards.
If you want to use a different version of SysLinux or Grub, place your own versions
of syslinux.exe, grubinst.exe and grldr into the same folder as RMPrepUSB and
overwrite the ones provided.
In addition, some BIOSes will not boot from a UFD at all if the physical drive size is
greater than 512MB – or – some BIOSes may not boot from a UFD if the volume size
is over (say) 1.3GB.
If you wish to boot from a UFD or USB hard drive, you may need to experiment with
the settings below. You may find that one group of settings will work for one system
and a different group of settings will work for another system. If using UFDs, always
try a 512MB USB flash drive first before you move on to larger UFDs – some
BIOSes will only work with smaller UFDs.
Boot as FDD (A: no MBR)
This option will format the drive with the chosen filesystem format option
(FAT16\FAT32\NTFS) but the USB drive will have no partition table. The first sector
of the USB drive will typically contain the operating system boot code. This option is
usually used for an MS-DOS or FreeDOS drive that you wish to boot as a large floppy
drive (i.e. they will boot to the A: prompt).
You can also select the 64hd/32sec option (recommended). If you de-select this
option then the volume boot record will use 255 heads and 63 sectors per track.
Recommended settings
Ensure BIOS boot option for USB is set to ‘Fixed Disk’ and not ‘Removable Drive’
Try also various combinations of these options.
Booting linux
To boot a linux system, use the SYSLINUX option in RMPrepUSB. This will format
the UFD as a FAT16 or FAT32 MSDOS volume and then (after copying files if you
tick the file copy option) will run syslinux.exe on the new UFD volume. The
Windows version of syslinux.exe must be in the same folder as RMPrepUSB.exe.
Syslinux.exe will install syslinux boot code into the volume specified and place the
file ldlinux.sys on the UFD. Do not delete, overwrite or move this file once syslinux
has placed it on the UFD or the UFD may not boot – it must remain at the same sector
position on the UFD. If you already use syslinux.exe, replace the version in the
RMPrepUSB folder with your version to avoid compatibility issues.
When the UFD boots, it will load ldlinux.sys and look for a syslinux.cfg file, which
can contain a menu and details of which kernel to load. If you have an isolinux.cfg,
you need to rename this to syslinux.cfg. More information can be found on the
internet about syslinux.
If the UFD fails to boot after a while, either re-format the UFD using RMPrepUSB
again or run syslinux.exe from the Windows command line (cmd) – e.g.
syslinux –fma F: (where F: is the volume letter of the UFD)
WARNING: take care not to specify your hard disk drive letter or your hard disk will
not boot to Windows!
Most BIOSes require the user to enable USB booting and set the boot order so that a
USB device will boot before the internal hard disk (although some BIOSes have an
F10 or F12 key function which will allow you to choose a boot device from a menu).
In addition you can often set the USB speed to USB 1.1 speeds (Hi speed) or USB 2.0
speeds (Full speed). If you are having difficulty booting from a USB drive, it is
recommended to use a rear USB port, set the BIOS to USB 1.1 speeds and change the
boot order so that the USB drive is first in the menu.
Before you enter the BIOS menu, switch off the system, insert the USB drive and then
switch on the system – then press the F1 or F2 or Esc or DEL key (depending on your
particular system) to enter the BIOS Setup menu.
All BIOSes behave differently, however disk storage devices are always accessed via
Int 13h calls to the BIOS. There are two types of ways to access a disk device via the
BIOS – ‘floppy’ or ‘hard disk’ read or writes. The BIOS must determine whether to
allow access to the USB drive that it detects as either a ‘floppy’ (which is accessed
with Int 13h DL=00h) or a ‘hard disk’ (which is accessed with Int 13h DL=80h). The
BIOS has to determine which of these two access methods (DL=0 or DL=80h) to
‘map’ the USB drive to.
Once a BIOS determines how to map the USB device (either as a floppy device or a
hard disk device), it will read one sector from the USB device (512 bytes) into
memory at address 07C0:0000h and then jump to that code. The last two bytes of the
sector must end in the two bytes ‘55h’ and ‘AAh’ or it is not considered to be valid
boot code. When the CPU starts to execute the code that has just been copied into
memory at 07C0:0000h, the BIOS has also pre-set the DL CPU register to the correct
device number (either 00h or 80h). The boot code can use this value in DL to load
more sectors into memory from the USB device.
There are three ‘types’ of USB drive and the BIOS must try to determine which of the
three different ways to access the USB drive is to be used:
1. USB-FDD (floppy disk device)
The BIOS maps the device to ‘floppy’ Int 13h DL=0. A USB device may be
detected as a USB-FDD device if it has a device name similar to ‘TEAC floppy
drive’ and a capacity of 1.44MB, or possibly if it has no valid partition table. The
device does not need to be formatted as 1.44MB, you can have a 1GB FAT16
UFD with no MBR.
3. USB-ZIP (pseudo-super-floppy)
A BIOS maps the device to ‘floppy’ Int 13h DL=0. A USB device may be
detected as a USB-ZIP device if the drive has a partition table containing only one
entry. The BIOS may also require the device to be under a certain size (e.g.
512MB or less) or have values in the partition table of 64hds\32secs.
In addition, when a BIOS boots from a device as a USB-ZIP device it does NOT
load the first sector MBR code (LBA 0) into memory – instead the BIOS loads the
Volume Boot Record code directly into memory and jumps to it by reading the
single entry in the partition table to find the start position of the partition (a USB-
ZIP drive can thus only contain one partition entry). The BIOS then maps the
USB drive to the Int 13h DL=0 call BUT it will always add the partition start
address to any access. Thus a BIOS Int 13h DL=0 call to read cylinder 0, head 0
sector 1 (LBA 0) will actually read the first sector of the partition. The real sector
1 (LBA address 0) cannot be accessed at all. For instance, say the USB-ZIP drive
has a partition table with a single entry. The partition table entry indicates that the
partition starts at sector 32, then the BIOS would load sector 32 into memory and
start to execute the code there. Any attempt to read CHS 0\0\1 (LBA 0) via a
floppy Int 13h DL=0 call (or Extended Int 13h call) from that point onwards, will
actually read sector 32. If the boot code attempts to read CHS 0\1\1 (LBA 32) it
will actually read the sector located at CHS 0\2\1 (LBA 64) as the BIOS will
always add the partition start address on to any access. In this way, the boot code
located at the start of the partition is identical to that found on a floppy disk which
has no MBR or partition table.
Some BIOSes do not support this type of booting and may always boot a USB-
ZIP device as a hard disk (i.e. map the USB device to respond to Int 13h DL=80h
calls). The difference between a USB-ZIP device and a USB-HDD device is very
small, both have a master boot record and a valid partition table, however a USB-
ZIP device should contain boot code that expects to be booting from a ‘floppy
drive’ (DL=0) whereas a USB-HDD device should contain boot code that expects
to be booting from a ‘hard disk drive’ (DL=80h). Many modern BIOSes contain a
special menu option to change this behavior.
Frequently Asked Questions
Q1 – What happens if I don’t tick any of the Override options (as in the
screenshot above)?
A1 – A partition table will be created using a drive geometry of 255 heads and 63
sectors per track. Only one partition table entry will be made. The volume boot record
will be created with hard disk compatible parameters.
Q7 – I can boot from a FAT16 2GB UFD formatted as FAT16 but not from a
3GB or bigger UFD – why not?
A7 – MS-DOS cannot access FAT16 partitions over 2GB (Size=2000MB in
RMPrepUSB/RMPartUSB). Set the partition size to 2000 or use FAT32.
Q14 – I used RMPrepUSB to format my UFD and make it bootable but there are
no files on it and it won’t boot?
A14 – RMPrepUSB does not contain or copy any boot files unless you provide them.
Microsoft boot files are part of the operating system and cannot be distributed. You
can obtain them if you are licensed to do so, or use Freeware like FreeDOS.
Q15 – I have set the USB partition size text box to 500 MB, how do I set it back
to the maximum size?
A15 – Type ‘MAX’ in the Size text box or click on the Refresh button.
Q17 – The Prepare button does not seem to work under Vista – nothing
happens?
A17 – Try creating a folder at C:\RMPrepUSB – do not use a folder in special
locations like the Desktop or My Documents as these may have special limited access
rights under Vista/Win7.
Q21 – I started to use QUICKTEST and H2TESTW and at first I just got a few
errors reported from my 4GiB UFD, but now I get write errors and the system
seems to hang for ages during testing.
A21 – This is a typical symptom of cheap or ‘fake’ UFDs that have been constructed
from faulty memory. The memory may be multiply mapped (e.g. 1GB mapped 4
times so it appears as 4GB) and the controller bad block management probably has
not been set up properly. Error correction may not even be working correctly and the
memory has probably not even been tested thoroughly by the UFD manufacturer.
Everything may appear to be OK as long as you don’t use more than 1GB of the UFD,
after that files will begin to get corrupted. In addition, more memory ‘pages’ may fail
due to the stress of testing (or normal use) over time. If a UFD sector write fails, the
PC can hang/freeze for many minutes on each sector write operation – be patient or
pull out the UFD to make it fail quickly.
A UFD from a reliable make and source (Netac, Kingston, Lexar, etc.) can be tested
many times without any problem.
Q22 – I have tested my UFD with RMPrepUSB and H2TESTW and it is fine, but
after a week or so I get corrupt files or Windows wants me to reformat it and
thinks it is faulty. If a re-format it then all is well until a few days later – is the
UFD faulty?
A22 – Are you using the Windows SystemTray ‘Safely Remove Hardware’ icon and
‘ejecting’ the UFD before pulling it out of the USB port? When Windows sees a FAT
filesystem, it loads the FAT tables into system memory. Any changes made to the
files on the UFD will also cause the FAT tables in Windows memory to be updated –
BUT NOT ALWAYS THE FAT TABLES ON THE UFD ITSELF! So if you simply
pull out the UFD, the FAT tables on it will not have been updated. By using the
‘Safely Remove Hardware’ feature, you cause Windows to write all the new FAT
table changes to the UFD. This is particularly important if your UFD appears as a
‘Fixed Disk’ to Windows and not as a ‘Removable Disk’. You can check to see if
caching is used by right-clicking on the UFD drive in Windows Explorer and
choosing Properties – Hardware – Properties – Policies. Even if it is set to ‘Quick
Removal’ on your PC, you should always use the ‘Safely Remove Hardware’ icon on
other PCs - so get into the habit and always do it!
If your UFD is formatted with NTFS, again always use the ‘Safely Remove
Hardware’ icon before pulling out the UFD. The danger is that Windows can write or
read to the UFD at any time, and pulling out the UFD at exactly the same time can
lead to data corruption.
If you are still having problems, try the UFDs which have ‘Ultra Stable Technology’
(e.g. Netac) or similar. These UFDs employ a buffering scheme which prevents
corruption due to power loss when a UFD is pulled out during write operations.
Q23 – I am having trouble getting some systems to boot. A USB flash memory
pen works on one system but not on another. Some pens work on one system, but
a different pen with an identical image does not work on the same system! What
is going on?
A23 – This is a typical problem and it all comes down to the BIOS. Read the
explanation above about how BIOSes boot USB devices. Here are some issues that
have been observed with some BIOSes:
1. The BIOS will not attempt to boot any USB device over 512MB – the USB
pen LED will not even flash during system POST as no read request is ever
made!
2. The BIOS will not attempt to boot any USB device over 1GB.
3. The BIOS will treat any USB device under xxx MB as a USB-ZIP device, and
any device over xxx MB as a USB-HDD
4. The BIOS will treat any USB device as a USB-ZIP and always boot it as a
floppy device
5. The BIOS will treat any USB device as a USB-HDD and always boot it as a
hard disk device
6. The BIOS will boot a USB-FDD formatted device that has no MBR or
partition table, but will not boot a USB-ZIP or USB-HDD device
7. The BIOS will boot any device with only a single partition table entry in the
MBR as a floppy device, but will boot a device that has two partition table
entries as a USB-HDD device
8. The BIOS setup menu can be use to make the BIOS always treat a USB device
as a ‘Removable’ device (USB-ZIP) or a ‘Fixed Disk’ device (USB-HDD)
depending on user choice.
9. The BIOS looks at the Volume Boot record to determine type of device (e.g. if
it sees MSWIN4.1 then it treats the device as a USB-ZIP device).
10. Partition parameters – if the partition has 32hds and 16 sectors per track then
treat it as a USB-ZIP, if 63 sectors then treat it as a hard disk.
11. If the end cylinder is 1023 (max) then treat it as a hard disk.
A BIOS can be made to boot the same device in different ways – e.g. USB-FDD,
USB-KEY, USB-ZIP, USB-HDD – try each in turn and try different ways of
formatting with RMPrepUSB.
Be methodical in your testing! There are 5 variables to consider FOR EACH TYPE
OF PC as below:
1. BIOS settings
2. Physical size of USB device
3. MBR on USB device (no MBR as in a USB-FDD device or with an MBR
and partition table as in USB-ZIP and USB-HDD devices)
4. Filesystem the volume is formatted with (NTFS, FAT32 or FAT16)
5. Code in VBR (i.e. if the code expects to access a floppy drive or a hard
disk)
The last three (3-5) are determined by settings in RMPrepUSB, the first two must be
changed by the user. I suggest using a 512MB USB pen and a 2GB USB pen for all
testing and make sure they have LEDs so you can see if the BIOS is reading them.
Also use FreeDos for all initial testing because FreeDos can boot to either a ‘floppy’
device or a ‘hard disk’ device without error (unlike some versions of MSDOS). Try
different BIOS and RMPrepUSB options and write down all results (all error
messages – see Q3 above, and boots as A: or C:).
PC Model and BIOS version (use latest version if possible!)
USB pen make, model, size
RMPrepUSB options used
BIOS settings used
Result
In between each test, switch off the system under test, then switch it on, then go into
the BIOS and check the settings and that the USB pen is listed correctly. If you do not
cold boot or reset, the BIOS may ‘remember’ the type of USB drive that was fitted
previously even though you have re-partitioned it in between!
Remember, just because one type of system works with one particular USB pen drive,
it does not mean that other systems will! Have fun and don’t pull all your hair out!
--- o O o ---