4

The FreeDos project offers a number of downloads, but all of these contain an installer that tries to install FreeDos from an installation media onto the harddisk. Selecting the mobile stick as installation target is not supported. Since typical USB sticks typically large enough to contain the OS plus applications, writing onto the harddisk is often not intented. Some pages point to tools like Rufus, which can create a bootable FreeDos installation from a template, but this disk is then missing the typical FreeDos components. So how can a complete FreeDos be installed onto a bootable usb stick to create a live USB version with FreeDos?

8

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:

  1. Download the USB “Full” installer from the FreeDOS page.
  2. Unpack the downloaded zip
  3. Use a USB formatting tool (for example rufus) to write the image to USB (take care to write over the right drive)
  4. Move the directory D:\FDSETUP\BIN to D:\BIN
  5. 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
    
  6. 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
    
  7. Delete D:\SETUP.BAT

  8. 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.

  • 1
    this explains how to get a barebones bootable freedos stick (which is great!) but how do add the rest of the tools in FDSetup directory (unzip, ...) to this stick? "the rest" is 99% of the freedos installer payload... – bernstein Jul 14 at 23:00
  • This explains how to put everything from the installer onto a stick, so it includes the tools from the Full Installer package. – Peter B. Jul 30 at 21:19
  • 1
    Peter I think @bernstein is refering to the bonus packages that come with freedoss full (i.e. the packages inside "FDSETUP\PACKAGES" ) which are all zipped up and not setup. Any solution to that in addition to your already great answer? – moo Aug 28 at 18:00
0

I'm pretty sure the OP wants to create a complete LiveUSB install of FreeDOS. This creates a USB flash drive that boots FreeDOS and has all the software installed:

https://www.trishtech.com/2017/07/how-to-create-bootable-live-freedos-usb-drive/

0

Yes, the rufus way works, and so far it's the only way I know to make a FreeDOS USB boot. But it partitions and formats the drive without alignment, which will produce excessive write/erase activity of the flash memory and prematurely wear out the drive. That's not a problem if you're just flashing a BIOS or something, but it is if you will be often updating files.

BTW, if you use the trishtech link, there is a problem installing FreeDOS into VirtualBox, at the "install freedos to hdd" screen. If you just go ahead, you will get rolling "illegal instruction" messages. Workaround: Press Tab, then add " raw" (no quotes) to the boot line, then press Enter.

  • 1
    "But it partitions and formats the drive without alignment" That is simply false. I am the main developer for Rufus and I spent a lot of time ensuring that the partitions are aligned, unless you have a very different definition of what "alignment" means: github.com/pbatard/rufus/blob/master/src/drive.c#L1541-L1548 – Akeo Oct 5 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.