• Please review our updated Terms and Rules here

5150 Compact flash formatting

Blaze8088

New Member
Joined
May 19, 2021
Messages
6
Hi everyone, I have an IDE/CF adapter for my 5150 and I along with my cousin have been trying to format it in some way to get it to boot, to limited to no success. I was wondering if anyone knew how we could put DOS onto the CF card and get it to boot. We've tried formatting the CF card with MS-DOS 3.31 in a VM and installing to it, which installs and boots under the VM, however in the 5150 it says "Missing operating system" after correctly detecting the card and attempting to boot from it.
I ran:

format c: /s
md c:\dos
copy a:\ c:\dos
copy a:\command.com c:\

and this boots correctly under the VM.

We have also attempted to low-level format the card in the VM like here:http://minuszerodegrees.net/ibm_xebec/ibm_xebec_llf_debug.htm but same problem.

What are we missing here? Not sure what the usual steps to do this is, and we do not have access to floppies to try booting from one and installing that way.

The card is a ToshibaTHNCF256MMA, in the IBM 5150 with 256KB RAM, Monotech XT-IDE Deluxe with CF adapter, floppy controller with two 5.25" drives, and a clone Hercules for MDA graphics output to a 5151.
 
I'd try doing all steps from the 5150. Boot off floppy with a later version of DOS, anything 5.0 and up. Delete any partitions with FDISK then erase the cards master boot record (C:\Fdisk /MBR). Reboot then FDISK to create/set active a new partition. Finally, reboot then format with system.
 
I sell LOTS of pre-configured CF cards on eBay. I created a diskette that prepares CF cards that work in 99.9% of PC to 386 era computers. Here is a link to it:

www.kc8eyt.com/downloads/repair/cfprep5.IMA

Boot from the diskette and just sit back. It works in three steps:

1 - WIPEDISK wipes all contents of the CF card and then a reboot is performed
2 - FDISK is used to create an active primary partition then a reboot is performed
3 - FORMAT is used to format the CF card and copy the system files to make the card bootable

The diskette is fully automated and takes a few minutes to get the job done. I also use the Monotech controller with this diskette so I'm very confident this will work for you.

Don't forget to tell your XTIDE controller to boot from the A: drive after each reboot (press A on keyboard).
 
I'd try doing all steps from the 5150. Boot off floppy with a later version of DOS, anything 5.0 and up. Delete any partitions with FDISK then erase the cards master boot record (C:\Fdisk /MBR). Reboot then FDISK to create/set active a new partition. Finally, reboot then format with system.

well, we said we don't have a floppy so that cannot work
 
I sell LOTS of pre-configured CF cards on eBay. I created a diskette that prepares CF cards that work in 99.9% of PC to 386 era computers. Here is a link to it:

www.kc8eyt.com/downloads/repair/cfprep5.IMA

Boot from the diskette and just sit back. It works in three steps:

1 - WIPEDISK wipes all contents of the CF card and then a reboot is performed
2 - FDISK is used to create an active primary partition then a reboot is performed
3 - FORMAT is used to format the CF card and copy the system files to make the card bootable

The diskette is fully automated and takes a few minutes to get the job done. I also use the Monotech controller with this diskette so I'm very confident this will work for you.

Don't forget to tell your XTIDE controller to boot from the A: drive after each reboot (press A on keyboard).

Cool program, thanks for that. I ran it in the VM and it works all good there but again cannot boot from the CF on the actual hardware. If we had floppies I'd try to install it within the actual 5150 but don't have access to them. Also I had assumed with 256K RAM we'd be limited to older versions of DOS but maybe not.
 
VM.png
Here is DOS running of the CF in the VM and attempting to boot on 5150.
 

Attachments

  • VM.png
    VM.png
    47.7 KB · Views: 5
  • VM.png
    VM.png
    47.7 KB · Views: 5
. . . there but again cannot boot from the CF on the actual hardware..

I don't want to hijack this thread but just this note: Time and time again folks have come across this problem with attempting to get CF cards to boot. I have a suggestion in that many users are having to resort to the CF approach; maybe the forum could use an area with a library of fixes for the CF where successful booting procedures could be collected in one place.
 
The process I had to do to get out of the same trap.

Figure out what the XT is seeing for cylinders/heads/sectors. This involves somehow booting the machine enough to get that info. In my case I could get a CF to kind of boot, but not reliably.

Create a virtual drive in your emulator of choice using the same CHS geometry

Prepare the virtual machine drive however you want, dos, games, utilities.

Export that virtual drive to a disk image

Write the disk image back to your CF card.

Boot and enjoy.

I have since found it MUCH easier to keep a spare gotek around where I can load up a 6.22 disk, fdisk my heart out, get the machine running and then put the gotek back in the closet for the next machine.
 
Cool program, thanks for that. I ran it in the VM and it works all good there but again cannot boot from the CF on the actual hardware. If we had floppies I'd try to install it within the actual 5150 but don't have access to them. Also I had assumed with 256K RAM we'd be limited to older versions of DOS but maybe not.

You need to run the diskette on the actual iron. Doing this from a VM is causing you issues.
 
The process I had to do to get out of the same trap.

Figure out what the XT is seeing for cylinders/heads/sectors. This involves somehow booting the machine enough to get that info. In my case I could get a CF to kind of boot, but not reliably.

Create a virtual drive in your emulator of choice using the same CHS geometry

Prepare the virtual machine drive however you want, dos, games, utilities.

Export that virtual drive to a disk image

Write the disk image back to your CF card.

Boot and enjoy.

I have since found it MUCH easier to keep a spare gotek around where I can load up a 6.22 disk, fdisk my heart out, get the machine running and then put the gotek back in the closet for the next machine.

Hmm, do you remember how you got it to boot unreliably? Was thinking about those gotek's but don't have one. What kc8eyt is saying seems true, just was hoping we could find a way around that.
 
I played around with CHS geometry making educated guesses and finally got close enough that the machine was able to boot and run a utility to report the CHS. I couldn't edit autoexec.bat or reboot the machine 3 times before it wouldn't boot anymore.
 
Hmm, do you remember how you got it to boot unreliably? Was thinking about those gotek's but don't have one. What kc8eyt is saying seems true, just was hoping we could find a way around that.

Which VM are you using? I've had some success using PCEM but even then it was spotty. PCEM seemed to work with a few of the Tandy models I had but I never tried the 5150 built into PCEM.
 
Which VM are you using? I've had some success using PCEM but even then it was spotty. PCEM seemed to work with a few of the Tandy models I had but I never tried the 5150 built into PCEM.

QEMU/KVM from libvirt under Manjaro Linux, probably a weird choice, but I already knew how to pass the CF as an HDD under it and wasn't sure how to do that when we tried PCEM. I suppose our next steps will be to figure out how to get this CHS geometry right, and maybe try to use Virtualbox some. Thanks for your advice here, everyone.
 
If you would like to install DOS without a VM then you could try Serdrive. I like to use Serdrive for single disk versions of DOS when a floppy is not available. Serdrive is usually included the Xtide Bios v2.0 bundle.

To install dos using serdrive you would need a:

-Windows machine with serial port (or usb to rs-232)
-XT-Ide machine with serial port
-Null Modem cable
-Dos Floppy image
-Clean CF card

With the two computers connected via null modem cable you simply run serdrive [diskimage name] from the command line on the windows pc, then start the 5150 and tap F6 after POST. It will take awhile, but eventually it will boot dos from the serial drive. If you have a Clean CF with a clean MBR then you should be able to follow the normal procedure to create a bootable "c:" CF card.
 
QEMU/KVM from libvirt under Manjaro Linux, probably a weird choice, but I already knew how to pass the CF as an HDD under it and wasn't sure how to do that when we tried PCEM.

I would swear that I was able to do this using QEMU on a MacOS machine, IE, creating a bootable disk image from complete scratch. It was months ago so my memory is a tad sketchy but I think the one thing that may have differed from your procedure is I didn't try mapping the media (in my case an SD card because I'm using an SD->IDE adapter) directly to QEMU but instead made a "raw format" disk image file roughly the size of the SD and then dd-ing it to the SD after I'd done all the needful in the VM. (IE, booting from a floppy image, FDISK-ing, format /s-ing, etc.) I probably have a spare SD card lying around, I guess I could try re-doing it and make sure I'm not forgetting having to boot from the gotek to do the initial partitioning or whatever.
 
You know what would make this whole process easier? If we just patched XT-IDE BIOS to print out the damned geometry that it detects, so we have a hope in heck of faking it. :)

Who is the XT-IDE maintainer these days? I can submit a patch for it to print out CHS at boot, and then it's super trivial at that point to craft up the partition table to populate to make it boot. I used to have to do this back in the day when it came to LILO (linux bootloader) and various BIOSes idea of LBA versus CHS addressing modes..
 
Media, but I don't want to have to use floppies as a crutch.

ok, so as I just posted about - the problem here is that you don't know the geometry that XT-IDE is detecting the flash drive as, so you can't easily craft up a suitable partition table layout that DOS is happy with in order for all the boot stages to be happy.

The trick is knowing the geometry in advance.

Now, the UNFUN part of this is that sometimes the BIOS will quite happily use a /different/ geometry than what the CF card reports - it could speak LBA to the drive, and decide upon its /own/ CHS layout for MS-DOS and legacy boot applications. This quite frequently tripped up things in yesteryear. In fact, I re-discovered (and then remembered!) this when I installed a CF adapter in my 386 here rather than a whole XT-IDE setup - the geometry that the BIOS detects the drive as? Is not the same that's listed for that drive in the datasheet. Either the drive lied, or the data sheet is wrong, or the BIOS is recent enough to know about LBA and is making it "easier" for DOS to use the larger disk.

In any case, the solution is to either know the precise geometry being presented by the drive -> XT-IDE (or general BIOS) -> BIOS -> MS-DOS boot blocks, and then craft up a suitable partition table in a virtual machine or other setup to match said geometry, OR you boot DOS on the drive yourself.

Also note - MS-DOS 3.1 doesn't know about the DOS 6.2 FAT16 partition table, and it won't let you delete unknown drives. So, I ended up having to boot a DOS-6.22 boot disk on 360k media with fdisk to delete the partition, then boot MS-DOS 3.1 from a second/third 360k disk to partition and install the OS.

With all that said - if you're in the bay area, I'm happy to provide you boot media to work around this nonsense. It really will be easier doing this on the 5150 itself rather than trying to guess drive geometry. :)
 
Back
Top