VOGONS


Booting 386 from DOM or CF card.

Topic actions

First post, by popcalent

User metadata
Rank Newbie
Rank
Newbie

Hi,

I have a 386 DX-40 with a 520MB hard drive. I wanted to replace it with a disk on module (DOM) as master and a CF card (via adapter) as slave. Both the DOM and the CF are 512MB.

The original 520MB hard drive was configured in the BIOS as type 47 (cyl=1057, head=16, WPcom=65535, LZone=1057, Sec=63) [Picture 1]. I brought the sectors down to 62 to make it 512MB for the DOM/CF [Picture 2]. The IDE cable I was using has only two connectors, one goes to the motherboard and the other to the IDE device, in other words, only one IDE device can be connected. I had the intention to replace it with an IDE cable with three connectors to use both the DOM and the CF, but for now I'm using this cable. I mention this because there's no way I connect the IDE device in the wrong connector, as there is only one possibility.

The computer does not detect the DOM. After the memory check, there's an "FDD/HDD controller failure" message [Pitcure 3]. There's no indication on the DOM as to what is the correct pin orientation, but there are only two options. One option prompts that error message, the other option makes the computer fail altogether (as in it doesn't even show anything on the monitor). I don't know if the DOM is defective, or if I'm doing something wrong... The DOM can be seen connected to the IDE in [Picture 4].

Since I couldn't make anything work with the DOM, I moved to the CF card. I'm using a CF to IDE adapter as the one seen in [Picture 4]. I used the same BIOS configuration I used for the DOM because the CF is also 512MB. When I start the computer, after the memory check there's an error message that says "C: drive error, Press <F1> to RESUME" [Picture 5]. Nevertheless, I can boot from a floppy. I did a "format c: /s" to transfer the system to the CF, and reset the computer without the floppy, I get the"C: Drive Error" message, and the computer gets stuck after showing the system configuration (CPU, Memory, Floppy Drives, Ports, etc). I reset again and booted with the floppy drive and did a "fdisk /mbr" on the c: drive, which is the CF, and still I can't boot from the CF. If I boot from the floppy drive, I can access the CF, and write/read to/from it. I just can't boot from it. What can I do???

Picture 1

The attachment bios1.jpg is no longer available

Picture 2

The attachment bios1.jpg is no longer available

Picture 3

The attachment fddhdderror.jpg is no longer available

Picture 4

The attachment dom.jpg is no longer available

Picture 5

The attachment cdriveerror.jpg is no longer available

Reply 1 of 33, by weedeewee

User metadata
Rank l33t
Rank
l33t

just a guess, Try

C/H/S : 1024 / 16 / 63
if the C: drive error is gone using this, you should be good. if it is still there, you 'll need a different solution.

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 2 of 33, by popcalent

User metadata
Rank Newbie
Rank
Newbie
weedeewee wrote on 2024-05-25, 08:19:

just a guess, Try

C/H/S : 1024 / 16 / 63
if the C: drive error is gone using this, you should be good. if it is still there, you 'll need a different solution.

I tried. That brought down the capacity to 504MB in the BIOS, and the "C: drive error" is still there.

Reply 3 of 33, by Jo22

User metadata
Rank l33t++
Rank
l33t++
popcalent wrote on 2024-05-25, 08:25:
weedeewee wrote on 2024-05-25, 08:19:

just a guess, Try

C/H/S : 1024 / 16 / 63
if the C: drive error is gone using this, you should be good. if it is still there, you 'll need a different solution.

I tried. That brought down the capacity to 504MB in the BIOS, and the "C: drive error" is still there.

Hi! Error means the capacity is being exceeded; had same problem once (C: failure).

The attempted write/read access lies outside the boundaries of the CF card's address space.

The CF card probably has 496 MB or something.

Try 990 Cylinders, 16 Heads, 63 Sectors

Good luck!

PS: If you encojnder trouble installing DOS, try S0KILL or GParted to erase the old partition information.
Maybe it's not needed, though.

Last edited by Jo22 on 2024-05-25, 10:02. Edited 1 time in total.

"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 4 of 33, by wierd_w

User metadata
Rank Oldbie
Rank
Oldbie

have you tried a different ide ribbon?

Reply 5 of 33, by popcalent

User metadata
Rank Newbie
Rank
Newbie
Jo22 wrote on 2024-05-25, 10:00:

Hi! Error means the capacity is being exceeded; had same problem once (C: failure).

The attempted write/read access lies outside the boundaries of the CF card's address space.

When I formatted the CF, ater booting from a floppy disk, I noticed it said it's 488.96MB.

Jo22 wrote on 2024-05-25, 10:00:

The CF card probably has 496 MB or something.
Try 990 Cylinders, 16 Heads, 63 Sectors

I tried that C/H/S, and it brought down the capacity to 488MB. It didn't show that error, but now it says "NO ROM BASIC, SYSTEM HALTED". I even booted again from floppy and did a "fdisk /mbr" on C:, but still, it doesn't work...

Reply 7 of 33, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

Set the HDD to none in the BIOS, boot from a floppy, run whatIDE and write down the numbers it reports so you know exactly what the drive's geometry is instead of guessing. Then set those in the BIOS and start from scratch (fdisk, formatting, etc).
Formatting and/or running fdisk with the wrong parameters set in the BIOS is just setting yourself up for failure.

Last edited by jmarsh on 2024-05-25, 11:02. Edited 1 time in total.

Reply 8 of 33, by Deunan

User metadata
Rank Oldbie
Rank
Oldbie
popcalent wrote on 2024-05-25, 08:13:

I have a 386 DX-40 with a 520MB hard drive. I wanted to replace it with a disk on module (DOM) as master and a CF card (via adapter) as slave. Both the DOM and the CF are 512MB.

This was already mentioned but these early BIOSes can't address cylinders above 1023. Your original HDD was most likely underutilized. And Flash based media that says "512MB" is rarely that big, it's either just an approximation or the multiplier is 1000 and not 1024 (so MB, not MiB).
First of all you should try to connect these to a newer system, preferably something with PCI that has newer BIOS or at least two IDE channels. If you don't have one then the alternative is to boot from floppy and start programs this way. Run something that can detect the IDE via low-level accees (HWiNFO can be used), navigate to the IDE devices windows and write down what the actual C/H/S values for your Flash storage is. It's best to use that for BIOS to avoid any problems.
You should also pay attention to the fixed/removable media flags, and also magnetic or non-magnetic flag. For some reason quite a few BIOSes (and it also somehow depends on the IDE card used as well) of this era will just not work properly with Flash media that says it's non-magnetic and/or removable. It's best to use CF cards that pretend to be a true HDD and appear as magnetic/non-removable.

Reply 9 of 33, by ux-3

User metadata
Rank Oldbie
Rank
Oldbie

Does the bios offer you a HDD detection in the starting screen?

Retro PC warning: The things you own end up owning you.

Reply 10 of 33, by popcalent

User metadata
Rank Newbie
Rank
Newbie
jmarsh wrote on 2024-05-25, 11:00:

Set the HDD to none in the BIOS, boot from a floppy, run whatIDE and write down the numbers it reports so you know exactly what the drive's geometry is instead of guessing. Then set those in the BIOS and start from scratch (fdisk, formatting, etc).
Formatting and/or running fdisk with the wrong parameters set in the BIOS is just setting yourself up for failure.

I get "No fixed disks installed" from whatIDE 🙁

Reply 11 of 33, by wierd_w

User metadata
Rank Oldbie
Rank
Oldbie

I'd hit it with ontrack disk manager with the /x option to avoid loading xbios, or something similar.

(The idea is NOT to install the DDO, but to instead get the detected geometry.)

Alternatively...

Pop the cf card into a windows machine, and get me the exact number of sectors it has, using the system information utility.

https://www.computerhope.com/issues/ch002288.htm

I can compute 'valid' geometry based on total sectors.

Last edited by wierd_w on 2024-05-25, 11:47. Edited 1 time in total.

Reply 12 of 33, by popcalent

User metadata
Rank Newbie
Rank
Newbie
Deunan wrote on 2024-05-25, 11:01:

This was already mentioned but these early BIOSes can't address cylinders above 1023. Your original HDD was most likely underutilized. And Flash based media that says "512MB" is rarely that big, it's either just an approximation or the multiplier is 1000 and not 1024 (so MB, not MiB).

I used C/H/S=990/16/63 as Jo22 suggested and it didn't work.

Deunan wrote on 2024-05-25, 11:01:

First of all you should try to connect these to a newer system, preferably something with PCI that has newer BIOS or at least two IDE channels. If you don't have one then the alternative is to boot from floppy and start programs this way. Run something that can detect the IDE via low-level accees (HWiNFO can be used), navigate to the IDE devices windows and write down what the actual C/H/S values for your Flash storage is. It's best to use that for BIOS to avoid any problems.

All I have is a USB CF reader and a Ubuntu laptop. Is there anything I can do there to figure out the C/H/S parameters?

Deunan wrote on 2024-05-25, 11:01:

You should also pay attention to the fixed/removable media flags, and also magnetic or non-magnetic flag. For some reason quite a few BIOSes (and it also somehow depends on the IDE card used as well) of this era will just not work properly with Flash media that says it's non-magnetic and/or removable. It's best to use CF cards that pretend to be a true HDD and appear as magnetic/non-removable.

I'm not sure what that is... Are those parameters in the BIOS or is this a parameter of the CF card? What is a CF card that pretend to be a true HDD? How do I know before buying a CF?

Reply 14 of 33, by popcalent

User metadata
Rank Newbie
Rank
Newbie
wierd_w wrote on 2024-05-25, 11:39:

I'd hit it with ontrack disk manager with the /x option to avoid loading xbios, or something similar.

(The idea is NOT to install the DDO, but to instead get the detected geometry.)

I'm sorry, what?

Reply 15 of 33, by ux-3

User metadata
Rank Oldbie
Rank
Oldbie

Your machine likely only supports a 504MB partition at most.
Can you just fdisk the CF card, delete all, and create a new partition? Not going over 504 MB or whatever fdisk says.
Then format that.

Last edited by ux-3 on 2024-05-25, 12:00. Edited 1 time in total.

Retro PC warning: The things you own end up owning you.

Reply 16 of 33, by wierd_w

User metadata
Rank Oldbie
Rank
Oldbie
popcalent wrote on 2024-05-25, 11:44:
wierd_w wrote on 2024-05-25, 11:39:

I'd hit it with ontrack disk manager with the /x option to avoid loading xbios, or something similar.

(The idea is NOT to install the DDO, but to instead get the detected geometry.)

I'm sorry, what?

There are 2 bits of vintage software, that are 'DDO' software. (Dynamic Drive Overlay.)

Before XTIDE was a thing, this would have been how you get an 8gb or larger hard drive working on such an old system.

They work, by setting your CMOS settings to the largest valid drive geometry your bios and hard drive supports, installing themselves to the first track of the drive, so that they own the boot sector, then 'take over' the boot process. They copy a special software INT13 handler into RAM, which can handle LBA or ECHS addressing, (and subtract the first track from the reported sectors). This lets FDISK and pals see the full drive capacity (minus one track), without clobbing the software.

One of these is Ontrack Disk Manager, and the other is EZ-Drive.

Both are in the vogons driver library. You'll need an old one for a 386. Newer versions are for pentium systems.

Here is a disk image of ontrack disk manager 9, from vogons.

http://vogonsdrivers.com/getfile.php?fileid=1490&menustate=0

(But you really want version 6 or older, because 386.)

When invoking disk manager from its boot floppy, if you give it the /X argument, it does NOT load the extended translation int13 handler. I'd use it with the /M argument too, for Manual Mode.

You can then pick the 'disk information' option, and see what it detects your drive as.

Its detection routine is independent of the system's cmos settings.

Record the geometry, reboot the computer, run cmos setup, and try those values.

Again, we dont want to actually install the DDO. We just want to abuse its detection routine.

For full, FULL clarity:

Create the DM diskette from the image.

Boot using your DOS boot diskette. (Not the DM diskette)

switch to the DM diskette in the drive.

Start DM with the command line switches.

DM /M /X

Go to the CMOS information/setup option.

Record what the 'translated geometry' is.

Use those values.

Put the DM diskette someplace else. We dont need it anymore.

Reply 17 of 33, by Deunan

User metadata
Rank Oldbie
Rank
Oldbie
popcalent wrote on 2024-05-25, 11:42:

All I have is a USB CF reader and a Ubuntu laptop. Is there anything I can do there to figure out the C/H/S parameters?

Didn't you say this system boots from a floppy even with CF card installed? Or did I misunderstand?
Linux might be of help, but the problem is the card is accessed via USB bus. You can insert it in the reader and check the syslog, it might just record some extra info like CHS, but most likely it'll be using LBA values instead.

Yeah, I just tried that, all I get is:

sd 4:0:0:0: [sdb] 1000944 512-byte logical blocks: (512 MB/489 MiB)

Though perhaps you can try hdparm tool? Here's what I get with "hdparm /dev/sdb":

/dev/sdb:
multcount = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 993/16/63, sectors = 1000944, start = 0
popcalent wrote on 2024-05-25, 11:42:

I'm not sure what that is... Are those parameters in the BIOS or is this a parameter of the CF card? What is a CF card that pretend to be a true HDD? How do I know before buying a CF?

These are also HDD parameters like C/H/S but most programs do not show them, and sadly you can't be ever sure what you are buying will have them set to what you need. It's a lottery in other words, and the odds are not in your favour. Most CF cards I have of the non-magnetic + removable type, and only work with either XTIDE ROM or newer mobos (late 486 with PCI and Pentium). I don't think hdparm shows this info, I couldn't find it in any of the outputs - perhaps the USB link is to blame? I haven't really used any low-level IDE tools in Linux for a long time, so I can't remember any other apps that could help.

Reply 18 of 33, by popcalent

User metadata
Rank Newbie
Rank
Newbie

I was able to use whatIDE (the first few times it didn't detect anything), and it gave me a C/H/S=993/16/63. I entered these values in the BIOS and I was finally able to boot from the CF card.

However, my joy was shortlived as I noticed that, most often than not, the CF gets stuck at the "Starting MSDOS..." message, and I have to keep resetting until it decides to boot...

Reply 19 of 33, by ux-3

User metadata
Rank Oldbie
Rank
Oldbie

I have had a similar problem on one controller and could solve it by changing master and slave on the IDE port.

Retro PC warning: The things you own end up owning you.