Login to your fuzzymunchkin email
| TDot's pad |
|
| |
last update fri 8:29am
|
|
USB KEYFOB TUTORIAL VERSION: 1.1
Last Updated: Mar. 16 - added info about embedded DSL
Feb. 04 - added warning about using HP utility, added note for non-windows users
Jan. 26 - added custom minirt24.gz to allow mounting the keyfob read-write
Jan. 23 - updated link to DSL site with an important note
Jan. 10 - updated SYSLINUX section
(broken link and bad new version), msvcr70.dll added to timfobbd.zip,
added section about getting your BIOS to boot from USB, updated
requirements, added disclaimer, updated initial (purpose) blurb
Dec. 24 - moved the SYSLINUX operation to part A for efficiency
Dec. 2 - completely rewrote part B of section one
Nov. 30 - sectioned-off page, added Debian Sarge section
If you find this page useful, please send me
an email with feedback or just saying it worked for you! Email address
found on left navbar at bottom. If you really REALLY find it useful,
you could donate this needy student (me) some cash using PayPal (safe
and secure) to put toward my next term's textbooks or whatever :)
DISCLAIMER
I am in no way responsible if something goes "wrong"; if your keyfob
becomes unusable, your toaster stops working, you suffer massive
dataloss across multiple machines -- not my problem. You absolve me of
any liability for anything that happens to your keyfob or computer(s)
by following one or more of my instructions. I am not responsible for
what is found at the end of my hyper-links (links): efforts have been
made to ensure they don't contain offensive or illegal material, but if
they do it is your responsibility to not accept the content. I host no
illegal files on server(s) that I partly or wholly own, don't ask me
for them.
REQUIREMENTS
- patience
- a USB keyfob (flash drive, keydrive, whatever you wanna call it)
- a computer that can boot off your USB keyfob (only newish computers can! see section about this below if you're not sure)
- Free space on the keyfob (if you want multiple sections, ADD
the required space as there are very few bytes shared between them):
- For DSL (section 1), ~55MB free (if you want embedded too then add ~60MB = ~120MB)
- For Hiren's BootCD (section 2), ~37MB free
- For
Debian-Sarge installer with "netinst" ISO (section 3), ~112MB free
(note that this depends heavily on how big the netinst ISO is when you
download it! Check how big the newest version is if you're unsure and
you're contemplating this option)
Procedures in this document will erase your keyfob so back it up first!
PURPOSE / HOW TO USE THIS DOCUMENT
So what's the purpose of this document? The purpose is to make your
keyfob more useful. There are many uses for keyfobs, primarily storing
files that you wish to have with you at any time, like addresses or
contact info, lists of your favourite websites, and so on. One really
useful thing is to be able to boot from your keyfob into any
kind of operating system you wish, for any purpose you desire. Booting
refers to "boot-strapping" your computer, which for you newbies kinda
means "what happens when you start up your computer". For instance, the
majority of you readers will be booting into Microsoft Windows when you
turn on your computer; booting from your USB keyfob would allow you to
boot something else, say Linux, without touching/erasing/modifying your
Windows installation.
- SECTIONS 2 AND 3 ARE DEPENDENT ON SECTION 1 !
Both sections 2 and 3 presume that section 1 was completed
successfully. If you only want section 2 or 3 (hiren's bootCD) then go
through section 1 first and delete the KNOPPIX directory when you're
done section 1.
- Section 1 is about installing DSL on your keyfob, which
stands for Damn Small Linux. This is a distribution of Linux that is
usable straight from your keyfob, ie. you can boot into and use Linux
from your keyfob directly. DSL is based on Knoppix, a Debian-style
Linux distribution that is bootable from CD, but is much smaller (DSL
is around 50MB, Knoppix is usually 700MB)
- Section 2 is about installing Hiren's bootCD on your keyfob,
which is a handy collection of MSDOS-based utilities that make life
much easier. With this installed you can boot from your keyfob into
MSDOS, and then use Hiren's bootCD. You can still boot into DSL with
section 2 completed. Note that Hiren's BootCD is an illegal collection of copyrighted materials,
so you must not actually ever download Hiren's bootCD without first
buying all of the software it contains (Norton Ghost, Partition Magic,
hundreds more)! I am not endorsing software piracy, I am simply
providing information on how to use your keyfob in a certain way -- I
believe that useful information should and must be published on the
internet for all to see.
- Section 3 is about installing the "Debian-Sarge installer" on
your keyfob. This means that you can boot off your keyfob into a Linux
installer, and use it to install Linux on any machine. This is handy if
you're installing Linux on multiple machines or at friends' houses etc.
GETTING YOUR COMPUTER TO BOOT FROM A USB KEYFOB
Since the vast majority of this document is about getting your USB
keyfob to boot, it's important that you can actually DO this :) To be
more specific, the motherboard inside your computer needs to have a
BIOS that supports booting from USB keyfobs. What BIOS is and how it
works is way beyond the scope of this page, all you need to know is
that it's the thing you get into right when your computer is first
powered-on, by punching a key (usually "Delete", F1, or some other F
key like F12 etc). If you know you can boot USB keyfobs, you can stop
reading this paragraph and skip ahead. Otherwise, we need to determine
whether you can -- only "newer" computers have this ability. For
instance my ASUS A7N8X-Deluxe motherboard cannot, but my IBM ThinkPad
T41 (notebook) can, and so can my wife's computer.
This part of this document will evolve over time, and is fairly
scant right now, but let's do what we can. If any one of these methods
below works, you're done, you can boot from your USB keyfob. Remember to have your USB keyfob plugged in before trying these things, it usually helps
as the BIOS may give you more options with it plugged in. Also remember
that at this point your keyfob probably isn't bootable, so you can't
actually try it out until you've run through the steps in this
document.
- See if your BIOS has a "boot selector" on bootup that doesn't even
require you to enter the BIOS to change anything. On my IBM ThinkPad
T41 I can press F12 when it initially powers on, and it'll pop up a
list of devices I can boot from (I just select USB FLASH HDD and i'm
done). On my wife's computer she hits F8 when it powers on, and she
gets a similar menu to choose from. See if you have something like this
(look for "boot menu" or something in your motherboard's manual or
whatever).
- Try entering BIOS and telling the computer to try booting
from your USB keyfob first. To enter BIOS, try hitting "Delete"
(sometimes marked "Del", on the keyboard directly to the left of the
"End" button if you have a standard english keyboard) or "F1"; consult
your motherboard manual if you can't figure out how. Now, you're
looking for an area where you set the boot device order (like first try
floppy, then try CDROM, then try hard-drive aka HDD). Sometimes you'll
find a single row in some advanced page of the BIOS where you change an
option like "A/C/SCSI" to "A/USB-HDD/C" or something like that, other
BIOS' will have an entire page devoted to the task. My mobo
(A7N8X-Deluxe) has a page where you hit + or - on the numpad to move
things up or down (things at the top get tried first), and you hit
enter to change devices in the categories. What you are looking to do
here is to make sure that your USB keyfob gets booted from before your hard-drive (HDD) does.
Your USB keyfob may be called one or more of many things: USB, USB-HDD,
USB-FDD, USB-ZIP, USB-FLASH, etc. Sometimes some BIOSes will work with
USB-FDD whereas others will only work with USB-HDD, you'll have to
experiment (doing so does NOT harm the computer in any way; if you get
a failure you'll just see "SYSTEM COULD NOT FIND BOOT DEVICE" or
something similar, and you then power off your computer, get back into
BIOS, and try something else). Before you change the boot device
option, remember what it was before! Write it down so you don't forget
- you'll need to reset things back to the way they were if you don't
want to be able to boot from USB. After you've changed the option to
what you want to try, you'll need to exit and save your changes. Usually there's an option that does this - just hitting "ESC" repeatedly exits without saving, bad.
I've received an email from Roger Ligustrom, who has an ASUS
M5N laptop and couldn't get it to boot from USB. It turns out his
laptop was finding the USB keyfob and labelling it as a normal
hard-drive in BIOS. He suggests exploring the lists of hard-drives your
BIOS shows (if it lists things this way) and making sure your USB
keyfob isn't chucked in there. If it is, you'll see the brand-name of
your keyfob (ie. if you have a Mini-Cruzer made by SanDisk you might
see "SanDisk Cruzer Mini" or something like that)
WHAT TO DO IF YOU DON'T HAVE/USE WINDOWS
A very few readers have expressed frustration that this tutorial is
written primarily for Windows users. There's a good reason for this:
with no offense meant, Windows users are generally less informed than
Linux users are, and have more difficulty with the process. That's why
these instructions are written for people using Windows (who want to
try Linux out by booting from a keyfob and not reinstalling their main
O/S). That being said, it is very easy to apply these instructions to Linux. Here are some suggestions.
- I'm not sure how one would rewrite the MBR on a keyfob in Linux.
The good news is, unless you have done something odd or have trashed
your 'fob, most likely you'll already have an MBR on your 'fob from
when you bought it that works fine. So, you may well be able to skip
part A. If you get to the end and things don't work (syslinux never
comes up when booting from the fob) then you'll have to investigate
further. I've noticed that syslinux says it includes a basic MBR in the
normal syslinux download, so you may wish to start from there. Please, if anyone finds out how to rewrite the MBR in Linux, email me !
- In part A you can run the Linux version of syslinux, which
works perfectly. I remember having to use one of the options when I ran
syslinux in Linux, like
-s or some other cmd-line option. Anyone who figures this out, email me.
- In part B you should be able to follow the fdisk instructions with no problems, from your own installation of Linux.
- In part C you can mount the DSL ISO without using the Windows Daemon-Tools program; simply mount the file as a loop-device:
mount -o loop /path/to/DSL.iso /place/to/mount - you may need to specify -t iso9660 or something close to that if your kernel/distro didn't autodetect the filesystem type.
- Getting Hiren's BootCD installed to your 'fob in Linux should
be exactly the same as doing it in Windows, just make sure you download
and use all the modified scripts/files that i've prepared for you (as
opposed to trying to do it yourself)
- Getting Debian's Installer installed to your 'fob in Linux, again, should be exactly the same as doing it in Windows.
SECTION 1: GETTING DSL (Damn Small Linux) BOOTABLE FROM YOUR KEYFOB
DSL VERSIONS - important information, read carefully!
As of DSL version 0.9.2 there seem to be a few different "versions"
of DSL. For my instructions to work you must grab the "normal" version,
ie. named dsl-x.x.x.iso, not a version that contains the word
syslinux or anything like that (even though we are using syslinux to
complete the installation). The reason for this is because the syslinux
version doesn't contain the boot directory, so it's missing a whole
bunch of files we use. Oh, and this link gives you a choice of a whole
bunch of mirrors -- here in Waterloo the dsl.thegeekery.com is a great
mirror (300kB/sec maintained).
Embedded version: As of DSL version 1.0rc1 there is an "embedded"
version, which is quite a cool thing: it allows you to run DSL inside windows,
without having to reboot! It does this by using QEMU, an open-source
program that translates calls at the CPU level from Linux to Windows.
The upshot of which is you get Linux running inside a window -- not
like Cygwin which is a bunch of programs that look like Linux but are
really specially compiled versions to run on Windows. I've taken a
snapshot for you, here. Doing this requires NO EXTRA WORK,
as the kind folks at DSL have done it all for you! (Please consider
donating to them) To install the embedded version, proceed as normal at
first - download the "normal" version as mentioned above (because the
embedded distribution doesn't have the needed boot directory), and
complete section 1 entirely. Then download the newest embedded version
(.zip file), and copy over the QEMU subdirectory and dsl-linux.sh and dsl-windows.bat files, all to the keyfob root directory. Try double-clicking the dsl-windows.bat file, it should start up for you! Note that this requires an extra ~60MB for the QEMU/harddisk
file. Also note that you can still boot off your fob to natively start
DSL, which is faster than using QEMU to run it under Windows (by a
factor of 5-10 times).
With your keyfob plugged into a WINDOWS machine, while booted in Windows, do the following parts.
PART A: Getting your fob's MBR / boot-sector properly written
- Start DSL (Damn Small Linux) downloading.
Download DSL here: DSL
- Go here and start Daemon Tools downloading: Daemon Tools
- Go here to get the HP program and click DOWNLOAD: HP fmt util. I've received an email from Dan who had a bad time with the HP tool. It worked fine for me, but you should be aware of what happened to him: I
think you should know that the HP formatting util that rebuilds the mbr
on the fob is buggy and dangerous. I loaded it, pointed it to my
attached fob, and clicked format. It jumped drive letters to an
attached drive and wiped out the fat tables in an instant. I believe it
automatically jumps to whatever is the first USB device drive letter. I
was able to restore the data thanks to a powerful utility I keep on
hand for such disasters, but others might not be so lucky. I'm don't
blame you for this happening one bit. I just suggest you add a warning
to your instructions to have no other usb attached storage devices
other than the fob for this step.
- Install the HP program
- Take Dan's advice to heart, and remove all attached USB devices that have storage other than what we're formatting.
- Start the program, for "Device" choose your keyfob, for
"Filesytem" select FAT (not fat32!), for label put dadskeyfob or
something; don't enable quick format, don't enable create dos startup
wank
- Hit go or whatever, let it format. You don't actually care
that this is formatting the drive, the important thing it's doing is
rebuilding your MBR properly for your keyfob.
- Grab SYSLINUX, from here. Note that I use version 2.11 which is where the link goes, whereas the newest version is 3.x -- i've had a report from jhoff80
that syslinux 3.02 didn't work for him whereas 2.11 did. Therefore i'm
recommending that you stick with 2.11! Expand the ZIP file to a
directory, and open a command-prompt there (or manually run cmd.exe and
change directory to where you extracted it)
- Type the following carefully with your keyfob plugged in, where X represents the drive letter you can see your keyfob as in Windows explorer:
syslinux.exe X: (note the .exe is mandatory, otherwise it picks up the .com version which Windows can't run!)
- Verify that you now have "ldlinux.sys" on your keyfob! You may
need to turn on hidden/system/OS file-viewing to see this. Read further
down, instructions on how to do this in Windows XP can be found further
on in this document.
PART B: Correcting your fob's partition ID
This part deals with a problem that the HP utility has; it sets the
partition ID of the partition it creates to HEX code 'e', which means
"W95 FAT16 LBA"; this doesn't work on many machines because the BIOS
expects HEX code '6' ("FAT16"), like for instance, all three of my
machines. The goal of this part is to change the partition ID.
Historically this has proven the hardest part of this whole webpage for
some users, so I've spent almost a full week working out how to
make it all possible without having to download and install Linux.
Basically, I couldn't find a windows-native utility that allows you to
change the partition ID of a USB keyfob, *while still booted in
Windows*. Read on...
- Download the handy boot-disk image and installer that i've kindly put together for you, from here.
- Extract the contents of the zip file somewhere, and
double-click (execute) write-bootdisk.bat. It'll ask you to put a
floppy disk in the drive, THE CONTENTS OF WHICH WILL BE ERASED
(don't worry about formatting); follow the instructions. When the
window closes (or if you've executed it manually from the command
prompt whenever it finishes) and the floppy-LED goes out, continue.
- Remove ALL devices connected to your computer via USB (ok so
if your mouse is connected via USB, first shut-down windows and power
off your PC, then remove it too). I mean everything: USB printers, USB
mice, your USB keyfob, everything. If you have a USB keyboard remove it
too, and get a USB-PS/2 adapter (one should have come with your
keyboard hopefully).
- Boot your computer from the floppy disk. Hopefully your BIOS is already set up to do this -- if not, make it so (how to do this is out of the scope of this page!).
- Eventually you will see a prompt, "Hit ENTER to activate this console": hit ENTER.
- Plug in your USB keyfob. You should see some text appear on
the screen! It might contain the words USB Mass Storage. It must
display something along the lines of "sda1" on the screen, which might
for you be sdb1 or sdc1 or sdd1, you get the picture. I'll presume from
hereonin that it's sda1, if not then substitute what you got. If you
don't see anything, you're outta luck - I tested this on two machines,
a P2 400 and a P4 3ghz, both worked flawlessly for me - send me email
with your system specs.
- Type
/sbin/fdisk /dev/sda (note the missing 1 at the end, this is intentional) and hit enter
- You're now in Linux's fdisk utility. Hit the following keys then ENTER:
- t
- (You should now be changing the type of partition 1 because it
auto-selected partition 1 since you only have one partition. If you
have more than one partition, which you shouldn't unless you've
deviated from my instructions, select the first one)
- 6 (which is FAT16)
- p
- You've just printed the proposed new partition table to the
screen. See the boot(able) column? Make sure your first (hopefully
only) partition has an asterisk (*) there. If you used the HP utility
it will already be bootable. If not, hit 'a' and make it so.
- w
- You should now be out of fdisk (w does write + quit). Remove
the floppy from the drive, and turn your computer off (don't worry
about shutting down properly, just switch it off, it hasn't touched
your hard-drives)
- Plug in all of the USB devices you unplugged, leaving your USB keyfob still plugged in.
- Reboot back into Windows!
PART C: Putting DSL onto your keyfob properly
- Hopefully by now DSL has finished downloading. Extract it somewhere, it makes an .ISO file around 50mb.
- Hopefully by now Daemon Tools has finished downloading.
Extract it somewhere, and install it. By default it will add just one
virtual drive to your computer
- Right-click the red lightning-bolt in your systray (it's
Daemon Tools silly), and mount the DSL .ISO file by going "Virtual
CD/DVD-ROM", "Device 0...", "Mount Image", select the DSL .ISO file
- Go to the drive you've just mounted (might be like F: -- you
can tell which it is from Daemon Tools, the one BEFORE you clicked
"Mount Image"), this represents all of the stuff on the DSL CD
- Copy everything there to your keyfob drive.
- In windows explorer, go to your keyfob drive.
- Go into boot\isolinux, and MOVE everything up to the root of
the drive (click left mouse button on list of files, hit CNTRL-A to
select all, right click them and select Cut, then in left-pane select
the root of the keyfob drive, and in the right-pane right-click and
select Paste)
- As Brian MacAskill so kindly pointed out, when you boot into
DSL the keyfob is mounted read-only, and you can't unmount it because
the DSL image is on it. This is a pain if you want to write some stuff
to your keyfob while in DSL. So, i've fixed the problem by removing the
characters
-o ro from one line in linuxrc, a
script contained within minirt24.gz (for those interested I used the
DSL 0.9.2 version). The upside is that you can write to your fob in
DSL; the downside is that you have to shutdown DSL properly if you use
this, whereas if you don't you can just switch the power right off
because nothing is mounted read-write. So, if you would like to be able to write to your keyfob while booted into DSL, download my minirt24.gz from here, and overwrite the one that's now on the root of your keyfob.
- Delete the empty boot\ directory (yes, deletes empty isolinux dir too) that you've just moved everything out of
- On the root of the drive, delete isolinux.bin, and rename isolinux.cfg to syslinux.cfg
You're done! Now you wanna try it out? On a newish computer's BIOS
(hint, try Delete on bootup) change the first boot option (hunt for it)
to USB-ZIP . If that doesn't work, USB-FLOPPY or USB-FDD (same thing)
will.
SECTION 2: GETTING HIREN'S BOOTCD BOOTABLE FROM YOUR KEYFOB
I now have Hiren's BootCD bootable from my keyfob as well as DSL.
It's toight. Since Hiren's BootCD contains muchos illegal software, I
can't post it on my site (since I respect and love my ISP, Golden.net).
However, I can link you to somewhere where you might find it with Shareaza or your favourite P2P client:
eDonkey2k URI and
magnet URI.
You can find out information about what the CD contains on Hiren's weird homepage, here.
To get your keyfob booting both, you'll need to do the following:
- Grab Hiren's BootCD, possibly from one of the P2P links above (I don't host it, so you've gotta find it)
- IMPORTANT: after some feed back from David, I've
neglected to mention -- you must at this point be able to see files
like io.sys and jo.sys, which are both "hidden" and "system" files. If
you're doing this in windows as I suggest, by default windows will hide
these files from you. To enable hidden/system file viewing, in windows
explorer do the following (instructions are for Win 2K/XP but will be
close for 95/98/ME; STFW if these don't work for you):
- In windows explorer go to the tools menu
- Hit Folder Options
- Go to the View tab
- Disable the "Display simple folder view in Explorer's Folders list" checkbox
- Enable the "Display the contents of system folders" checkbox
- Choose the "Show hidden files and folders" radio button
- Disable the "Hide extensions for known file types" checkbox
- Disable
the "Hide protected operating system files (Recommended)" checkbox, and
click "Yes" on the ridiculously annoying confirmation prompt that pops
up
- Hit OK
- Now we need to get Hiren's BootCD's bootup files onto your
keyfob. These are found in the bootable image section of the CD; if you
just look at the burned CD or mount the image in Daemon Tools, you
won't see them. First i'll explain the manual way of getting the files
(useful if you wanna apply this process to any CD)
Do either this:
- Download IsoBuster,
it's not free but you can try it for somewhere around 30 days. It is a
fantastic program that allows you to see all portions of the CD,
manipulate/save/read/write them in all sorts of different formats.
- Using IsoBuster, go to the bootable image part of the CD, and grab the boot.img file, copy it out somewhere onto your hard-drive
- Download WinImage,
again not free but you can try it for somewhere around 30 days. Another
fantastic program, allows you to read bootable image files, extract
from them, create them, etc.
- Using WinImage, open up the boot.img file, and extract all of the files to the root of your keyfob.
So that's one way of doing it. But, if you're like me, you're
thinking... "ah man, you've SO already done that, can't I just download
those files from you?" Well as it happens none of these files are
illegal to host, so sure! So, as an alternative, do the following.
OR, do this:
- Download Hiren's BootCD's bootable files from me, here. Note that this probably requires you to have the same version of Hiren's BootCD I have, version 6.
- Extract them to the root of your keyfob.
- On your keyfob, DELETE jo.sys (NOT io.sys !)
- Put the following dos boot-sector file onto your keyfob (in the root directory): dos.bss
. This file actually contains way more than you need (it contains for
example my 1GB keyfob's MBR which you definitely don't want), but
syslinux rules, and will only load in the correct bytes/information.
- Delete from the root of your keyfob (these files just got
placed there from Hiren's Boot CD in step 3) autoexec.bat, load.dat,
and startup.bat
- I modified the three scripts you just deleted so that they
work (hopefully!) when you boot off USB, since Hiren expects you to be
booting from a CD, and, you ain't. You can grab my modified scripts here.
Now, extract all the files and put them on the root of your keyfob
drive. (If you wanna see what I did, diff them against the original
ones off of Hiren's ISO)
Here's what the root of my keyfob looks like, after putting DSL and
Hiren's BootCD on it, with system/hidden file-viewing enabled.
Volume in drive J is TIMFOB
Volume Serial Number is FCE4-B606
Directory of J:\
10/28/2004 10:46 PM <DIR> KNOPPIX
10/27/2004 08:02 AM 2,048 boot.cat
07/25/2004 04:13 AM 110 boot.msg
10/16/2004 02:17 AM 1,592 f2
07/25/2004 04:13 AM 1,675 f3
07/25/2004 04:13 AM 256 german.kbd
08/15/2004 02:31 AM 994,807 linux24
07/25/2004 04:50 AM 7,367 logo.16
09/01/2004 11:23 PM 790,312 minirt24.gz
08/21/2004 07:35 PM 2,023 syslinux.cfg
10/28/2004 10:46 PM 7,836 ldlinux.sys
08/01/2002 09:03 PM 81,920 memtest.exe
12/20/2003 11:57 PM 4,848 mouse.com
04/18/2004 09:57 PM 14 MSDOS.SYS
05/23/2004 11:58 PM 244,833 usb_aspi.cab
07/08/2003 10:23 AM 8,868 WBAT.COM
12/20/2003 11:57 PM 11,630 xmsdsk.exe
05/05/2003 10:22 PM 94,292 COMMAND.COM
05/23/2004 10:18 PM 6,530 CONFIG.SYS
12/20/2003 11:57 PM 229,705 DOCMEM.EXE
05/24/2004 12:49 AM 348,755 drivers.cab
05/05/1999 10:22 PM 49,185 EMM386.EXE
12/20/2003 11:57 PM 49,168 extract.exe
12/20/2003 11:57 PM 25,454 GM.EXE
05/05/2001 10:22 PM 10,351 HIMEM.SYS
04/27/2004 05:40 PM 125,960 io.sys
10/28/2004 11:15 PM 512 dos.bss
10/28/2004 11:27 PM <DIR> BootCD
10/30/2004 02:36 PM 4,928 Autoexec.bat
10/30/2004 02:36 PM 1,766 load.dat
10/30/2004 02:26 PM 411 startup.bat
33 File(s) (lots of) bytes
5 Dir(s) 82,608,128 bytes free
That's it! You should now (hopefully) be able to boot into Hiren's
BootCD. You do this by booting off your keyfob just like into linux,
but at the syslinux prompt you need to type "dos" (enter). That patches
in and loads dos.bss, and then io.sys is bootstrapped etc. You should
see Hiren's nice little menu; after you select a choice, there will be
a grinding pause as my modifications attempt to figure out WHERE your
BIOS has put the boot-device; it better be either A:\ (what Hiren
originally expected) or C:\ (where my keyfob gets placed by the BIOS of
my IBM ThinkPad T41). If it is C:\, you'll get an error as my script
tries to look on A:\ and doesn't find what it wants. Hit 'a' for abort
or 'f' for fail until the error goes away; this is ok, it's just
figuring out where stuff is.
I'm sure there's a cleaner way of doing things, I just don't know DOS
batch-file programming that well :)
If Hiren's Boot CD starts to boot but doesn't work, the most likely
your BIOS is placing your keyfob as something other than A: or C:, in
which case you should modify the very top of autoexec.bat (my modified
version, not Hiren's original!) -- it should be obvious what to do.
Experts should note that i'm not loading any USB/ASPI drivers, i'm
presuming after booting your BIOS has made the whole drive accessible
(not just the first 1.44mb or something weird!); if that's what you
find is happening to you, tough luck, I have no idea how to fix that
(try loading some USB/ASPI drivers in autoexec.bat?).
So, now hopefully you've got everything working nicely. You can boot
into Linux if you need to, and you can boot into Hiren's CD for things
like restoring a Norton Ghost image. If your fob is as big as mine you
can get the image on too! Awesome, installing WinBloze on people's
computers just got a lot faster/simpler...
SECTION 3: GETTING DEBIAN SARGE INSTALLER BOOTABLE FROM YOUR KEYFOB
So another useful thing would be to be able to install Debian on any
machine you're passing by, right? I mean, since you've got Hiren's
BootCD booting you can already boot up Ghost or whatever and restore a
nice windows image you've got on there, but what about Linux? I mean,
who really wants to install Windows anyways, right? Well look no
further, we can do that too ;)
Here's a little background for the n00bs out there, so that I can
cut down on the number of emails I have to write. Experienced Linux
users, skip over this paragraph. Linux is an operating-system (OS),
like Windows is an OS. However, the term Linux really applies only to
the "kernel", the sort-of core part of Linux that acts as the central
brain. For experienced Windows users, this is kinda like the
triumvirate of command.com+msdos.sys+io.sys. When people refer to Linux
in the context of an OS, they are typically talking about a
"distribution" of Linux. A distribution refers to not only the kernel,
but all the other utilities and programs one needs to make Linux a
full-fledged OS; examples include gcc (a compiler), init (the thing
that gets loaded first by the kernel), and so on -- the kernel, or
"Linux", doesn't include these things, and without them you can't
really do anything. So these distributions make it easy by including
everything you need. There are lots of them: Redhat, Mandrake, SUSE,
Debian, Slackware, and MANY others. The good news? One of them, Debian,
is *miles* ahead of the rest! This section explains how to have your
keyfob boot into the Debian installer, so that you can put it on a
computer. "Sarge" refers to one of the versions of Debian; Debian has
numerical versions like 3.0, but codenames them easy-to-remember names:
3.0 is Woody, 3.1 is Sarge, and so on. At the time of writing (end of
Nov. 2004) Sarge isn't quite out yet, it's still considered unstable.
However, it's damn close to being out, and I personally consider it
quite stable, if that means anything to you. Certainly more stable than
any version of Windows that's ever hit the light!
These instructions will guide you through putting the additional
files you need on your keyfob to make the Debian Installer able to
install straight from it to a given computer. The amount of space this
takes varies; the skeleton setup without the ISO (payload) will take
only ~10mb or so, but the ISOs vary in size from ~40mb (business card
iso) to ~110mb (net install iso) and even higher. The choice is yours !
I keep the net install iso (netinst) on my fob, because that's the most
useful one. Also, these instructions aren't the "easy" variety where
everything's done for you, they outline all the steps you need to grab
the latest version, do the changes yourself, and get it on your fob.
The reason for this is because Debian is fantastic, and they're always
coming out with new versions of the installer and the ISOs themselves.
For that reason it'd be silly to just give you some pre-made .gz files
because they'd be out of date very quickly.
- Right, let's start: download all the Debian files you need, putting them somewhere you remember.
- Download boot.img.gz from this link here: http://ftp.debian.org/debian/dists/testing/main/installer-i386/current/images/hd-media/
If you're like me, you'd naturally want to try the newer version,
the 2.6 version, first. Doesn't work for me ! As of right now (nov. 30
2004) it seems that USB keyfob support is broken in the 2.6.x kernel
that's up, so I recommend against it. If you do opt for the 2.6.x line,
then only download the stuff from the 2.6 directory, and follow the
instructions below in the same fashion. Also, note that this link is
for the i386 branch; if you're running non-i386 architecture stuff then
you should know well enough what to do instead :)
- Download vmlinuz from the same link as the previous step.
You'll need to put this onto your keyfob's root dir, but if you're like
me you'll wanna give it a memorable name (this is the kernel that the
keyfob will boot into before starting the Debian Installer). Rename
this file "sarge" and put it on your keyfob.
- Download one Debian ISO image. I recommend the "netinst" (net
install) image. The general page of all available ISOs can be found here, and the page specific for the i386-netinst ISO (what I recommend) is here. Put it on the root of your keyfob (\)
- Take the boot.img.gz file and decompress it to boot.img (you can use WinRAR for Windows to decompress .gz files)
- Extract the contents of boot.img to another directory (further copying of files is from this directory). On Windows you can use WinImage
to do this -- not free but you can try it for somewhere around 30 days.
A fantastic program, allows you to read bootable image files, extract
from them, create them, etc.
- Copy initrd.gz and disk.lbl onto your keyfob's root dir (\)
- Open up syslinux.cfg (in this directory of extracted contents
from the boot.img) in notepad or some editor. Copy to your clipboard
(using edit->copy) the part that looks like this (you only need to
copy one set of three lines):
label linux
kernel linux
append vga=normal initrd=initrd.gz ramdisk_size=9610 root=/dev/rd/0 devfs=mount,dall rw --
- Open up syslinux.cfg that's already on your keyfob, from section 1 (putting DSL on your keyfob) in an editor, like notepad
- At the bottom of the file, paste in the lines you copied earlier. Now we have to make a few changes: change
kernel linux to be kernel sarge,
because we called the kernel sarge, remember? Also, change the label to
something unique so that SYSLINUX doesn't get confused: change label linux to label sarge
That should be it ! Now you should be able to boot off your keyfob,
still type "dsl" or "dos" for DSL and Hiren's BootCD respectively, but
also you should now be able to type "sarge" and the Debian installer
should start up!
|
|