Fusion

 View Only
  • 1.  Boot MS-DOS 6.22 from SD card macOS host

    Posted Jan 29, 2024 04:48 PM

    Hi, I'm running VMware Fusion 13 Player 13.5 on macOS Sonoma 14.2.1. I've managed to get MS-DOS to boot from a CompactFlash card (in a USB adaptor) with no issues. I'm using a raw VMDK as instructed in this article: https://kb.vmware.com/s/article/2097401 . The CF is partitioned with a single 2 GB partition:

    /dev/disk3 (external, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *4.0 GB     disk3
       1:                 DOS_FAT_16 MS-DOS_6                2.1 GB     disk3s1
                        (free space)                         1.9 GB     -

    However, when I try to do the same with a SD card, I can't seem to get it to boot in the VM. Here's how the SD is partitioned:

    /dev/disk2 (internal, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *4.0 GB     disk2
       1:                 DOS_FAT_16 MS-DOS 6                1.9 GB     disk2s1
       2:                 DOS_FAT_16 PART2                   2.1 GB     disk2s2

    I couldn't get diskutil to format just one partition but two worked using this command:

    diskutil partitionDisk /dev/disk2 2 MBRFormat "MS-DOS FAT16" "PART1" 1860M "MS-DOS FAT16" "PART2" 1860M

    The failure mode is very odd. In both the situation with the CF and the SD card, I'm able to boot the MS-DOS install disk from floppy in the VM, see the partitions in FDISK and reformat the c: drive with no problems. MS-DOS itself installs just fine and asks me to reboot. I take out the virtual floppy and do so.

    With the CF card, I'm immediately booted into MS-DOS. However with the SD, the drive never boots and I'm put into the network boot mode. Setting the startup device to the VMDK doesn't make any difference - the disk is not bootable. I've tried doing a "sys c:" and that doesn't help either. The c: drive is the primary DOS partition so that's not the issue either. Booting with the floppy again, I can see the C: drive with all the correct files including command.com etc. So it's definitely possible to read from the SD, just not boot from it - at least doing what I've done so far.

    I'm stumped. From my understanding, both the SD and CF are USB mass storage devices and therefore should behave exactly the same, right? I've tried using the built-in SD card reader, a USB one and even a CF to SD adaptor in the CF USB adaptor. All result in an unbootable system. 

    Does anyone know how to resolve this? CF cards are clunky and frustratingly hard to plug in so I'd much rather use SD cards.

    Thanks in advance!



  • 2.  RE: Boot MS-DOS 6.22 from SD card macOS host

    Posted Jan 29, 2024 04:50 PM

    Why go through all that effort?  Why not just use a normal virtual disk and have DOS installed and running?



  • 3.  RE: Boot MS-DOS 6.22 from SD card macOS host

    Posted Jan 29, 2024 04:54 PM

    I didn't want to explain the details here but if you're interested, it's because I'm trying to build an installation that can be used on my Amiga A2286 BridgeBoard using XT-IDE. It's so much easier to work inside VMware. I've been using CF cards with XT-IDE and what has happened is that the pins in the XT-IDE are getting damaged with repeated removals and installs. So I thought I'd go to a SD based solution but I am running up against this booting issue.



  • 4.  RE: Boot MS-DOS 6.22 from SD card macOS host

    Posted Jan 29, 2024 06:39 PM

    If you have configured both as a VMware raw disk, I wouldn't think there would be differences from the VMware side of things. I suspect that formatting the SD disk with diskutil is giving you something different than what a native formatting utility would.

    From the Mac, have you tried running fdisk (/usr/sbin/fdisk) on both the CF and SD cards and see what the differences are?

     



  • 5.  RE: Boot MS-DOS 6.22 from SD card macOS host

    Posted Jan 29, 2024 06:48 PM

    There is one difference that I can see here, partition 1 on the SD is missing the asterisk "*" - primary DOS partition? - whereas on the CF it's there. FDISK inside DOS shows the SD as having the primary DOS partition as partition 1 though in both cases.

    I'd like to try and set partition 1 but it's not clear from the /usr/sbin/fdisk commands how to do that, any advice?

    SD:

    Disk: /dev/disk2 geometry: 957/128/63 [7725056 sectors]
    Signature: 0xAA55
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     1: 06 1023 254  63 - 1023 254  63 [      2048 -    3632816] DOS > 32MB  
     2: 06 1023 254  63 - 1023 254  63 [   3635200 -    4089856] DOS > 32MB  
     3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
     4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      

    CF:

    Disk: /dev/disk3 geometry: 968/128/63 [7806960 sectors]
    Signature: 0xAA55
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
    *1: 06    0   1   1 -  260 254  63 [        63 -    4192902] DOS > 32MB  
     2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
     3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
     4: 00    0   0   0 -    0   0   0 [         0 -          0] unused   

    Slightly weird on the CF card is that it's showing as a 4GB partition which it's not, I've only got 2 GB partitioned and formatted under FAT16.

     



  • 6.  RE: Boot MS-DOS 6.22 from SD card macOS host

    Posted Jan 29, 2024 07:21 PM

    From /usr/sbin/fdisk I found that I could mark a partition "active" (which enables the asterisk) as follows:

    fdisk: 1> flag 1

    Partition 1 marked active.

    fdisk:*1> print
    Disk: /dev/disk2 geometry: 957/128/63 [7725056 sectors]
    Offset: 0 Signature: 0xAA55
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
    *1: 06 1023 254  63 - 1023 254  63 [      2048 -    3632816] DOS > 32MB  
     2: 06 1023 254  63 - 1023 254  63 [   3635200 -    4089856] DOS > 32MB  
     3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
     4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
    fdisk:*1> write

    I went back into DOS from the floppy, reformatted and reinstalled. Unfortunately this didn't result in a booting system. I double-checked FDISK inside DOS and it does show c: as the primary DOS partition. So that's not it. 



  • 7.  RE: Boot MS-DOS 6.22 from SD card macOS host
    Best Answer

    Posted Jan 29, 2024 07:51 PM

    Try reformatting the SD card using fdisk's  "auto dos" commnand  - that'll create one big partition out of the entire disk starting (hopefully) at a lower sector address. 

    Or, if the SD card is at least as large as the CF card, wny not use dd to copy the entire CF card (MBR and all) to the CF card:

    example:

    sudo dd if=/dev/disk3 of=/dev/disk4 bs=64K

    Where disk 3 is the CF card and disk4 is the SD card...

     



  • 8.  RE: Boot MS-DOS 6.22 from SD card macOS host

    Posted Jan 29, 2024 09:03 PM

    Doing this via dd worked, which is a useful verification that the SD card is in fact bootable. I'm still going to investigate your other recommendation with another card since I'd rather not have to rely on keeping CF cards around to copy in order to build a new image in the future. 

    I'll post back when I have more info but I'm going to mark this as "correct answer" in the interim to give you the credit. Thanks!