VOGONS


First post, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie

Recently I've been experimenting with IBM PC-DOS 7.1 which was part of the IBM ServerGuide Scripting Toolkit.

The information I could find online is rather limited, but I'm able to get it booted on a large FAT32 partition. I've put the sections into spoiler blocks for better readability.

1. Obtaining PC-DOS 7.1

PC-DOS 7.1 was never released as a complete system but some of its functionalities were included as part of the IBM ServerGuide Scripting Toolkit. The latest DOS Edition version I could find is 1.3.07.

It seems something regarding authentication has changed on IBM's FTP servers so it cannot be obtained directly from IBM now, but you may find some other places that still have it available for download.

Here's a download link from Lenovo download server that's still accessible.

2. Making bootable floppy images

All files directly related to PC-DOS 7.1 reside in "sgdeploy\sgtk\DOS". However, its SYS.COM is actually the one from PC-DOS 2000 (7.0), which is incompatible with PC-DOS 7.1.

You can find some bootable image examples in "sgdeploy\sgtk\ads\images" which can be used as a base to make your own PC-DOS 7.1 boot floppy, such as "tk_raid.vfd". The VFD files can be handled the same way as other IMG images. Mounting and editing the image in Linux is pretty straightforward using "mount" (and "umount" once you've done editing). For Windows, you can disk image editors such as WinImage, or floppy emulators that can directly mount the image for editing.

After mounting the image, delete all other files except IBMBIO.COM, IBMDOS.COM and COMMAND.COM, then put the files you want, and customize CONFIG.SYS and AUTOEXEC.BAT to your liking. Unmount the image once you're done.

As long as you leave IBMBIO.COM, IBMDOS.COM and COMMAND.COM untouched, the image should remain bootable.

3. Installing PC-DOS 7.1 to hard disk

It is also possible to "install" PC-DOS 7.1 to a hard disk and make it bootable. However, without a usable SYS.COM it can be a bit tricky to get the disk prepared.

PC-DOS 7.1 is entirely capable of booting from a FAT32/LBA partition (larger than 1024 cylinders). A disk can be made bootable to PC-DOS 7.1 using the following steps, using mainly the DOS utilities included in the ServerGuide Scripting Toolkit.

The instructions assume disk 1 and drive C:.

1. Prepare a PC-DOS 7.1 boot floppy containing necessary utilities, particularly FORMAT32.COM and FDISK32.COM.
2*. Write a new master boot record with FDISK32: "FDISK32 1 /MBR"
3. Create a primary partition with FDISK32: "FDISK32 1 /PRI:xxx" (xxx is the size you want for the primary partition)
4. You can use FDISK32 to create extended or logical partitions if desired, though it's better to do this later with a more convenient tool.
5. Reboot, keep the boot floppy inserted.
6**. Format the created partition (C:) to FAT32: "FORMAT32 C: /Q /V:xxxx". (xxxx is the volume label. /V can be omitted if you don't need a label)

-- Depending on your preference or circumstances, you need to do either step 7A or 7B. --
7A. Format the partition again, this time add /S to transfer system files: "FORMAT32 C: /Q /S /V:xxxx" (xxxx is the volume label. Same as previous step.)
7B***. Copy the core system files to C: using XCOPY in the following order: IBMBIO.COM, IBMDOS.COM, COMMAND.COM.

8. If desired, add +S +H +R attributes to IBMBIO.COM and IBMDOS.COM afterwards.
9. Copy other utilities to C: and modify CONFIG.SYS and AUTOEXEC.BAT if needed. Normally these utilities reside in C:\DOS, but you can use another directory, just make sure your PATH environment variables match.
10. After you've done modifying the configurations, remove the floppy and reboot. If nothing done wrong you should be able to boot to the installed PC-DOS 7.1 instance.

* You may skip this step if the disk does not yet have a MBR, as a correct one will be written when you create the partitions. If the disk has already been prepared by another tool, such as GParted, then this step is REQUIRED, even if there were no partitions present, or the disk will not boot. Additionally, this step must be done prior to all future FORMAT32 commands, or you'll get a "Boot failure" error.

** If the partition has already been formatted to FAT32 before, you can skip step 6 and do only step 7A. You only need to format the partition twice (doing both steps 6 and 7A) if it's not already formatted, as the /S argument in FORMAT32 has a bug which would cause the format process to fail due to "Invalid media" error if the disk was previously unformatted. Additionally, the /S argument requires /Q. If FORMAT32 is run with only /S, it will give you a warning and proceeds as if /Q has been specified.
** UPDATE: After some testing, it seems step 6 is REQUIRED, regardless of whether the partition was previously formatted or not. I don't know why, but FORMAT32 would surely fail to transfer system files on first format. Only after doing a second format would the system files get transferred. Also, for some reasons, PC-DOS FORMAT32 would only format 8GB of the partition size, if it's larger than that. It is ADVISED to do use a partitioning tool such as GParted to perform a fsck and grow the partition to the right size afterwards.

*** Step 6 is required if you choose to perform step 7B, as PC-DOS 7.1 boot record expects the core system files to be the first few entries in the filesystem. Make sure these files are copied first and in correct order, before copying other files into the partition. Otherwise, the system will not boot and you'll have to redo steps 6 and 7B.

4. Updating to PC-DOS 7.1 from PC-DOS 2000

You can upgrade your existing PC-DOS 2000 install into PC-DOS 7.1 by replacing core system files and utilities with the new ones from the ServerGuide Scripting Toolkit, similar to the guides in VirtualBox forums. Make sure you overwrite the core system files (IBMBIO.COM, IBMDOS.COM and COMMAND.COM) with the new ones. If you need to back up these files, DO NOT RENAME THEM. Instead, use COPY to make a backup copy somewhere.

Should note that upgrading to PC-DOS 7.1 from PC-DOS 2000 will not permit you to use FAT32 for the system partition. If you try to convert the system partition to FAT32, the system will cease to boot.

On the other hand, if you find your hard disk being detected by BIOS as only 8.4GB (8GiB), chances are you need to delete and recreate your extended partition (which is most likely type 05H), as some BIOSes default to use CHS if such an extended partition is detected, to avoid issues with old OSes that predate LBA support. If you need to keep the existing extended partition, converting it to type 0FH (can be done by adding the "lba" flag with GParted) should be enough make BIOS detect the actual size via LBA.

5. Using PC-DOS 7.1

Most PC-DOS 2000 programs should still work on PC-DOS 7.1 unless it checks for DOS versions. You can simply bring in all the existing PC-DOS 2000 program files, CONFIG.SYS and AUTOEXEC.BAT, and in most cases everything will load just fine, including DOS Shell.

For programs that no longer work on PC-DOS 7.1 (incorrect DOS version, or not FAT32/LBA-aware/safe), you can always consider using the ones (or alternatives) from recent FreeDOS releases, which should be more compatible with modern system configurations.

PC-DOS 7.1 can correctly detect all hard drives installed on the system just like MS-DOS 7/8, whereas ROM-DOS 7.10 SUV may not, from what I've tested. However, I haven't tested whether or not it really supports 48-bit LBA, so care must be taken when reading/writing past 128GiB (137GB) for now.

It seems PC-DOS 7.1 has some issues with running Windows 3.x according to some other threads here. Given my system has too much RAM for Win3.x to run I don't think I would be able to really test this.

Additionally, if considering using FreeDOS' FDAPM utility, using ADV:REG instead of APMDOS is recommended. It appears FDAPM APMDOS (by default equivalent to ADV:MAX) can lead to noticeable slowdowns of certain functions when used with non-FreeDOS kernels. In PC-DOS 7.1's case, a noticeable slowdown can be observed when doing DIR /W.

6. More Info

PC-DOS 7.1 included a BLDLEVEL utility that can retrieve build information embedded in some of its program files. Such build information exists only in PC-DOS 7.1 files and not others. Even PC-DOS 2000 program files do not include such info.

Additionally, the MAKEBOOT.BAT has a mention about a "FAT32B.DSK" image, which was never seen in public. Not sure if that image in question ever existed, or it was merely a placeholder.

Previously, I used Norton/PowerQuest PartitionMagic to prepare the disk with the FAT32/LBA partition that I intend to boot PC-DOS 7.1 with, and it worked. However, when I recently experimented with dumping the boot sector, I noticed that the boot sector created by PartitionMagic contains the string for Win9x ("MSWIN4.1"). I later reformatted the test partition on the VM with FORMAT32 /Q /S, and this time, the boot sector reads "IBM 7.1". Both boot sectors can boot PC-DOS 7.1 just fine, since the rest of the boot code (presumably written by FORMAT32) is the same according to VBINDIFF.

(NOTE: Need to use DEBUG from PC-DOS 7.1 or FreeDOS, the one from PC-DOS does not work correctly: will generate an error and dump incorrect stuffs.)

Last edited by LSS10999 on 2023-07-16, 01:35. Edited 9 times in total.

Reply 1 of 10, by dr_st

User metadata
Rank l33t
Rank
l33t

Interesting. Thanks for sharing.

All files directly related to PC-DOS 7.1 reside in "sgdeploy\sgtk\DOS". However, its SYS.COM does not work as it appears to be an old version ironically incompatible with PC-DOS 7.1.

I wonder if may be an easier approach to figure out what's wrong with SYS.COM and make it work, or perhaps a working version of SYS.COM for PC DOS 7.1 exists somewhere?

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 2 of 10, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
dr_st wrote on 2023-03-06, 10:11:

Interesting. Thanks for sharing.

All files directly related to PC-DOS 7.1 reside in "sgdeploy\sgtk\DOS". However, its SYS.COM does not work as it appears to be an old version ironically incompatible with PC-DOS 7.1.

I wonder if may be an easier approach to figure out what's wrong with SYS.COM and make it work, or perhaps a working version of SYS.COM for PC DOS 7.1 exists somewhere?

Well, the included SYS.COM doesn't work when run from within PC-DOS 7.1 itself, citing "Incorrect DOS version".

On the other hand, I did try running SYS.COM from a Windows XP VM in hope to create a bootable base floppy image, but it didn't work, either, saying it couldn't find the system files.

EDIT: MAKEBOOT.BAT did not involve SYS.COM at all, not even FORMAT32 /S. It copied the system files manually in correct order. Maybe the one who made the MAKEBOOT script was aware of the SYS.COM being nonfunctional.

Reply 3 of 10, by dr_st

User metadata
Rank l33t
Rank
l33t
LSS10999 wrote on 2023-03-06, 10:34:

Well, the included SYS.COM doesn't work when run from within PC-DOS 7.1 itself, citing "Incorrect DOS version".

The incorrect DOS version is a mere version number check. Should be fairly easy to hack (just replace the hardcoded version number it's looking for). The question is whether it would be fully compatible otherwise. Sometimes these checks are there to prevent true incompatibility, sometimes not. No way to know but to try.

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 4 of 10, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
dr_st wrote on 2023-03-06, 11:52:
LSS10999 wrote on 2023-03-06, 10:34:

Well, the included SYS.COM doesn't work when run from within PC-DOS 7.1 itself, citing "Incorrect DOS version".

The incorrect DOS version is a mere version number check. Should be fairly easy to hack (just replace the hardcoded version number it's looking for). The question is whether it would be fully compatible otherwise. Sometimes these checks are there to prevent true incompatibility, sometimes not. No way to know but to try.

I took a look at PC-DOS 7.1's SYS.COM and compared it with the one from PC-DOS 2000. Turned out they're identical. This explains the "Incorrect DOS version" error.

So IBM somehow put a wrong version of SYS.COM in ServerGuide Scripting Toolkit/PC-DOS 7.1. Don't know if there's even a right version of SYS.COM.

Reply 5 of 10, by dpirate

User metadata
Rank Newbie
Rank
Newbie

I have PC-DOS 7.1 (base PC-DOS 2000 + IBM ServerGuide Scripting Toolkit updates) installed on one of my PCs. However the boot drive for the OS is a FAT16 2GB CompactFlash card and I use the FAT32 functionality to access a second 80GB HDD. I had PC-DOS 2000 already installed on the 2GB CF card. It was some time ago, but I think I remember what I did was overwrite the PC-DOS 2000 versions of the files with the new versions from the IBM ServerGuide Scripting Toolkit while still booted with the PC-DOS 2000 kernel and ran "sys.com c:" from there. I rebooted and could access my 80GB FAT32 drive. I'm guessing sys.com doesn't work with FAT32/PC-DOS 7.1 kernel but otherwise works.

It's nice to see some interest in PC-DOS here.

https://metalpunks.info

Reply 6 of 10, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
dpirate wrote on 2023-03-06, 19:37:

I have PC-DOS 7.1 (base PC-DOS 2000 + IBM ServerGuide Scripting Toolkit updates) installed on one of my PCs. However the boot drive for the OS is a FAT16 2GB CompactFlash card and I use the FAT32 functionality to access a second 80GB HDD. I had PC-DOS 2000 already installed on the 2GB CF card. It was some time ago, but I think I remember what I did was overwrite the PC-DOS 2000 versions of the files with the new versions from the IBM ServerGuide Scripting Toolkit while still booted with the PC-DOS 2000 kernel and ran "sys.com c:" from there. I rebooted and could access my 80GB FAT32 drive. I'm guessing sys.com doesn't work with FAT32/PC-DOS 7.1 kernel but otherwise works.

It's nice to see some interest in PC-DOS here.

SYS.COM can work while still using the 2000 (7.0) kernel, as it's actually the same file as the one from PC-DOS 2000. It won't run on PC-DOS 7.1, nor would it be able to handle FAT32 partitions.

"Upgrading" PC-DOS 2000 files with the ones from PC-DOS 7.1 will definitely work. Just overwrite the existing files with the ones from PC-DOS 7.1 and that's it. No need to do another SYS command.

* In case you need to back up your old kernel files, do not rename, just make a copy. The kernel files need to be the first few files in the filesystem or it won't boot.

Reply 8 of 10, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
maxtherabbit wrote on 2023-03-07, 03:19:

So, does FORMAT32 /S work or no?

Just did a small test with a newly set up VM. Turned out FORMAT32 does not require a valid SYS.COM to be able to transfer system files. So the answer is Yes.

However, I noticed that you need to use FORMAT32 twice if the disk was not already formatted, or it'll fail with an invalid media error if using /S. So the process would be:

FORMAT32 C: /Q
FORMAT32 C: /Q /S
(NOTE: The /S argument requires /Q. If specified without /Q, it'll give you a warning and include it for you.)

I'll do some further experiments when I have time. Setting up PC-DOS 7.1 on a FAT32/LBA drive can be much easier than I originally thought. Just that the FDISK32 command may not be easy to use, since it's not interactive like the ones from FreeDOS or MS-DOS, so you must manually specify what you want to do as arguments.

UPDATE AND WARNING: I recently discovered that FORMAT32 would only format 8GB of the partition space if it's larger than that. The rest of the partition would be inaccessible, and requires a manual fsck (such as via GParted) to grow the partition to the right size (so all the space can be accessed). Growing the filesystem to the right size will not break booting of PC-DOS 7.1, however.

Additionally, you will definitely need to format the partition twice. Even with a previously formatted partition, formatting with /S included for the first time will surely fail to transfer the system files, resulting in a boot failure. Only on second FORMAT32 /Q /S will system files be actually transferred.

Last edited by LSS10999 on 2023-03-11, 16:08. Edited 3 times in total.

Reply 9 of 10, by dpirate

User metadata
Rank Newbie
Rank
Newbie
LSS10999 wrote on 2023-03-07, 04:53:

Setting up PC-DOS 7.1 on a FAT32/LBA drive can be much easier than I originally thought. Just that the FDISK32 command may not be easy to use, since it's not interactive like the ones from FreeDOS or MS-DOS, so you must manually specify what you want to do as arguments.

The ability to align partitions to 4K was just added to FreeDOS FDISK which is useful with flash based mass storage. It has not been tested very much yet, but it's mostlikely compatible.

https://metalpunks.info

Reply 10 of 10, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
dpirate wrote on 2023-03-07, 06:22:

The ability to align partitions to 4K was just added to FreeDOS FDISK which is useful with flash based mass storage. It has not been tested very much yet, but it's mostlikely compatible.

I haven't tested FreeDOS FDISK as I always do it from a Linux distro with GParted, which already supported MiB alignment.

Just that the boot record made by GParted doesn't seem to permit booting of anything. It's merely a placeholder meant to be replaced by something else (such as a Windows/Linux bootloader). Need to check whether FORMAT32 /Q /S is sufficient, or I need to additionally do a FDISK32 /MBR, to get such partitioned disk to boot to PC-DOS.

Be careful with partition alignment, though. If you decide to align your partitions to 4K (MiB), older partition utilities, namely PartitionMagic, will detect this as error and can no longer correctly handle the disk anymore.

EDIT: If the disk has been previously prepared with GParted, it needs to be processed in the following order (assuming disk 1, drive C), in order to be bootable:
FDISK32 1 /MBR
FORMAT32 C: /Q /S

FORMAT32 must be done AFTER FDISK32, or you'll get a "Boot failure". Also, for unknown reasons, FDISK32 complains about something like LBA sector mismatch when run from a VirtualBox VM.

EDIT 2: I've updated the OP to reflect the new discoveries. While you can still prepare disks using tools like PartitionMagic, it's not required anymore. Everything can be done with mainly FDISK32 and FORMAT32.