www.moisander.se -> ake -> howtos -> bootusb
I have these applications installed on my USB-stick, except Hiren's Boot CD which is only here as an example for how it could be setup. Grub4dos is my boot loader.
Some parts of setting up the USB-stick is performed on Microsoft Windows and some on Ubuntu Linux. When selecting which USB stick to choose please know that with FAT16 (used by Hiren's Boot CD) the maximum file system size is 2GB. So unless you intend to set-up more partitions on the USB there is no need to buy any bigger. Note. Linux can access whatever partition on a removable USB-stick. Windows can only access the first partition as long as it is considered as a movable disk. There exist software to by-pass this on Windows.
Also. There are several steps here which involves reading from a CD that you have burned from a downloaded iso-image. Both Linux (built-in) and Microsoft (requires extra software) lets you mount the iso-image for reading without the extra step of burning it to a CD. I switch between Linux and Windows here, but this is not needed. Just get the software for reading an iso-image on Windows and you can do the whole lot on Windows.
Grub4Dos - https://sourceforge.net/project/showfiles.php?group_id=104188
Grub4Dos lets you boot Linux, Windows and DOS. The project consists of three parts. I only pulled Grubinst and Grub4Dos. Both Grubinst and Grub4Dos carries the grldr file that should be copied to the USB root. Grldr in the Grub4Dos package is newer/bigger.
BartPE - http://www.nu2.nu/pebuilder and
Pe2USB - http://gocoding.com/page.php?al=petousb
The environment for booting and running a stripped Microsoft XP etc. on your PC from USB while having your hard drive being un-used as C:\. This gives you many possibilities for true NTFS-support, scanning, safe-copying etc. PE Builder builds the BartPE files that we will put on the USB. Pe2USB is used to format and copy BartPE to the USB. BartPE has lots of plugins. You must own the Microsoft Windows Installation CD to be able to setup BartPE.
DSL - Damn Small Linux http://damnsmalllinux.org
A very special Linux distribution based on the old 2.4 kernel. DSL is committed to never exceed 50MByte and is quite capabel.
GParted - http://gparted.sourceforge.net
The what-else-can-you-possibly-want to manipulate disk partitions. Supports all relevant file system types. Lets you copy a partition from one disk to another. Perfect when you out-grow your disks.
Hiren's Boot CD on USB - http://www.hiren.info and
Hiren's Boot CD - http://maxt.dk
Lots of tools for solving your problems. Besides the tools that are available in the boot function it also provides some good tools when started inside Microsoft Windows. As Hiren's Boot CD contains licensed applications, I have choosen not to install it. It is here as an example of how it could be setup.
The MBR is stored in first sector (512 bytes) of the storage. There are some other basic information stored there as well. Partition table for example.
I like to always get a fresh start so that you know how to re-produce something. Therefore I start by writing zero to the 512 Bytes making up the MBR. This command will destroy things if you give wrong parameters. Well, it destroys things anyway. If giving wrong parameters it will wipe out your hard drive.
First. Installation Files described here are the ones found on Microsoft Installation CD. You can not use the ones found under C:\Windows
Install PE Builder to c:\pebuilder3110a. The program likes short names without white space. Start PE Builder (v3.1.10a). If you have an old Microsoft Installation CD you can consider doing slipstreaming according to slipstreaming-how-to. Slipstreaming will merge Servicepacks and your Installation files. Slipstreaming can also be done within BartPe (fig. 1)
When you have your installation files as you want (slipstreamed or not) it is time to build the PE. As I am on Windows XP SP3 I had to enable plugin "RpcSS needs to launch DComLaunch Service first - SP2 only" for diskpart to work. To get Swedish keyboard, select edit on plugin "Keyboard Layout (read PluginHelp)". Build your PE (fig. 2)
Transfer BartPE to USB by running Pe2USB (fig. 3)
If you want to be able to install/re-install a host by running BartPE from USB, you need copy the Windows Installation files to the USB. If you slipstreamed using BartPe you need to copy the folder C:\pebuilder3110a\win-slipstreamed to the root of the usb stick. Rename the folder to WinXP-cd if you intend to use my script Install_XP.cmd described below.
Later, when you have booted your new/trouble-some host via the USB into BartPE you need issue a command to start the installation. You will be queried product key, language and then data will be copied from USB to a temporary folder on the hard disk. After reboot this temporary folder will be used for installation as if you would use Windows Install CD. I have written a short script that might do that for you. Check the script and run it (renamed to a .cmd extension) from USB-root if you trust it.
Run grubinst_gui.exe and select your USB. (Probably HD1) (fig .4)
If you are unsure, remove USB and restart application to see what disks are present when USB is pulled.
Copy grldr from either the grubinst package or unzip Grub4Dos and copy the grldr from there. It should go to the root of the USB. I picked the one from Grub4Dos as it was newer and bigger
Prepare Gru4Dos boot menu by placing file menu.lst in root of USB. Place a file with an unique file name of your choise at the root also. The find will search and set the disk where the file was found to root. My file name is MyUSBfob.
Hint. Select your hostname in menu.lst for dsl before starting (or go with default mydslbox). If having problems starting X after changing host name there is a conflicting .Xauthority. Run the un-configured dsl again, set backup device inside dsl and reboot saving config.
Mount the downloaded ISO using loop back file system and copy the files to the USB. Assuming that your USB is mounted on /media/TOOLS.
This box is only here for reference. There is no need to do this part. If you have special needs and need change the inside of dsl then this is the way to do it.
Mount the downloaded ISO using loop back file system and copy the files. Assuming that your USB is mounted on /media/TOOLS.
GParted, as written in menu.lst above, runs in memory. When you have booted GParted you can umount the USB and pull the USB and continue working if you want. You should now umount the USB ( via GPated Menu ) and repartition it.
Do a shrink of the USB file system so that you leave 100MB free after. Format this new free space to FAT16 so that you can have Damn Small Linux (which also can be configured to run in RAM) to save its configuration when doing exit.
Follow instructions in Hiren's-bootcd-on-usb-disk (described below with my words instead)
Download extract-boot-files and unzip it. Copy the Hiren.iso to the new BootUSB sub-folder. Run Get_Boot_Files.cmd which will extract all needed Dos files to C:\USB. Copy all files in the C:\USB folder to the root of your USB. You should also copy the BootCD folder (from the iso) to the USB.
Commands for copying the BootCD folder would look something like:
Of course you now need a decent background to your grub menu. The background should be in XPixMap format with size 640x480 pixels and 14 colours. Zipping the image is optional. Package imagemagick contains a convert utility for getting from jpeg to xpm and changing size/depth.
If converted picture looks bad (did for me). Then do an image yourself or do as I did, looked on the Internet until I found one that I liked. You can read more about splash images here
End-of-page