drwho,
@drwho@beehaw.org avatar

There has to be a way of getting FreeDOS onto the SD card. Way back when, there used to be ways of getting a floppy disk (and hard drive, I did it a few times) bootable with the SYS command to write the boot files to the right places. That was MS-DOS, though.

Hmm.

This article seems like it could be helpful.. It’s for creating a disk image, not a drive, but the commands should work if you substitute in the SD card you want to use.

Please note that I haven’t actually tried any of this. I’m at work and trying to pull together what scraps of knowledge I still have from my DOS days into something that seems coherent. This might not work, so please treat it as kicking some ideas around over coffee right now!

ms-sys basically does the same thing that format /s and sys a: used to do back in the days of DOS. That makes a drive bootable. So, you’d partition and format your SD card as VFAT or FAT32 from your box (I don’t know if you have a Linux box or a Windows machine, or what). I’m guessing it’d be something like this:


<span style="color:#323232;">sudo fdisk /dev/mmcblk0
</span><span style="color:#323232;">
</span><span style="color:#323232;"># New DOS disk label
</span><span style="color:#323232;">o
</span><span style="color:#323232;">
</span><span style="color:#323232;"># New partition.
</span><span style="color:#323232;">n
</span><span style="color:#323232;">p
</span><span style="color:#323232;">1
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">t
</span><span style="color:#323232;">c
</span><span style="color:#323232;">a
</span><span style="color:#323232;">1
</span><span style="color:#323232;">w
</span>

Format the partition on the SD card:


<span style="color:#323232;">sudo mkfs.vfat -c -v -F32 /dev/mmcblk0p1
</span>

Then use ms-sys to write the MBR to the SD card.


<span style="color:#323232;">sudo ms-sys --mbrdos /dev/mmcblk0p1
</span>

Mount the SD card. Download FreeDOS and uncompress it. I think that would be FD13-FullUSB.zip. There doesn’t seem to be a downloadable archive of “Here’s all the stuff that’s in the disk image,” just the disk image. Some gymnastics do seem to be required to mount it:


<span style="color:#323232;">sudo losetup /dev/loop0 FD13FULL.img
</span><span style="color:#323232;">sudo fdisk -l /dev/loop0
</span><span style="color:#323232;">
</span><span style="color:#323232;">Disk /dev/loop0: 512 MiB, 536870912 bytes, 1048576 sectors
</span><span style="color:#323232;">Units: sectors of 1 * 512 = 512 bytes
</span><span style="color:#323232;">Sector size (logical/physical): 512 bytes / 512 bytes
</span><span style="color:#323232;">I/O size (minimum/optimal): 512 bytes / 512 bytes
</span><span style="color:#323232;">Disklabel type: dos
</span><span style="color:#323232;">Disk identifier: 0x00000000
</span><span style="color:#323232;">
</span><span style="color:#323232;">Device       Boot Start     End Sectors   Size Id Type
</span><span style="color:#323232;">/dev/loop0p1 *       63 1048319 1048257 511.8M  e W95 FAT16 (LBA)
</span>

The gymnastics in question have to do with mounting a partition of the disk image, because you can’t just set up the disk image and manipulate it like a disk device. In this case, it’s calculating where to mount the FreeDOS partition: sector size * first sector == 512 * 63 == 32256


<span style="color:#323232;">sudo losetup -d /dev/loop0
</span><span style="color:#323232;">sudo losetup -o 32256 /dev/loop0 FD13FULL.img
</span><span style="color:#323232;">sudo mount /dev/loop0 /mnt
</span>

From there, it looks like you’ll have to look at /mnt/setup.bat to figure out how to do a manual setup of FreeDOS on the SD card. There is also a /mnt/FDOS-x86/SETUP.BAT file that I think will have to be read through to get the process figured out.

Again, this is all theoretical. I’ve no idea if it’ll work without tinkering with it on real hardware. It’s as close to figuring out how to do a manual installation as I have time for right now.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • retrocomputing@lemmy.sdf.org
  • ngwrru68w68
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • Youngstown
  • everett
  • slotface
  • rosin
  • osvaldo12
  • mdbf
  • kavyap
  • cubers
  • JUstTest
  • modclub
  • normalnudes
  • tester
  • khanakhh
  • Durango
  • ethstaker
  • tacticalgear
  • Leos
  • provamag3
  • anitta
  • cisconetworking
  • megavids
  • lostlight
  • All magazines