• Please review our updated Terms and Rules here

How to get a system to boot from a compact flash card?

Joined
Sep 6, 2019
Messages
12
I have a Toshiba Tecra 510CDT.

This thing is absolutely perfect for my purpose...playing old games.

I have Debian 3.0 running on it, and I can run Quake 1 using svgalib, without x.org.

I also have a PCMCIA ethernet card and I can ssh with it, surf the internet with w3m, chat on irc, edit files with vim, compile code with gcc, everything I need :) Honestly I could use it as a workstation at work if I wanted.

I can also run lots of old dos games in FreeDOS.

My only problem: my 2 gig spinning disk is starting to die.

I dumped the contents to my modern Linux desktop with dd, and then again to a 16 gig cf card.

However, the system will not boot from the cf card.

The bios is very rudimentary. No place to enter cylinder info, etc, just boot order selection and that's it.

I know for a fact that these systems can use more than 2 gigs in a disk:

http://www.diaspoir.net/blog/mt/2004/01/toshiba_tecra_510cdt.html

I have tried writing my Debian 3.0 image back to the spinning disk with dd, and it boots fine. I have also tried writing the freedos usb installer image to both the spinning disk and the cf. Boots fine with both from the spinning disk, won't boot either with the CF.

I have tried two different CF to 2.5" adapters also.

So...perhaps I can flash my bios with XTIDE? Or perhaps the CF card needs some sort of special initialization? I'm open to try anything here.

The Tecra has a CD-ROM drive but it won't boot from it. I also have a PCMCIA floppy drive for it but it won't boot from that either. So looks like I'm stuck with just dd and a single hard drive here. (Which works for installing Linux and FreeDOS, but only to a spinning disk)

Thank you!
 
Try to boot DOS from a floppy disk with the CF inserted and check the geometry reported by the BIOS (MSD can show it). Then, FDISK a small partition (say, 10 MB) and FORMAT/S from that same system and try to boot. If it boots, you should be able to use Ontrack Disk Manager or some other drive overlay software for the drive.

I have a similar problem with a Toshiba T4600C, where the BIOS does not detect my drive correctly. The Disk Manager allows me to use the complete disk, also with Linux 2.4 (I think the support was removed in later 2.6 kernels).

Also, how does "does not boot" manifest? BIOS does recognize the disk? "Insert system disk and press a key"? "NO ROM BASIC FOUND"?

PS: I just saw that you can't boot from floppy. It should be possible to squeeze a tiny boot sector just showing the geometry into the first sector on disk. Alternatively, try installing the XFDISK boot manager onto the drive - if the menu appears, you have a good chance. Also, it allows booting from floppy, which may work with your PCMCIA drive.
 
advisorability,
Why don't you get a couple of the Hitachi Micro Drives (4GB or 6GB on Ebay) and partition them ths same as your dd image.
Then use dd to write your image to the Microdrive, and see if it boots.

I use them versus the CF cards and have had good luck.

Larry
 
One issue with the Hitachi micro drives is that they come in two flavors--one with the "removable" flag set in the ATA "IDENTIFY" results (bit 7, word 0) and the other as "non-removable". While this doesn't matter for older Windows variants, it starts to matter with XP and later. XP won't install to a removable drive, nor will it allow a paging file to reside on a removable drive. Some workarounds. Maybe not applicable in this case, but it's something to tuck into your bookmarks for later.
 
Try to boot DOS from a floppy disk with the CF inserted and check the geometry reported by the BIOS (MSD can show it). Then, FDISK a small partition (say, 10 MB) and FORMAT/S from that same system and try to boot. If it boots, you should be able to use Ontrack Disk Manager or some other drive overlay software for the drive.

I have a similar problem with a Toshiba T4600C, where the BIOS does not detect my drive correctly. The Disk Manager allows me to use the complete disk, also with Linux 2.4 (I think the support was removed in later 2.6 kernels).

Also, how does "does not boot" manifest? BIOS does recognize the disk? "Insert system disk and press a key"? "NO ROM BASIC FOUND"?

PS: I just saw that you can't boot from floppy. It should be possible to squeeze a tiny boot sector just showing the geometry into the first sector on disk. Alternatively, try installing the XFDISK boot manager onto the drive - if the menu appears, you have a good chance. Also, it allows booting from floppy, which may work with your PCMCIA drive.

Thank you for the help!

Yes, it just says:
"Insert system disk and press a key"

Is it possible to use fdisk or cfdisk from Linux to create that small partition and do a FORMAT/S or similar?

Or perhaps (from my linux desktop) I can create an image file , boot from freedos in virtualbox, partition this image file with dos fdisk, do FORMAT/S, then from my Linux desktop write it to the CF card with dd? Would that work?
 
You didn't give the specs for your CF. Try this on the CF:

1) boot with a system floppy
2) FDISK /MBR
3) FORMAT X /S (where x is your HD)

Question: Does the system see the CF when you boot from the floppy?
 
Yes, it just says:
"Insert system disk and press a key"
That means that the BIOS was able to read and execute the MBR, the MBR successfully loaded the DOS boot code, and the boot code failed to load the system files. Probably due to an invalid geometry.

Is it possible to use fdisk or cfdisk from Linux to create that small partition and do a FORMAT/S or similar?
Yes, but it is probably not worth it.

Or perhaps (from my linux desktop) I can create an image file , boot from freedos in virtualbox, partition this image file with dos fdisk, do FORMAT/S, then from my Linux desktop write it to the CF card with dd? Would that work?
The important thing is that the geometry used in the partition table matches the geometry used in the FAT file system, and it must match the geometry used by the system BIOS on the target machine. Which means that you have to figure out what the BIOS thinks.

If you know what geometry to use, you can easily force some emulators to use that specific geometry (Qemu used to support "-hdachs" for this purpose, but PCem might be better for this nowadays). If you are really desperate, you can try different combinations (the number of cylinders or tracks does not matter, so just iterate the heads between 1 and 16, and the sectors/track between 1 and 63; start with 17 or 34 sectors/track - do not exceed the disk capacity and use e.g. a 10 MB partition). Just use FORMAT/S and copy MSD.EXE to the disk, no other files.
 
I've found that many older systems require CHS addressing to work, which is a problem with flash media because it uses LBA. On systems where you can enter CHS information manually, you can usually fudge the numbers to get close to the capacity of the flash media and it will generally work.

Unfortunately, it may be impossible to make a bootable flash media to replace the main hard drive. You may be able to try something like the PLOP boot loader on a floppy disk in the drive and boot to it and have it load whatever OS you have on the flash memory used as a hard drive.

A possible workaround is some DOM modules (disk on module) have CHS emulation that the BIOS can detect and use, and those generally work. I have a small 256M DOM which has CHS emulation and works fine on even my really old systems.
 
I've found that many older systems require CHS addressing to work, which is a problem with flash media because it uses LBA. On systems where you can enter CHS information manually, you can usually fudge the numbers to get close to the capacity of the flash media and it will generally work.
Generally, IDE devices support some form of CHS (geometry) adressing. LBA was introduced long after CHS, and while it is the better option, compatibility issues somewhat mandate CHS support. So the main issue is figuring out the geometry used by the BIOS - without being able to boot from floppy.

Unfortunately, it may be impossible to make a bootable flash media to replace the main hard drive.
In my understanding, this doesn't seem to be the case here. But that depends on how accurate the error message was written down. :)
 
I've found that many older systems require CHS addressing to work, which is a problem with flash media because it uses LBA.
Oh my, no, just no. Don't worry about that! :) Flash media don't really care of the drive geometry or media type (fixed/removable; that's purely an OS thing).
Just think of the many "Raspberry Pi" images (Raspbian, Risc-OS etc) and other disk images which are assumed to be restored on unknown flash cards. ;)

Compact Flash (CF) in particular was made with embedded and handheld devices in mind from the very beginning.
Even modern CF cards not only supports IDE (ATA), but also the ancient XT-IDE (8-Bit I/O).
And three modes (speaking under correction here); normal I/O, memory-mapped I/O and IDE.

The total memory capacity of a flash medium is the real issue.
If it's to small, an overrun or other strange things could happen.

By the way, back in the day you could use a 286 with a type of hardcoded parameters along with a new HDD.
As long as you used the lowest common denominator, everythjing was fine (as in: not exceeding capacity of the HDD).

Neither the HDD nor the PC really cared about CHS, E-CHS (aka LARGE) or LBA.
Beginning with the ~120 MB ATA drives (roughly), everything was virtual, anyway.
In fact, a few early ATA drives spit out fake CHS values (even fake on label), since the on-board computer was doing translations.

Hardware wise, old PC's (from the 1980s) might be confused by new CF cards, though.
Old AT types PC's (286) have outdated BIOSes which don't like the changes made in ATA-2 spec (different behaviuor of certain registers).
These old BIOSes (pre-1990s) were not even IDE-ware and only supported WD1003 command set used by MFM/RLL drives.
Also, they are not meant to ever see more than ~500 MB. Same is with MSDOS before version 4 or 5 (such as 3.x) - it behaves strange on big disks.
In these cases, a BIOS update, XTIDE Uiversal BIOS or a DDO (Dynamic Disc Overlay) software could help, though.

If you like have a look at these links, maybe they're helpful to you.
S0KILL erases all data, including that on track 0 (normally inaccessible). It uses BIOS int 13h only (no low-level stuff).
IDE-DIAG can help to find out the "real" fake geometry of your CF/SD cards. :)

https://www.vogons.org/viewtopic.php?p=618884#p618884
https://www.vogons.org/viewtopic.php?p=607811#p607811

Drive limits and notes about the FDISK /MBR ancient myths.
https://www.vogons.org/viewtopic.php?p=762350#p762350
 
Last edited:
The dual CF adapters most likely won't work. I've had some luck with the single CF adapters. Don't know why this is true. However, I've had almost zero problems with MSATA to 34 pin IDE adapters and find this is an easier route to go and have given up on CF's in most cases.
 
The total memory capacity of a flash medium is the real issue.

Thank you for the help so far everyone, trying to pick this project back up. I found a second system with IDE (Pentium II) to try and debug what is going on here.

My CF card is 16 gigs SanDisk.

I tried doing an install of FreeDOS directly to the CF card via KVM on my modern workstation. The CF card is then detected by the BIOS on the Pentium II, but it won't boot from it. It says "read error while reading drive".

I then tried doing an install of FreeDOS to a spinning disk via KVM on my modern workstation, and that hard drive was detected by the BIOS on the Pentium II, but same issue, "read error while reading drive". So maybe doing the install via KVM with the disk passing through doesn't work? (Although mounting and inspecting the disks after install, in both cases it looks like they have the expected partitions and files)

So I have one 16 gig CF card and two CF adapters (one 44 pin IDE and one 40 pin IDE, both are single CF slot).

I have no cd rom drive, and for that matter, no burner or blank cds. The Pentium II has USB ports but of course it can't boot from USB. I have a floppy drive for the laptop but as I have no other floppy drives I can't exactly make a boot disk.

I want to just dd a FreeDOS image to CF and use it in the Pentium II, and dd a Linux image to CF and use it in my laptop. I don't want to buy anything else. I'm definitely interested in trying to flash the bios on either the laptop or the Pentium II, if that would help, but I'm guessing that would require a floppy drive.

I was able to dd the FreeDOS installer to a spinning disk and boot from that with the laptop. Would it be possible to create some sort of XTIDE installer image, dd that to a spinning disk, boot from that, install XTIDE to my laptop, dd the original Debian image to a CF card, then hopefully finally boot from that on the laptop? Only problem I can see is XTIDE seems like it's only an addon card, I don't know if it can replace the original BIOS of the laptop.
 
Last edited:
Jeez...this problem is much much harder than I thought it could be.

I found an optical drive and connected that and that alone to the Pentium II. (Also as a note the Pentium II motherboard is SE440BX-2) I then tried to boot from some various old Linux distros, Debian 4 installer, Knoppix, etc.

The optical drive is detected in the BIOS but it refuses to boot. I don't know if it's because the optical drive is too new and somehow isn't compatible with the SE440BX-2? The optical drive in question is a dvd burner. The SE440BX-2 doesn't even attempt to boot from the optical drive. The light comes on during post, but the drive doesn't spin up during boot.

I think floppy drive is pretty much my only way forward here, at least for the Pentium II.

On the laptop side, I found a Toshiba PCMCIA floppy drive, but I don't think it's possible to boot from it. The light doesn't come on during POST or boot.
 
The drive being detected in the BIOS is not a guarantee it is bootable, and the light coming on during POST is likely just power cycling. My Dell Inspiron 3800 has a CD-ROM drive that works perfectly in windows, but the system will not boot from it.

It is possible to boot into Knoppix from CD on these older Toshiba's, but it requires a boot floppy to allow the system to read from the CD-ROM drive.
 
Good news on the laptop side: While trying to dd an image to the 16 gig CF card, I got some IO errors, so it looks like that CF card might be defective. It was brand new when I got it, never used, but oh well. I bought a 4 gig Verbatim CF card, dded the disk image to it, and it boots!
 
Try creating a FreeDOS image on the card with Rufus. It's what I used to install Windows onto my Libretto without resorting to a million floppy disks.
 
Back
Top