The MASM Forum Archive 2004 to 2012
Welcome, Guest. Please login or register.
June 10, 2023, 09:16:46 PM

Login with username, password and session length
Search:     Advanced search
128553 Posts in 15254 Topics by 684 Members
Latest Member: mottt
* Home Help Search Login Register
+  The MASM Forum Archive 2004 to 2012
|-+  Miscellaneous Forums
| |-+  16 bit DOS Programming
| | |-+  Starting DOS from USB drive
« previous next »
Pages: [1] 2 Print
Author Topic: Starting DOS from USB drive  (Read 16785 times)
Gunther
Member
*****
Gender: Male
Posts: 184


Assembly Language Dinosaur


Starting DOS from USB drive
« on: September 06, 2010, 11:49:15 PM »

I've searched inside the forum and found no answer. So here is my - probably a bit silly - question. Has anyone experiences with starting a native DOS (MSDOS, PCDOS, DRDOS or whatever) at a machine without floppy disk drive. I suppose it should be possible from an USB stick - but how?

What's the background of my question? Several years ago, I've fired up a 16 bit PowerBASIC application into 32 bit Protected Mode. All the authorities, including Bob Zale and Dave Navarro, did say: that's not possible. In fact. it was a bit tricky, but it did work without crash under several operating systems.

My plan is now, to screw up a DOS application into 64 bit long mode. Therefore, I need a plain DOS; emulations will not help, because one hasn't direct access to the hardware.

Gunther
Logged

Forgive your enemies, but never forget their names.
japheth
Guest


Email
Re: Starting DOS from USB drive
« Reply #1 on: September 07, 2010, 06:53:37 AM »

There's a free tool from HP, called DriveKey. It is meant to be used with HP hardware, but works with most (all?) other PCs as well. It will format the USB stick as a Hard Drive, so it contains a MBR.

I have no link available, but should be no problem to find it.

Btw, here's a sample how to switch to long-mode from DOS and back: http://www.japheth.de/JWasm/Dos64.html

Logged
redskull
Member
*****
Gender: Male
Posts: 837


It rubs the lotion on its skin...


Re: Starting DOS from USB drive
« Reply #2 on: September 07, 2010, 11:46:59 AM »

If you can find/make a floppy image of a DOS boot disk, you can use a standard hex editor to copy it right to the USB stick, starting at sector 0.  Of course, your BIOS must support legacy USB emulation and booting for it to work.

-r
Logged

Strange women, lying in ponds, distributing swords, is no basis for a system of government
Gunther
Member
*****
Gender: Male
Posts: 184


Assembly Language Dinosaur


Re: Starting DOS from USB drive
« Reply #3 on: September 07, 2010, 12:44:36 PM »

Quote from: redskull September 07, 2010, at 12:46:59 PM
Of course, your BIOS must support legacy USB emulation and booting for it to work.

Yes, my BIOS allows booting from USB drive.

Quote from: japheth September 07, 2010, at 07:53:37 AM
Btw, here's a sample how to switch to long-mode from DOS and back:

 Cool Well done. It seems, that JWasm is a cool tool. Thank you for the hint.

Gunther
Logged

Forgive your enemies, but never forget their names.
daydreamer
Member
*****
Posts: 616


Re: Starting DOS from USB drive
« Reply #4 on: September 07, 2010, 02:24:21 PM »

I dont remember exactly what tool I used to make myself a win98(dos) startdisk copy on usb working, but first it was required to partition the drive to a small startpartition with the right tool it makes it also writes bootsector and you only need to copy some old dos files on it and it starts as A: drive
I did it with my old 128mb flash drive, think I had to make a 2mb partition for it
good luck
Logged
anunitu
Member
*****
Posts: 494


Slack...


Re: Starting DOS from USB drive
« Reply #5 on: September 07, 2010, 03:29:24 PM »

I know that FreeDos has a bootable cd image you can get, and I think they "Might" have something for booting from USB stick,not sure.

There is this.

http://download.cnet.com/DOS-on-USB/3000-2094_4-10795476.html

Also this.

http://genetikayos.livejournal.com/43998.html

Haven't tried this,as my older system won't boot from USB
Logged
TASMUser
New Member
*
Posts: 23


Re: Starting DOS from USB drive
« Reply #6 on: September 08, 2010, 10:29:25 PM »

What you need:
- Any bootable DOS media
- A motherboard with a BIOS which supports "legacy USB" properly (newest BIOSes should do)
- A drive where you can insert the DOS bootable media
- A compatible card reader
- Partitioning software like "Partition Magic" for DOS

How to install the DOS on USB (it is a way I do for almost 20 years):

- Allow "legacy USB support" for all drives in the BIOS
- Put the DOS bootable media in the boot drive
- Switch off the computer
- Insert the card into the cardreader
- plug the cardreader into any USB connector
- Switch on the computer
- Let the computer boot from the DOS bootable media, the computer should recognize all cards
- Partition the card as you wish
- Reboot with same conditions
- Invoke the "sys" command to the USB card
Logged
Gunther
Member
*****
Gender: Male
Posts: 184


Assembly Language Dinosaur


Re: Starting DOS from USB drive
« Reply #7 on: September 08, 2010, 11:26:19 PM »

Okay, thank you guys for your hints. I'll check that out and let you know, if I had success.

Gunther
Logged

Forgive your enemies, but never forget their names.
Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


Re: Starting DOS from USB drive
« Reply #8 on: September 09, 2010, 01:01:00 PM »

Is all kernel loaded at 0x7C0000? I want to load a linux kernel.
Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
Tedd
Procrastinator Extraordinaire
Member
*****
Posts: 2210


Reality Bytes


Re: Starting DOS from USB drive
« Reply #9 on: September 09, 2010, 04:10:41 PM »

BIOS loads the boot program (from the first sector) to 0x7C00 and jumps to it.
Beyond that, depends what the boot program does.

Usually, it's several more stages before the kernel gets loaded properely.
Logged

No snowflake in an avalanche feels responsible.
redskull
Member
*****
Gender: Male
Posts: 837


It rubs the lotion on its skin...


Re: Starting DOS from USB drive
« Reply #10 on: September 09, 2010, 05:01:52 PM »

Does set CS to 7C00 and load it at CS:0000, or keep CS at 0000 and load it to CS:7C00?  I can never remember...

-r
Logged

Strange women, lying in ponds, distributing swords, is no basis for a system of government
FORTRANS
Member
*****
Gender: Male
Posts: 1147


Imagine


Re: Starting DOS from USB drive
« Reply #11 on: September 09, 2010, 05:29:48 PM »

Does set CS to 7C00 and load it at CS:0000, or keep CS at 0000 and load it to CS:7C00?  I can never remember...

Hi,

   It can be either 07C0:0000 or 0000:7C00 depending on
the BIOS in use.  0000:7C00 is more common.

Regards,

Steve N.
Logged
Tedd
Procrastinator Extraordinaire
Member
*****
Posts: 2210


Reality Bytes


Re: Starting DOS from USB drive
« Reply #12 on: September 10, 2010, 01:56:33 PM »

It could technically be any of the many combinations that result in the linear address of 0x7C00, but 07C0:0000 and 0000:7C00 are most common.
The only safe thing to do is start with an immediate far jump to whichever you prefer (plus destination offset) -- 07C0:0000 is nicer because it gives you origin 0.
Logged

No snowflake in an avalanche feels responsible.
Gunther
Member
*****
Gender: Male
Posts: 184


Assembly Language Dinosaur


Re: Starting DOS from USB drive
« Reply #13 on: September 20, 2010, 12:30:57 PM »

Problem solved. DOS starts now from USB drive. If anyone is interested, how to do that, please check out the following link: http://bootdisk.com/pendrive.htm It works.

The only problem is: My mouse isn't supported, because it's an USB mouse. I've to search for a solution.

Gunther
Logged

Forgive your enemies, but never forget their names.
sinsi
Member
*****
Gender: Male
Posts: 1758


RIP Bodie 1999-2011


Re: Starting DOS from USB drive
« Reply #14 on: September 20, 2010, 12:36:32 PM »

There is a settting in the BIOS for legacy USB for the mouse and keyboard, enable it and they should both show up as PS/2 devices.
Logged

Light travels faster than sound, that's why some people seem bright until you hear them.
Pages: [1] 2 Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP The MASM Forum Archive 2004 to 2012 | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!