Bootable PC-DOS usb drive
Tags syslinux dos ibmbio
We need a system to run old DOS program. Microsoft's Win98 lacks proper memory management for modem computer with larger amount memory. We have PC-DOS (from IBM) lay around.
Basic setup: Syslinux + floppy image with boot.bss
Need create a empty floppy image on usb drive.(your usb is already fdisk with FAT16 partition, and mkfs.msdos formatted).
dos format this fd0.img and mount it with loop device
make copy IBMBIO.COM IBMDOS.COM and COMMAND.COM into /mnt/floppy (keep the order)
find a floppy boot file on internet or form a bootable floppy disk and drive.
open your text editor, write a syslinux.cfg for fd0.img
save it and sync it, Change out to usb mounting point and
you need 2nd syslinux at your usb drive
Save then and unmount usb
reboot to bios and select your bootable usb hdd or usb key
your A: drive contents are just image under pc-dos can't be altered. But you can modify it under mounted linux directory. Should add proper Autoexec.bat, Config.sys and other utilities file before closing fd0.img.
we test memdisk and chain.c32; memdisk is faster and lean. Although, chain.c32 has pcdos=IBMBIO.COM, but I failed to make it works.
note: PC-DOS doesn't support FAT32, only FAT12/FAT16, if you want to transfer files with your usb drive, create a small FAT16 partition.
note2: if you put SYS.COM in your fd0.img, you can use it to transfer system files of ibm dos to other hard drive, make it boot directly to pc-dos.
Goodluck
Basic setup: Syslinux + floppy image with boot.bss
Need create a empty floppy image on usb drive.(your usb is already fdisk with FAT16 partition, and mkfs.msdos formatted).
Code:
#mount -t msdos /dev/usbpartition# /mnt/usb #cd /mnt/usb #dd bs=512 count=2880 if=/dev/zero of=fd0.img 2880+0 records in 2880+0 records out 1474560 bytes (1.5 MB, 1.4 MiB) copied, 0.00706025 s, 209 MB/s #sync
Code:
#mkfs.msdos fd0.img #losetup -f --show fd0.img /dev/loop0 #mount /dev/loop0 /mnt/floppy
Code:
#mcopy /source/IBMBIO.COM /mnt/floppy #sync #mcopy /source/IBMDOS.COM /mnt/floppy #sync #mcopy /source/COMMAND.COM /mnt/floppy #sync
Code:
#dd if=/dev/fd0 of=boot.bss bs=512 count=1 #mcopy boot.bss /mnt/floppy
Code:
DEFAULT floppy LABEL floppy KERNEL boot.bss APPEND -
Code:
#cd /mnt/usb #syslinux /dev/loop0 #sync #losetup -d /dev/loop0 #umount /mnt/floppy
Code:
#mcopy /usr/share/syslinux/memdisk /mnt/usb #vi syslinux.cfg SAY Welcome PCDOS boot disk DEFAULT floppy TIMEOUT 3 LABEL floppy LINUX memdisk INITRD fd0.img APPEND floppy
Code:
#cd #umount /mnt/usb #syslinux /dev/usbpartition#
your A: drive contents are just image under pc-dos can't be altered. But you can modify it under mounted linux directory. Should add proper Autoexec.bat, Config.sys and other utilities file before closing fd0.img.
we test memdisk and chain.c32; memdisk is faster and lean. Although, chain.c32 has pcdos=IBMBIO.COM, but I failed to make it works.
note: PC-DOS doesn't support FAT32, only FAT12/FAT16, if you want to transfer files with your usb drive, create a small FAT16 partition.
Code:
#fdisk -c=dos /dev/usb #mkfs.msdos -F 16 -f 2 -s 128 -S 512 /dev/usbpartion1
Goodluck
Total Comments 1
Comments
-
Posted 10-09-2016 at 12:02 AM by rkelsen