dd if=/dev/zero of=freedos.img bs=1M count=30 parted freedos.img (parted) mklabel msdos (parted) mkpart primary fat16 2048s 100% (parted) set 1 boot on (parted) quit sudo kpartx -av freedos.img # take note of the loopback device mkfs.msdos -F 16 -n FREEDOS /dev/mapper/loop0p1 # add syslinux bootloader syslinux -i /dev/mapper/loop0p1 # mount it mkdir /media/freedso && mount /dev/mapper/loop0p1 /media/freedos # add syslinux loader and config cp cp /usr/lib/syslinux/bios/{chain.c32,ldlinux.c32,libcom32.c32,libutil.c32} /media/freedos # get a freedos image wget http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/fdboot.img # loopmount so we can copys stuff mkdir /media/source && mount fdboot.img /media/source cp /media/source/{command.com,kernel.sys} /media/freedos/ # add a config.sys (it's C for a memdisk) echo 'SHELL=C:\COMMAND.COM' > /media/freedos/config.sys # add a syslinux.cfg default fdos prompt 1 timeout 3 label fdos menu label fdos com32 chain.c32 append freedos=/kernel.sys
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
bz2 | FreeDOS-1.1-memstick-3-30M.img.bz2 | manage | 3 MB | 23 Feb 2015 - 08:37 | ChristophHandel |