boot_freedos_from_memdisk

apt install nasm makebootfat
 
dd if=/dev/zero of=freedos.img bs=1M count=10
 
wget http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/base/kernel.zip
unzip kernel.zip
 
wget http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/base/command.zip
unzip command.zip
 
mkdir root
cp BIN/KERNL386.SYS root/KERNEL.SYS
cp BIN/COMMAND.COM root/COMMAND.COM
touch root/FDCONFIG.SYS
touch root/AUTOEXEC.BAT
 
nasm -dISFAT12 SOURCE/KERNEL/BOOT/BOOT.ASM -l$*.lst -ofat12com.bin
nasm -dISFAT16 SOURCE/KERNEL/BOOT/BOOT.ASM -l$*.lst -ofat16com.bin
nasm SOURCE/KERNEL/BOOT/BOOT32.ASM -l$*.lst -ofat32chs.bin
nasm SOURCE/KERNEL/BOOT/BOOT32LB.ASM -l$*.lst -ofat32lba.bin
 
makebootfat -o freedos.img -E255 -1 fat12com.bin -2 fat16com.bin -3 fat32lba.bin -m /usr/lib/makebootfat/mbrfat.bin -D root/
parted freedos.img -- set 1 lba on

qemu-system-i386 -hda freedos.img

  • boot_freedos_from_memdisk.txt
  • Last modified: 2017/12/11 23:24
  • by harm