Monday Jun 16, 2008

DOS Bootable USB flash drive - how I did it

    There are 2 things you need in order to make an USB flash drive boot into DOS. The first is a boot sector, and the second are the DOS boot files. Below are the steps I used to get these onto a USB flash drive, making it possible to boot into DOS from the USB flash drive.

    The following steps where all done in Microsoft Windows XP in a VMware virtual machine. They should work with most other versions of MS Windows. I successfully used these steps on an USB flash drive I got at Immersion Week 2008 for use in a ZFS demo (Identifies itself as CBM). YMMV depending on USB flash drive model and manufacturer. These steps are based off of the very useful information at BootDisk.com.

1) Getting a boot sector on the USB flash drive
    Start by gettng the mkbt DOS utility from here mkbt
    Unzip mkbt into a temporary directory
    OK, if you are like most people these days, you don't have a floppy drive in your laptop or desktop, and you may never have, although you should know what a floppy is if you have any interest in doing this. So, if you don't have a floppy drive in your machine, you can use vfd to create a virtual floppy, which is what I did. You can get vfd from here vfd, then follow the directions for creating a virtual drive in RAM, then save it as a file for future use. Use the Windows Explorer format menu item to format the virtual floppy and make sure you check off the box to make an MS-DOS start up disk.

    Once you have access to a DOS boot floppy, use the following command, from a command prompt, to save the boot sector, where a: is the drive letter of your DOS bootable floppy (virtual or physical)

mkbt -c a: bootsect.bin

    Now use the following command to write the boot sector to your USB flash drive, where n: should be replaced with the drive letter of you USB flash drive.

mkbt -x bootsect.bin n:

2) Getting the DOS boot files
    copy all the files from the boot floppy onto the USB flash drive.

    Now you should have a DOS bootable USB flash drive, for use with a system that supports booting from USB, including x64 products from Sun. Copy over whatever DOS utilities you need to use, including AFU for Adaptec RAID controller firmware updates, which is used in some of Sun's x64 products. Or use it for whatever need you may have. Even with a small USB flash drive, you will have a lot more room than a floppy ever dreamed of. Perhaps my next blog post should be on whether inanimate objects dream. :-)

Update : Per several comment poster's, I have fixed the command line for writing the boot sector onto the USB flash drive. It is now correct in the above post. Thanks to those who caught my mistake. :-)

Monday Apr 14, 2008

My old app on a new medium

    I enjoy dabbling in programming, particularly when I doing it for my own interests. As a matter of fact, that's how I first got started with computers, back in high school. Computers weren't even part of the curriculum yet, but the math department had one for scoring tests, and if you came in early or stayed after school, you could program in BASIC on it. With a keyboard and monitor no less. Which was more than I had at MIT and Northeastern University in the years to follow.

    Over the years I have programmed in Visual BASIC, which I learned while a phone support engineer for a PC email app and had a developer respond to a customer feature request that it was something anybody could do in Visual BASIC so I learned how. I've also played with Java, Perl, Pascal, VAX Assembler, BeyondMail Rules, DOS batch, shell scripting, and who knows what else. And they have all been fun in their own way.

    When I got my first PC, a Leading Edge IBM compatible, I started playing with 8086 assembly programming. Those were the heady days of Norton and his books on the inner workings of DOS and PCs. I've always tended to prefer programming useful things, at least to me, like utilities, and despite there being several already in existence, I started coding a PC identification program. I got far enough to display the usual basics before getting distracted by other things. I have also been known to have pack rat tendencies, which I am sorely regretting these days as I drastically downsize. Fortunately, I saved most of my coding, exe and source, and still have my PCC.EXE app from all those years ago.

    For some reason, perhaps the pack rat instinct in an odd way, I like emulators. Right now I have both VMware Fusion and Sun's VirtualBox installed on my MacBook Pro, as well as a Palm emulator and Basilisk II, an old Mac emulator. I won't be surprised if others show up eventually as well. Just recently it was noted, on a Palm blog I track called TamsPalm, that the PALMDOSBOX code was picked up by a well qualified Palm OS developer and made to work on some newer Palms, including my T3. Naturally, I had to play with it, as I have several other DOS apps I sometimes play with for old times sake. And it works, although the built in virtual keyboard doesn't have a \\ key, oddly enough. Makes it hard to change directories. Without further ado, a picture of PALMDOSBOX running on my T3, with my PCC.EXE app running under PALMDOSBOX.

About

A place where Perley Mears sounds off on topics relevant to his work at Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today