VOGONS


First post, by clb

User metadata
Rank Member
Rank
Member

Hi all,

I am setting up an old 386 system, and trying to replace the spinning hard drive with a CF card. I got a DeLock IDE -> CF adapter card with a 4GB Transcend CF card. Attached photos of the hardware.

BIOS recognizes the disk, but setting it to autodetect fails with the following boot errors:

BIOS(66): Hard disk 0 auto initialization error
BIOS(63): Hard disk 0 error, status 04H
BIOS(23): Hard disk init failed
BIOS(4): HardDisk failed

Using the utility http://www.users.on.net/~fzabkar/IDE-identify/ on the same 386 system, it was able to recognize the disk, and it identifies

Cylinders: 7769
Heads: 16
Sectors: 63

I need to shrink the cylinder count a bit, ther largest that BIOS accepts is a C/H/S of 1024/16/63 .

When installing DOS however, I get an Error at the attempt to partition stage:

"Setup cannot install MS-DOS 6.22 on your computer.

A disk error was detected while writing a new boot records to your first hard disk.

Press ENTER to exit Setup."

Running FDISK displays one 3823MB disk, and "Total disk space is 504 Mbytes", according to the CHS settings set in the BIOS I think.

But creating a Primary DOS Partition fails with "No space to create a DOS partition".

Trying a smaller CHS value of e.g. 511/4/17 for a 18MB disk, or some other predefined numbered disk identifiers, I get the same result: DOS SETUP.EXE and FDISK.EXE cannot write a MBR.

1) I wonder if the issue might be that the 4GB CF disk is too large? That was the smallest that I was able to source at the moment from a local retailer, smaller ones seem to be hard to come by. I did order a 128MB CF disk online to try that one instead.

2) Are there known issues with using a DeLock IDE->CF adapter for a bootable MS-DOS IDE disk on a 386?

3) There are three jumpers on the DeLock adapter. Manual is not helpful in documenting them, and I was not able to find any instructions about these. Anyone know what these are for? I wonder if the CF disk might be in a read only mode, or something similar. (Maybe I'll just try out all the 8 permutations if any of them has an effect..)

4) When searching, I stumbled onto the XT-IDE project. Should I be using that instead, or is that hardware rather designed specifically for 8088/8086 systems?

Thanks for any help!

Attachments

  • IMG_1702.jpg
    Filename
    IMG_1702.jpg
    File size
    86.29 KiB
    Views
    493 views
    File license
    Public domain
  • IMG_1701.jpg
    Filename
    IMG_1701.jpg
    File size
    105.65 KiB
    Views
    493 views
    File license
    Public domain

Reply 1 of 7, by clb

User metadata
Rank Member
Rank
Member

Update: Tried flashing FreeDOS image to the disk from https://www.pcengines.ch/freedos.htm

But then at boot, got an error "Invalid or damaged Bootable partition".

However, after that flash, I * was* able to install DOS from floppies, on a primary partition of size 128MB. Although kept getting write errors during installation. Retrying the write operations when prompted so during the install trucked through the write errors. It looks like something is not working out ok with the bus protocol with the DeLock adapter.

Booting after MS-DOS installation would then again give

"Invalid or damaged Bootable partition"

Interestinly, running "FDISK /MBR" did change the boot error message to

"Missing operating system"

Tried doing "FORMAT C: /S", followed by MS-DOS reinstall, though no luck. Also tried just with a "SYS C:", but still "Missing operating system".

Also tried the SanDisk make-bootable tool, no luck with that either.

Probably some other card/adapter combo might be in place.

If you're running a CF card in your setup, product information of the CF card and adapter would be much appreciated!

Reply 2 of 7, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hm, hard to say what's wrong.

The adapter is fine, I've got the same. Please check for shorts, though.
The adapter is wired for DMA, even and comes with an optional voltage converter (5v to 3.3v)..

As for DOS and the CF card.. Well, it depends.

MS-DOS 6.22 can handle HDDs up to 8GB just fine, with 2GB partitions each.

However, it's not LBA aware yet (unlike DOS 7.1). It will use any drive geometry the BIOS reports.
That can be LBA, CHS, E-CHS etc. settings. DOS always thinks the geometry is physical (CHS).

It's likely the BIOS that's the culprit. Unfortunately, I have no idea what version you're using.

The classic limit is 1024 cylinders, 16 heads and 63 sectors, but..
- The way these are entered may varry.

The original, correct way of counting was 0-1023 for cylinders, 0-15 for heads and 1-63 for sectors.
Old CMOS Utilities may expect them to be entered that way.

See Re: 512mb CF card cylinder values ?

If you're unsure, just try! ^^

Good luck!

PS: To be on the safe side, you may want to wipe the hidden "track zero" on your HDD/CF card.
S0kill can do that, for example: Re: IDE to Compact Flash as MS-DOS boot drive.

FDISK /MBR may or may not clear existing data on track 0.
Also, FDISK in DOS 6.22 and DOS 7.x behaves differently in the same case.

"People often recommend the undocumented DOS command FDISK /MBR to solve problems with the MBR.
This command however does not rewrite the entire MBR - it just rewrites the boot code,
the first 446 bytes of the MBR, but leaves the 64-byte partition information alone.
Thus, it won't help when the partition table has problems."

Source: https://www.win.tue.nl/~aeb/partitions/partit … es-2.html#ss2.7

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 3 of 7, by konc

User metadata
Rank l33t
Rank
l33t
clb wrote on 2021-07-14, 12:34:

1) I wonder if the issue might be that the 4GB CF disk is too large?

That's exactly the issue. Also it's not certain that with a CF where the reported geometry is virtual anyway you'll find a working combination by reducing the values within your BIOS' limits
You can of course use the XT-IDE or to immediately get it going install some Dynamic Drive Overlay (DDO) software like EZ-Drive

Reply 4 of 7, by Jo22

User metadata
Rank l33t++
Rank
l33t++

..I'm often using 0.5, 2, 4 and 8GB CF cards with MS-DOS 6.22, though. 😀

Edit: Maybe the BIOS is to blame. One of my old 286 PCs had a Phoenix BIOS that hung when the CF card was connected.
Setting HDD to none in CMOS Setup and using XTIDE Universal BIOS on a network card fixed it.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 5 of 7, by clb

User metadata
Rank Member
Rank
Member
Jo22 wrote on 2021-07-14, 13:55:

It's likely the BIOS that's the culprit. Unfortunately, I have no idea what version you're using.

(copy-pasting from my other thread:) The PC is a "MikroMikko 4 m 326SX" model from a Finnish company "Nokia Data" (some kind of sibling/subsidiary at the time to the big Nokia iiuc). It has a 386 25MHz CPU with 8MB of RAM.

The BIOS is from International Computers Limited (ICL) with

BIOS version: 2.21
BIOS date: 92-05-20
KBC version: 1.5

Jo22 wrote on 2021-07-14, 13:55:
y2k compliancy of old BIOSes, RTC, MS-DOS and other software? […]
Show full quote

y2k compliancy of old BIOSes, RTC, MS-DOS and other software?

The original, correct way of counting was 0-1023 for cylinders, 0-15 for heads and 1-63 for sectors.
Old CMOS Utilities may expect them to be entered that way.

See Re: 512mb CF card cylinder values ?

Jo22 wrote on 2021-07-14, 13:55:

PS: To be on the safe side, you may want to wipe the hidden "track zero" on your HDD/CF card.
S0kill can do that, for example: Re: IDE to Compact Flash as MS-DOS boot drive.

Did both of these, and IT WORKED! Not sure which did the trick. Maybe what happened is that using S0KILL indirectly prompted DOS installation to ask to write a new partition table to the system. After having cleared sector 0 with that tool and re-entering DOS setup, I got a different dialog in DOS setup asking to create a new partition table. I had only tried "FDISK /MBR" before, but did not actually try to delete and recreate the partitions using the GUI after having flashed the FreeDOS image onto the card. (I thought that the flash having created a single 128MB partition would have been ok, and that FDISK /MBR would do the rest)

Or maybe I did really have to S0KILL the sector 0 - not sure.

In any case, thanks for the help! Super happy now 😀 Now I am seeing a 528MB partition. Not sure about the 504MB size actually - setting CHS of 1023/15/63 would result in a 480MB disk, and setting CHS of 1024/16/63 gives this 528MB. I can't seem to find a value combo that would have BIOS report 504MB (if that's supposed to be a theoretical maximum of sorts?). If I try to set 1025 sectors, BIOS loudly beeps and rejects - but it did accept 1024, so I presume that it is fine to accept it, and is thinking in terms of 1-1024. Likewise for Heads it beeps if setting 17 heads, and 16 is accepted. So there is some validation for 16 being the max.

Ended up using 1024/16/63 with that 528MB as a single Primary Partition, and got DOS installed and booting off of it.

Though one thing worries me - I do get intermittent write errors on the disk, in the form of "disk not ready" errors. Always repeating the write gets past the error. I wonder if that might be something that can be fixed somehow?

Jo22, you mention you have the same IDE->CF adapter. Do you see the similar intermittent write errors happen? I think that should not be due to a wrong CHS config at least, because the error always goes away when repeating the same write operation. (I vaguely recall LGR video with this kind of intermittent write error being mentioned)

Thanks konc also for the help. I think I'll switch to a smaller CF card once that arrives since I ordered one already - this is wasting 3.5GB of the 4GB card, so might put it to use somewhere else.

Reply 6 of 7, by dormcat

User metadata
Rank Oldbie
Rank
Oldbie
clb wrote on 2021-07-14, 12:34:

Running FDISK displays one 3823MB disk, and "Total disk space is 504 Mbytes", according to the CHS settings set in the BIOS I think.

I'd guess that's the famous 504 MiB / 528 MB barrier caused by the older BIOS; check this page for more detailed info: Hard Drive Size Limitations and Barriers, In Depth

Try to look for smaller CF/SD cards. The attached photo contains my sub-GB memory cards collection reserved for pre-Pentium retro builds; the 512MB Kingston SD card was from my first digital camera, while all other cards were found in a local electronic junkyard recycling center. IMHO 512MB should be more than enough for a 386 build.

IMG_20210714_234029.jpg
Filename
IMG_20210714_234029.jpg
File size
1.25 MiB
Views
426 views
File license
CC-BY-4.0

EDIT: Spend too much time typing; glad to see the problem has been solved.

clb wrote on 2021-07-14, 12:34:

Not sure about the 504MB size actually

Technically that was MiB (1024768 bytes) instead of MB (1000000 bytes).

Last edited by dormcat on 2021-07-22, 19:39. Edited 1 time in total.

Reply 7 of 7, by konc

User metadata
Rank l33t
Rank
l33t
clb wrote on 2021-07-14, 15:22:

I think I'll switch to a smaller CF card once that arrives since I ordered one already - this is wasting 3.5GB of the 4GB card, so might put it to use somewhere else.

Just to make sure it's clear, you will be able to make use of the full capacity of the card using DDO or XT-IDE. If you don't apply any tricks to circumvent BIOS limitiations then yes, you're stuck with 500MB