• Please review our updated Terms and Rules here

FDISK "Divide Overflow" on 256MB CF Card

djfitzgerald

Experienced Member
Joined
Dec 28, 2018
Messages
73
Location
Western New England
I've recently purchased and assembled an XT-IDE rev. 4 board, and am trying to use it in my 5155 (IBM PC Portable). This is my first attempt at soldering anything, so I'm not convinced that all my connections are the best, but the 5155 did boot with the card in it, and I did get to the XT-IDE Universal BIOS:

IMG_20190104_182957.jpg

It doesn't find a boot sector on the device, even after I have used install-mbr on Linux to create a DOS MBR, and prepped the card with a VM to include 3.31. I'm not surprised by this, as the comments on the "Modern Classic" XT-IDE walkthrough on YouTube suggested that the way to get the CF card to work was to prep it from the target PC itself.

IMG_20190104_183017.jpg

As far as physical disks go, I only own a set of PC-DOS 3.20 floppies, so I boot into DOS from the floppy and then attempt to use FDISK to prepare the device. This is where things go belly-up.

IMG_20190104_183029.jpg

I issue FDISK without any arguments, and before even getting the FDISK menu I get a "Divide Overflow" error:

IMG_20190104_183058.jpg


I have no idea why I shouldn't be able to prep the CF card from a virtual machine, and even less of an idea of why I can't run FDISK on it. Any pointers or help that folks could give me would be greatly appreciated.

Video of the PC Portable booting into the XT-IDE BIOS with a different CF card in the drive: https://scitech.video/videos/watch/aec2617e-cd49-476c-b308-35774af62e68
 
Since you are handy with Linux, zero out the entire card with dd

sudo dd if=/dev/zero of=/dev/sdb bs=1M

Then try again. Replace sdb with the device address of the CF card and unmount it first.
 
Since you are handy with Linux, zero out the entire card with dd

sudo dd if=/dev/zero of=/dev/sdb bs=1M

Then try again. Replace sdb with the device address of the CF card and unmount it first.

No dice. I used dd with a 512b blocksize to zero the entire CF card, then I used install-mbr to build a boot sector, then a basic DOS 3.31 PC image in VirtualBox to FDISK the drive and install the system software to it with FORMAT /S and SELECT C: 001 US. I stuck the card in the 5155 and got the boot sector error, then booted with the PC-DOS 3.20 floppy and tried to FDISK it and got "Divide Overflow" again :-(
 
I'd suggest blanking it with dd, then moving it directly to the PC, booting from floppy and running fdisk then format from there.
 
I suspect most of the problem is DOS 3.20 - 256MB is probably too large for it to deal with. 3.20 only supports 32MB maximum partition sizes although you should be able to have several partitions.

install-mbr? No, you don't need to do that. Just set up an emulator or VM with a raw (uncompressed, no header) disk volume exactly the same size as the CF card. Then when everything is set up to your liking, just "dd" it to the CF device. You will need to make sure both your 5155 and emulated environment have the exact same CHS geometry values.

You will want at least DOS 3.30 but that also only supports 32mb partitions maximum. As you noticed, DOS 3.31 should work excellently for this size CF as it supports partitions up to 512mb.
 
I suspect most of the problem is DOS 3.20 - 256MB is probably too large for it to deal with. 3.20 only supports 32MB maximum partition sizes although you should be able to have several partitions.

install-mbr? No, you don't need to do that. Just set up an emulator or VM with a raw (uncompressed, no header) disk volume exactly the same size as the CF card. Then when everything is set up to your liking, just "dd" it to the CF device. You will need to make sure both your 5155 and emulated environment have the exact same CHS geometry values.

You will want at least DOS 3.30 but that also only supports 32mb partitions maximum. As you noticed, DOS 3.31 should work excellently for this size CF as it supports partitions up to 512mb.

What I'll try next is seeing if I can use fdisk on it from a VM running DOS 3.20. I think I tried that in the past and it worked, which would confuse me because if the problem is fdisk then it should be a problem whether run from the VM or run from the actual 5155.
 
What I'll try next is seeing if I can use fdisk on it from a VM running DOS 3.20. I think I tried that in the past and it worked, which would confuse me because if the problem is fdisk then it should be a problem whether run from the VM or run from the actual 5155.

Okay, so I did this yesterday, and FDISK worked fine on the CF card from a VirtualBox image (I have VirtualBox running on Linux, and configured so that the block device at /dev/sdb/ is passed through to a *.VMDK file that is mounted as a disk image for an IDE device). Not only that, but I can actually boot my VM from the CF card, using it as an IDE disk.

I'm wondering if my soldering of one or more of the IDE connector's 40 pins is bad, or if my CF reader is borked. I know that with XT-IDE offline, I can run FDISK on the PC and have it yell at me that there are no fixed disks, which is good.

One other thing I am concerned about. If you look at the images in my first post to the thread, you will see that my CF card capacity is listed as 8064.0 MiB / 0.4 kiB. Thats not accurate, as its a 256MB CF card. I tried with a 2GB CF card and got the same capacity listed. I'm assuming that the listed capacity of "8064.0 MiB / 0.4 kiB" is the maximum that the XT-IDE BIOS can recognize, but am wondering if the fact that its not listing my actual CF card capacity is a sign of a problem.
 
Another data point: Remember that SD card I prepared with a virtual machine to boot into DOS 3.30? I plugged it into an old ThinkPad X41 and turned the laptop on... the machine booted into DOS 3.30 from the CF card. So I think this whole "No boot sector found" business from XT-IDE is bunk.
 
Try upgrading to a newer revision of the XUB that uses the new drive translation code, Try r591, The 'No boot sector found' error is likely because you are not configuring the CF on the 5155 with the 1.1.5 XUB, Using another computer to configure the CF for the 5155 that is running 1.1.5 XUB is asking for trouble.
 
So, I'm beginning to think it was my soldering.
I spent two hours last night re-soldering a bunch of the pins on the XT-IDE's IDE connector, and then I was able to read and write to the CF card. But I can't boot from it. And it will randomly stop working (maybe I need some more re-soldering?). I'll need to figure out how to upgrade the XT-IDE BIOS to the latest version (I'm running 1.1.5, very old) and try again. I probably still have some connections to double check and re-solder The pins on the IDE connector are a pain. 40 of them, and so dang close together.
 
Try upgrading to a newer revision of the XUB that uses the new drive translation code, Try r591, The 'No boot sector found' error is likely because you are not configuring the CF on the 5155 with the 1.1.5 XUB, Using another computer to configure the CF for the 5155 that is running 1.1.5 XUB is asking for trouble.

Their website seems to be down. I posted a message to the XTIDE Universal BIOS thread, hopefully it will help me get some relief.
 
I posted r591 with bootmenu a while back, give that a try, You must use XTIDECFG.COM to configure the bios first and then flash to eeprom. Depending on how you have the card jumpered ie: for compatability mode set device type option to "XTIDE rev1" or for Hi Speed mode set device type option to "XTIDE rev2 or modded rev1". I'd recommend using Hi-Speed mode. See post #321 http://www.vcfed.org/forum/showthre...versal-BIOS-v2-0-0-beta-testing-thread/page33
 
I posted r591 with bootmenu a while back, give that a try, You must use XTIDECFG.COM to configure the bios first and then flash to eeprom. Depending on how you have the card jumpered ie: for compatability mode set device type option to "XTIDE rev1" or for Hi Speed mode set device type option to "XTIDE rev2 or modded rev1". I'd recommend using Hi-Speed mode. See post #321 http://www.vcfed.org/forum/showthre...versal-BIOS-v2-0-0-beta-testing-thread/page33

Aaaaand now I appear to have hosed my XTIDE BIOS with a bad setting (setting the BIOS display to large size monochrome borked it). Any ideas how I can fix this? It won't boot from a disk so I can get to the program to flash it :-/
 
Disable the ROM with the jumper or switch, depending on the version, boot the machine, enable the ROM and execute the flash utility.
 
Aaaaand now I appear to have hosed my XTIDE BIOS with a bad setting (setting the BIOS display to large size monochrome borked it). Any ideas how I can fix this? It won't boot from a disk so I can get to the program to flash it :-/
Disable the eeprom on the r4 card, SW2 and turn the ENA switch to off, Boot the computer with a floppy and turn the ENA switch to on and reflash

Edit: James beat me to it :)
 
Disable the eeprom on the r4 card, SW2 and turn the ENA switch to off, Boot the computer with a floppy and turn the ENA switch to on and reflash

Edit: James beat me to it :)

I'm having that sinking feelling I left the flash program on the CF card... *groans* I'll try anyway
 
I'm having that sinking feelling I left the flash program on the CF card... *groans* I'll try anyway

Well, that got it to boot around the card, but now I am kicking myself really, really, really hard for not copying the flashing software off of the CF card. The only way for me to get stuff onto the PC at the moment is through the floppy drives :-(

Edited to add: It looks like I'm stuck until somebody can put the EEPROM flashing software onto a 5" floppy for me. I'm hoping to have a hacking session next week with some folks that have more equipment than I have (I just have the 5155, a single blank 5" diskette, a USB floppy drive, CF cards, and a CF reader).
 
Last edited:
Do you know anyone local with an eprom programmer ?

Not that I know of, although I have a coworker I can ask. Either way, I'm hosed through the weekend.

I'm kicking myself because I had been thinking "Maybe I should copy the ROM image and the XTIDE configurator onto this floppy before I reboot?"
 
Back
Top