PC-DOS 7.1 FDISK32 support

Discussions about using non Windows and Linux guests such as FreeBSD, DOS, OS/2, OpenBSD, etc.
Post Reply
CJ
Posts: 24
Joined: 15. Aug 2008, 20:30

PC-DOS 7.1 FDISK32 support

Post by CJ »

I'm trying to install PC-DOS 7.1. Note that this is not PC-DOS 7.0 Rev 1 (aka PC-DOS 2000), but a subsequent update which added LBA and FAT32 support to the kernel.

PC-DOS 7.1 is still available for download from IBM, as part of the IBM ServerGuide Scripting Toolkit, DOS Edition, version 1.3.07 (https://www-947.ibm.com/support/entry/p ... MIGR-53564). It replaces FDISK.COM with FDISK32.COM, and added FORMAT32.COM.

I created a boot disk, then created a basic DOS VM with all defaults, and booted the boot image. When I FDISK the hard drive, FDISK32 issues a warning:

Code: Select all

A:\>fdisk32 1 /pri:500

*********** LBA reported Head,Sector,Track
* WARNING * values don't match the reported
*********** total number of sectors. Error
in hardware or BIOS is a probable cause.
However, it creates the partition anyway:

Code: Select all

A:\>fdisk32 /status
*********** LBA reported Head,Sector,Track
* WARNING * values don't match the reported
*********** total number of sectors. Error
in hardware or BIOS is a probable cause.
                         Fixed Disk Drive Status
  Disk   Drv   Mbytes   Free   Usage
    1           500     500
          C:    500
After rebooting, I format and hit two issues.

Code: Select all

A:\>format32 c:
The /Q switch is required at this time.
PC DOS FAT32 Format Utility

Warning: The drive you specified is not partitioned as a FAT32 drive.
First, why would FORMAT32 require a quick format on a brand new partition? Second, I haven't found a way to specify FAT32 for the partion. FDISK32 doesn't seem to support it:

Code: Select all

A:\>fdisk32 /?
Configures a hard disk for use with PC DOS.

FDISK32 [/STATUS | d /PRIO[O]:n | d /EXT:n | d /LOG[0]:n | d /MBR]

    /STATUS     Displays the status of the fixed disk drive
    d           is the physical drive # (1,2,...)
    n           size of partition in megabytes
    /PRI        Create a primary drive
    /EXT        Create an extended partition
    /LOG        Create a logical drive within an extended partition
    /MBR        Write a new Mast Boot Record
FORMAT.COM has no problem formatting the partion as FAT16, but I want a FAT32 partition.

Does the FDISK32 warning reflect a bug in VB?

--nathanael
fargo
Posts: 6
Joined: 20. Jan 2011, 12:15
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: WinXP-sp3

Re: PC-DOS 7.1 FDISK32 support

Post by fargo »

The same here!

format32.exe of PC DOS 7.1 does not work with VirtualBox HDDs. I tested it with other virtual machines (Parallels and VMware Fusion) and was able to format in FAT32 without problems.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: PC-DOS 7.1 FDISK32 support

Post by michaln »

Have a VBox.log?
ghr
Volunteer
Posts: 376
Joined: 25. May 2007, 22:46
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: DOS, Win3x, Win95, WinXP, Ubuntu, OS/2

Re: PC-DOS 7.1 FDISK32 support

Post by ghr »

I played a little with it, remembering that e.g. Win95 or later asks for large disk support, was there a limit (min disk size) of 2GB for that question? Now, when I use format of a Win98SE boot disk with large disk support (which means nothing else than FAT32) I don't have a problem anymore. Similarly, when I create a VDI of say 4 GB I don't have an issue either (perhaps only a warning that can be ignored). Also, old habit from those days: boot, fdisk, boot, format..., or, for this one: boot, fdisk32, boot, format32 :)
CJ
Posts: 24
Joined: 15. Aug 2008, 20:30

Re: PC-DOS 7.1 FDISK32 support

Post by CJ »

Here's what I did:

1. Downloaded ibm_sw_sgtk_1_3_07_anyos_anycpu.zip from https://www-01.ibm.com/support/docview. ... MIGR-53564 and extracted it. The PC-DOS 7.1 files are in sgdeploy\sgtk\DOS\.

2. Used WinImage to create a bootable floppy image, grabbing a boot sector from a PC-DOS 7.0 bootable floppy image.

3. Copied IBMBIO.COM, IBMDOS.COM and COMMAND.COM in that order into the floppy image, then everything else in DOS\.

4. Created a VBox VM called PC-DOS 7.1, taking all defaults. Loaded the floppy image into the A: drive and started the VM.

5. Ran FDISK32

Code: Select all

A:\>FDISK32

*********** LBA reported Head,Sector,Track
* WARNING * values don't match the reported
*********** total number of sectors.  Error
in hardsware or BIOS is a probably cause.
Invalid parameter
I'm attaching my VBOX.LOG.
Attachments
VBox.log
vbox.log
(68.76 KiB) Downloaded 31 times
Last edited by CJ on 1. Mar 2019, 02:21, edited 2 times in total.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: PC-DOS 7.1 FDISK32 support

Post by andyp73 »

If you try running:
fdisk32 /status
Does that give you any actual numbers on the disk CHS and LBA values?

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
CJ
Posts: 24
Joined: 15. Aug 2008, 20:30

Re: PC-DOS 7.1 FDISK32 support

Post by CJ »

Code: Select all

A:\>fdisk32 /status

*********** LBA reported Head,Sector,Track
* WARNING * values don't match the reported
*********** total number of sectors.  Error
in hardware or BIOS is a probable cause.
                         Fixed Disk Drive Status
  Disk   Drv   Mbytes   Free   Usage
    1            500     500

(1 Mbyte = 1048576 bytes)
A:\>
CJ
Posts: 24
Joined: 15. Aug 2008, 20:30

Re: PC-DOS 7.1 FDISK32 support

Post by CJ »

Repeating the previous process:
  1. Created VBox DOS VM. This time I created a 4096MB hard drive.
  2. Booted the VM from a PC-DOS 7.0 disk, created and formatted two 2gb partitions(*). FDISK /MBR to transfer the boot sector.
    [Update] PC-DOS 7.0's FDISK supports only FAT16. FreeDOS's FDISK has full FAT32 support. However, its FDISK /MBR does not appear to support PC-DOS 7.1.
  3. Rebooted from a PC-DOS 7.1 disk, copied over the three system files to C:, then the rest of PC-DOS 7.1.
    [Update] The SYS command included with PC-DOS 7.1 doesn't support v7.1, so you'll have to FDISK /MBR and copy the system files over manually.
  4. Rebooted the VM from the hard drive.
Note that the FDISK32 error occurs even when booting a fresh VM before the hd has been partitioned, so it would appear to be some sort of anomalous geometry reporting by VBox.

Code: Select all

C:\>fdisk32 /status
*********** LBA reported Head,Sector,Track
* WARNING * values don't match the reported
*********** total number of sectors. Error
in hardware or BIOS is a probable cause.
                         Fixed Disk Drive Status
  Disk   Drv   Mbytes   Free   Usage
    1           4095           100%
          C:    2047
          D:    2047

(1 MByte = 1048576 bytes)
The following error occurs if the partition is FAT16, but it succeeds on a FAT32 partition.

Code: Select all

C:\>FORMAT32 D:
The /Q switch is required at this time.
PC DOS FAT32 Format Utility

Warning: The drive you specified is not partitioned as a FAT32 drive.

C:\>

Code: Select all

C:\>FORMAT D:

WARNING: ALL DATA ON NON-REMOVABLE DISK
DRIVE D: WILL BE LOST!
Proceed with Format (Y/N)?y

Checking existing disk format.
Existing format differs from that specified.
This disk cannot be unformatted.
Proceed with Format (Y/N)?y
Formatting 2047.31M
Format complete.

Volume label (11 characters, ENTER for none)?

2,146,467,840 bytes total disk space
2,146,467,840 bytes available on disk

       32,768 bytes in each allocation unit.
       65,505 allocation units available on disk.

Volume Serial Number is 2201-1016

C:\>DIR D:

 Volume in drive D has no label
 Volume Serial Number is 2201-1016
 Directory of D:\

File not found

C:\>
FDISK32 still yields the same error. It wouldn't seem to be related to FAT16 partition formatting as, as noted above, FDISK32 reports the error even before the HD has been partitioned.

VBOX.LOG is attached.
Attachments
VBox2.log
(98.77 KiB) Downloaded 35 times
VBox1.log
(98.64 KiB) Downloaded 33 times
VBox.log
(88.03 KiB) Downloaded 33 times
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: PC-DOS 7.1 FDISK32 support

Post by michaln »

Actually... the error message makes sense, and I'm not sure it's a bug or not. "LBA reported Head,Sector,Track values don't match the reported total number of sectors. Error in hardware or BIOS is a probable cause."

When you create a disk that's exactly 4GB in size, it's not possible to map it to a BIOS CHS geometry perfectly. There will be a small section at the end of the disk not accessible via CHS addressing. That's just how it is. But I don't know exactly what this not-quite-released version of DOS is looking at, so hard to say if it's just noise or not.
ghr
Volunteer
Posts: 376
Joined: 25. May 2007, 22:46
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: DOS, Win3x, Win95, WinXP, Ubuntu, OS/2

Re: PC-DOS 7.1 FDISK32 support

Post by ghr »

Just trying this: make a HDD with 8032.5 MB; next,

Code: Select all

fdisk32 1 /pri:8032
, next

Code: Select all

format32 c:
In this case the fdisk32 just works silently. OK, this is not covering all cases but does support your (michaln) idea.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: PC-DOS 7.1 FDISK32 support

Post by michaln »

I think FDISK32 complains when the geometry returned by INT 13h/48h does not add up to the number of sectors returned by the same function. When the disk is over ~8GB, the geometry is not used, so there can't be any mismatch.

The specifications I found (various versions of EDD) are at best unclear and at worst contradictory. The old Phoenix EDD document clearly says that it is "physical" geometry and the "number of physical sectors". What happens with VirtualBox is that there's some geometry and the size corresponds to the last LBA address. A newer version of EDD talks about "default" geometry with no explanation of what "default" is meant.

The geometry is actually clear enough, but hard disks can return a "current capacity in sectors" corresponding to the current CHS translation (on the disk level, not BIOS level) as well as the "total number of user addressable sectors" (meaning LBA-addressable). I couldn't find any hint in the EDD specifications as to which of those two capacities is supposed to be returned.
CJ
Posts: 24
Joined: 15. Aug 2008, 20:30

Re: PC-DOS 7.1 FDISK32 support

Post by CJ »

So I’m assuming this means, "The issue lies in the ambiguity of the specifications, so VirtualBox will be unable to address it."
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: PC-DOS 7.1 FDISK32 support

Post by michaln »

Something like that, because it's unclear how to address it. The workaround is to either use an 8GB+ virtual disk, or create a disk with a size that exactly maps to its geometry.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: PC-DOS 7.1 FDISK32 support

Post by michaln »

Actually it's worse than that. Making FDISK32 in PC DOS 7.1 happy would break some existing VMs, because the last bit of the disk might become inaccessible (depending on exactly how the guest OS accesses it).
Post Reply