Custom FreeDOS disk / memstick / floppy

yes, this is about BIOS/Firmware updates

Have a look at current firmware version on the target machine

dmidecode -t system
dmidecode -t bios

DISK (works)

grab the latest although not maintained 10M disk snapshot

wget http://www.fdos.org/bootdisks/autogen/FDSTD10.zip
unzip FDSTD10.zip
rm -f FDSTD10.pln FDSTD10.vmdk
losetup --find --partscan --show FDSTD10.IMG
mount -o loop /dev/loop2p1 /mnt/
cp -f fw/* /mnt/ #v1.2 overwrite AUTOEXEC.BAT
umount /mnt/

FURTHER REQUIREMENTS

Fetch the latest FreeDOS floppy release as shown in PXE/DOS.

Get MS-SYS up and ready

wget http://prdownloads.sourceforge.net/ms-sys/ms-sys-2.6.0.tar.gz
tar xzf ms-sys-2.6.0.tar.gz
cd ms-sys-2.6.0/
make -j4
make install

Inspect the current situation

ms-sys ../msdos/dos622.img
ms-sys ../msdos/win98sc.img
ms-sys FLOPPY.img
ms-sys FD12LITE.img
ms-sys FD13FLOP.IMG

Get the FreeDOS tree ready

mkdir lala/
mount -o loop FLOPPY.img lala/
#mount -o loop ../msdos/win98sc.img lala/

and when all the hassling is over

umount lala/
rmdir lala/

MEMSTICK (works)

Create a FAT16 MBR partition on the memstick, e.g. +100M wide AND SET IT BOOTABLE

fdisk -c=dos /dev/sdc

o
n
p
1
63 (62?!)
+100M
t
6
a
w

Format it as FAT16,

partprobe /dev/sdc
ll /dev/sdc*
mkfs.fat -F16 /dev/sdc1

Copy the operating system onto it and eventually some needed ROM and flashing executables,

mount /dev/sdc1 /mnt/
cp -R lala/* /mnt/ #yes, there is a folder in there
cp -f fw/* /mnt/ #v1.2 overwrite AUTOEXEC.BAT
ll /mnt/
umount /mnt/

Write the boot-codes using MS-SYS

ms-sys -h
ms-sys --write --force /dev/sdc
ms-sys --fat16free /dev/sdc1

FAT12 custom MSDOS 2.88M floppy (works)

dd if=/dev/zero of=floppy288.img bs=1024 count=2880
mkfs.fat -F 12 floppy288.img 
ms-sys --fat12 --force floppy288.img
mount -o loop floppy288.img /mnt/
cp lala/MSDOS.SYS /mnt/
cp lala/IO.SYS /mnt/
cp lala/COMMAND.COM /mnt/
#cp lala/CONFIG.SYS /mnt
#cp lala/AUTOEXEC.BAT /mnt
umount /mnt

FAT16 custom FreeDOS floppy (fails)

draft

dd if=/dev/zero of=fwstick12.img bs=1M count=10
mkfs.fat -F16 fwstick12.img
mount fwstick12.img /mnt/
ms-sys --fat16free --force fwstick12.img

FAT16 custom FreeDOS harddisk (fails)

draft

dd if=/dev/zero of=fwstick12.img bs=1M count=10
losetup --find --partscan --show fwstick12.img
ll /dev/loop*
mkfs.fat -F16 /dev/loop2p1
mount /dev/loop2p1 /mnt/
...
ms-sys --mbrdos --force /dev/loop2
ms-sys --fat16free --force /dev/loop2p1
losetup -d /dev/loop2

ALTERNATIVE

You can also grap the content out of the Lite version

wget http://www.freedos.org/download/download/FD12LITE.zip
losetup --find --partscan --show FD12LITE.img
ll /dev/loop*
mount /dev/loop3p1 lala/
...
losetup -d /dev/loop3
umount lala/

RESOURCES

ms-sys http://ms-sys.sourceforge.net/

#12 Create an MS-DOS bootable stick https://sourceforge.net/p/ms-sys/support-requests/12/

Bootable DOS USB stick https://wiki.gentoo.org/wiki/Bootable_DOS_USB_stick

FreeDOS environment https://wiki.gentoo.org/wiki/BIOS_Update#FreeDOS_environment

FlashBIOS https://wiki.debian.org/FlashBIOS

FREEDOS Ripcord BootDisk http://www.fdos.org/bootdisks/

Flashing BIOS from Linux https://wiki.archlinux.org/index.php/Flashing_BIOS_from_Linux

Images that are too large for a floppy https://wiki.archlinux.org/index.php/Flashing_BIOS_from_Linux#Images_that_are_too_large_for_a_floppy

How to fix the error ‘missing command interpreter’ https://www.computerhope.com/issues/ch000012.htm

Making a PXE-bootable 10MB or larger DOS image https://superuser.com/questions/438120/making-a-pxe-bootable-10mb-or-larger-dos-image


Nethence | Pub | Lab | Pbraun | SNE Russia | xhtml