How to install FreeDos onto a usb stick?
Unfortunately the current information on the FreeDOS Wiki is not up to date, but with the help from FreeDos Developer Jim Hall I could find the solution:
- Download the USB “Full” installer from the FreeDOS page.
- Unpack the downloaded zip
- Use a USB formatting tool (for example rufus) to write the image to USB (take care to write over the right drive)
- Move the directory D:\FDSETUP\BIN to D:\BIN
Edit first and last two lines in D:\FDCONFIG.SYS as follows
!COUNTRY=001,858:\BIN\COUNTRY.SYS !LASTDRIVE=Z !BUFFERS=20 !FILES=40 DOS=HIGH DOS=UMB DOSDATA=UMB DEVICE=\BIN\HIMEMX.EXE SHELLHIGH=COMMAND.COM \BIN /E:2048 /P=\AUTOEXEC.BAT
Edit D:\AUTOEXEC.BAT as follows (Windows will hide this file, but you can open it by directly giving the filename). Only the line setting the DOSDIR needs to be changed and some display code at the end of AUTOEXEC.BAT are to be removed
@echo off SET DOSDIR= SET LANG= SET PATH=%dosdir%\BIN SET DIRCMD=/P /OGN /Y rem SET TEMP=%dosdir%\TEMP rem SET TMP=%TEMP% rem SET NLSPATH=%dosdir%\NLS rem SET HELPPATH=%dosdir%\HELP rem SET BLASTER=A220 I5 D1 H5 P330 rem SET COPYCMD=/-Y DEVLOAD /H /Q %dosdir%\BIN\UDVD2.SYS /D:FDCD0001 SHSUCDX /QQ /D3 rem SHSUCDHD /QQ /F:FDBOOTCD.ISO FDAPM APMDOS rem SHARE rem NLSFUNC %dosdir%\BIN\COUNTRY.SYS rem DISPLAY CON=(EGA),858,2) rem MODE CON CP PREP=((858) %dosdir%\CPI\EGA.CPX) rem KEYB US,858,%dosdir%\bin\keyboard.sys rem CHCP 858 rem PCNTPK INT=0x60 rem DHCP rem MOUSE rem DEVLOAD /H /Q %dosdir%\BIN\UIDE.SYS /H /D:FDCD0001 /S5 SHSUCDX /QQ /~ /D:?SHSU-CDR,D /D:?SHSU-CDH,D /D:?FDCD0001,D /D:?FDCD0002,D /D:?FDCD0003,D rem MEM /C /N SHSUCDX /D rem DOSLFN rem LBACACHE.COM buf 20 flop SET AUTOFILE=%0 SET CFGFILE=\FDCONFIG.SYS alias reboot=fdapm warmboot alias reset=fdisk /reboot alias halt=fdapm poweroff alias shutdown=fdapm poweroff rem alias cfg=edit %cfgfile% rem alias auto=edit %0 vecho /p Done processing startup files /fCyan FDCONFIG.SYS /a7 and /fCyan AUTOEXEC.BAT /a7/p
Delete D:\SETUP.BAT
- Done, safe your files and safely remove the USB stick
Boot and test
The USB key now boots directly into FreeDOS and loads into high memory, leaving roughly 600KB of common memory for programs.