Page 1 of 1

Difficulty wiping DOM to set up new partition

Posted: Fri Nov 02, 2018 3:38 pm
by Franko
When I tried using fdisk to create a partition on a Hyperdisk 512MB DOM that would become the C: boot drive for my PCjr, I ran into the same problem that Chuckpdh53 described here:

viewtopic.php?f=1&t=738

In PC-DOS 2.1, fdisk reported that the DOM contained a large "non-DOS" partition that it wouldn't/couldn't modify or delete.

I therefore followed these instructions from Mike B:
Wiping out a boot sector using debug.com:

f 9000:0 200 0
a
mov dx, 9000
mov es, dx
xor bx, bx
mov cx, 0001
mov dx, 0080
mov ax, 0301
int 13
int 20

Change 0x0080 to 0x0081 for the second hard drive.
I entered each of the lines very carefully, and no errors were reported after any of them. After entering the final line and a return, I hit CTRL-C to exit the machine instruction mode of debug.com, then q to exit from debug to DOS.

Unfortunately, this doesn't appear to have changed anything -- fdisk is still reporting the same large "non-DOS" partition on the DOM, and refuses to modify or delete it. I've tried this without and also with doing a power-off reboot of the machine after executing the debug instructions, but this doesn't cause any difference.

Any suggestions on what to try next? Is there another low-level utility I could try?

Re: Difficulty wiping DOM to set up new partition

Posted: Fri Nov 02, 2018 3:43 pm
by Franko
Or one other thought. It's been a long time since I've used debug at all, and even then I didn't use it a lot. Do the machine code lines execute as I enter each one? Or do I have to type some command at the end to cause them to execute?

Re: Difficulty wiping DOM to set up new partition

Posted: Fri Nov 02, 2018 3:56 pm
by alanh
Did you reboot the machine after?

Re: Difficulty wiping DOM to set up new partition

Posted: Fri Nov 02, 2018 4:03 pm
by Franko
Yes

Re: Difficulty wiping DOM to set up new partition

Posted: Fri Nov 02, 2018 4:40 pm
by Franko
Okay, I got it sorted out.

As eventually dawned on me, entering the machine code in debug.com doesn't actually cause the commands to execute one by one.

After entering the final line of Mike's code, I entered a blank line (just a return) to return to the main debug.com prompt, then entered:

g =100

This returned:

Program terminated normally

I then exited from debug, rebooted the machine, started fdisk and found "No partitions defined." All right!

After running fdisk again to set the entire DOM as a DOS partition, and then running format c:/s, the PCjr now boots to c:\ on startup.

As you can see, the last time I used debug was a long time ago in a galaxy far, far away.

Re: Difficulty wiping DOM to set up new partition

Posted: Fri Nov 02, 2018 10:45 pm
by Franko
I just noticed a peculiarity involving disk sizes.

With both a 512MB DOM and a 2GB CF card, I first wiped each with the debug.com procedure above -- accepting the default to make the entire disk an active DOS partition. Then formatted each with the command "format c:/s".

Oddly, after the PCjr boots to c:\, when the 512MB DOM is installed, DOS 2.1 reports that there are 20,930,560 bytes free on the disk (after the 17,792-byte command.com is installed).

When the 2GB CF card is installed as c:\, the free space reported is even smaller -- something on the order of 4.6MB. (This is from memory, I don't have the CF card installed at the moment.)

Do I need to change a parameter to fix this?

Re: Difficulty wiping DOM to set up new partition

Posted: Sat Nov 03, 2018 2:05 pm
by KenG
You need to use a newer DOS. I use DOS 5.0. Each new version of DOS supported larger and larger drives. DOS 2.1 only supports 1 partition of something like 20 or 32 mb. To use DOS 5.0 on a PCjr, you have to patch the boot sector. Instructions are on here somewhere. I think DOS 3.1 was the last version to natively support the jr.

Re: Difficulty wiping DOM to set up new partition

Posted: Sun Nov 04, 2018 10:18 am
by Franko
KenG wrote:You need to use a newer DOS. I use DOS 5.0.
Sounds good. I'll look around and see if I can find a copy of DOS 5 (5.04?) with whatever PCjr patches are necessary.