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
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
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
Quote from: redskull September 07, 2010, at 12:46:59 PMOf 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 AMBtw, here's a sample how to switch to long-mode from DOS and back:
:8) Well done. It seems, that JWasm is a cool tool. Thank you for the hint.
Gunther
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
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
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
Okay, thank you guys for your hints. I'll check that out and let you know, if I had success.
Gunther
Is all kernel loaded at 0x7C0000? I want to load a linux kernel.
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.
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
Quote from: redskull 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...
Hi,
It can be either 07C0:0000 or 0000:7C00 depending on
the BIOS in use. 0000:7C00 is more common.
Regards,
Steve N.
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.
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
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.
Quote from: sinsi, September 20, 2010, at 01:36:32 PMThere 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.
Yes, I know. It's enabled and the mouse pointer doesn't react.
Gunther
Hallo japheth,
QuoteBtw, here's a sample how to switch to long-mode from DOS and back: http://www.japheth.de/JWasm/Dos64.html
Btw, the program prints out on my DOS:
Hello 64bit and hangs. There's something wrong.
Gunther
Quote from: Gunther on September 20, 2010, 11:28:22 PM
Btw, the program prints out on my DOS: Hello 64bit and hangs. There's something wrong.
Are you sure it "hangs"? Because, it is supposed to wait in long mode for a key press. ESC will/should return to DOS, 'r' displays some register contents. Keyboard polling is done at the port level, so you'll have to have a standard keyboard - or a USB one in legacy mode - attached.
Quote from: japheth, September 21, 2010, 06:57:21 amAre you sure it "hangs"? Because, it is supposed to wait in long mode for a key press. ESC will/should return to DOS, 'r' displays some register contents. Keyboard polling is done at the port level, so you'll have to have a standard keyboard - or a USB one in legacy mode - attached.
It seems that this is the problem with my old Siemens notebook (BIOS to old). With the newer Toshiba notebook, the application does the job properly.
Gunther