VOGONS

Common searches


First post, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie

I'm considering booting multiple DOS versions in a single system (with the help of NTLDR or GRUB4DOS), and have been using VirtualBox to conduct experiments, and I could then save the completed result into an image that I could dd into the real machine. VirtualBox's snapshot feature has been very helpful for me when I'm working on this, as it allows me to easily revert to a previous state should anything go wrong later on.

So far I'm able to get FreeDOS and PTS-DOS 32 to coexist, as they by default do not share any system file, though a boot sector dump (can be created using DEBUG) is needed for PTS-DOS 32 while FreeDOS kernel can be chainloaded directly by GRUB4DOS.

But when it comes to ROM-DOS 7.10 (SUV) and MS-DOS (Win98/Me) I ran into a problem: only one of these two can be booted at a time even with correct boot sector dumps.

If I install MS-DOS (Win98/Me) first then ROM-DOS, then I cannot boot MS-DOS with my old boot sector file anymore. If I reinstall the MS-DOS boot code (via SYS/FDISK), then MS-DOS will boot, but ROM-DOS will stop working with its respective boot sector file as well.

I've checked that both DOS' system files (IO.SYS/MS-DOS.SYS for MS-DOS, and IBMBIO.COM/IBMDOS.COM for ROM-DOS) are present and intact. These two DOS do not share kernel files but they share CONFIG.SYS/AUTOEXEC.BAT, though it's technically possible to hex-edit one of these kernels (preferrably the ROM-DOS one) to look for a different CONFIG file (and from the new CONFIG specify a different AUTOEXEC file in the SHELL line).

I'm wondering what else might be causing the conflict, given I've the boot sectors of both DOS versions dumped and they do not really share any kernel file... I once read that some old DOS versions additionally expect the kernel files be the first two files in the filesystem, but I don't think this really is the case... maybe I need to dig a bit further into their boot sector codes...

Reply 1 of 10, by Disruptor

User metadata
Rank Oldbie
Rank
Oldbie

Well, the problem might be that in the boot process both IO.SYS and IBMBIO.COM have to be starting at cluster 2 and to be unfragmented.
The routines in boot sector do not really care about file system, root directory and FAT.

Reply 2 of 10, by Jo22

User metadata
Rank l33t++
Rank
l33t++

I think the same. This was one of the big differences between MS-DOS 6.22 and 7.0.
Previously, system files had to be located at a specific, fixed location, essentially.
From DOS 7 onwards, things like command.com could be located in sub directories etc.
The DOS 7 boot code was more intelligent or flexible, so to say.

"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 3 of 10, by weedeewee

User metadata
Rank l33t
Rank
l33t

make new empty image.
create primary active partition in this new empty image
make copy of this image with primary active partition
do a sys c: of romdos on one copy
do a sys c: of MS-DOS (Win98/Me) on other copy
... ? compare data of both images not looking at FAT tables, directory or partition data sectors.

While old dos version definitely had this annoying thing where io.sys/ibmbio.com needed to be the first file on the disk, I'm fairly certain that was no longer the case for the later dos/windos versions. IIRC
So modifying one of those bootsectors to load the correct files might also bring relief.

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 4 of 10, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie

Just checked my experiment logs... I should have mentioned this earlier.

It seems both DOS can boot okay, without the issue I'm having, when using a FAT16 partition, but that would severely limit my primary partition to 2GB.

I'm currently doing this on a FAT32 primary partition with at least 16GB (as I also plan to install other stuffs like Windows afterwards, though it needs to be done on real machine), and I'm having this problem.

Since the "lba" flag needs to be set for FAT32 primary partitions above 8GB (crossing the CHS boundary), I'm not sure if this was case. Some partition managers like PartitionMagic does this automatically when resizing a FAT32 beyond the 8GB boundary.

Maybe I can experiment this with a 6-8GB FAT32 (before CHS boundary) and see if everything works... but I'm not sure if the "lba" flag was really that necessary for some OSes to access larger FAT32 partitions (above 8GB) properly...

EDIT: Reproduced the same issue on FAT32 partitions without LBA flag (0x0b) as well, regardless of its size. While not having the LBA flag may not be an immediate issue it seems when trying to install Windows 9x, ScanDisk does care about the absence of the LBA flag and would go as far as forcing a surface scan.

EDIT 2: Still reproducible under many different configurations. A side note: It seems ROM-DOS's SYS command would somehow remove IO.SYS/MSDOS.SYS, but it doesn't seem to matter even after putting those files back. Guess I really need to look into the boot sector dumps to figure out what was going on behind the scenes.

Reply 5 of 10, by Jo22

User metadata
Rank l33t++
Rank
l33t++

MS-DOS 7.1 supports LBA, according to Wikipedia.

"MS-DOS 7.1 added FAT32 support (up to 2TB per volume),
while MS-DOS 7.0 and earlier versions of MS-DOS only supported FAT12 and FAT16.
Logical block addressing (LBA) is also supported in MS-DOS 7.1 for accessing large hard disks,
unlike earlier versions which only supported cylinder-head-sector (CHS)-based addressing.
Year 2000 support was added to DIR command via the new /4 option. "

Source: https://en.wikipedia.org/wiki/MS-DOS_7

Maybe there's a subtle difference between these two.
Msybe the Partition ID or something along these lines?

"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 6 of 10, by weedeewee

User metadata
Rank l33t
Rank
l33t

Partition ID is definitely different for fat12/16 & fat32

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 7 of 10, by Jo22

User metadata
Rank l33t++
Rank
l33t++
weedeewee wrote on 2022-10-16, 07:51:

Partition ID is definitely different for fat12/16 & fat32

Yes, right, but that's not what I meant to say. 😅

In the past, different IDs for plain FAT existed.
Partly also because they were different (FAT16, FAT16B, FAT16/VFAT).

The FAT of Atari TOS earlier than 1.04 wasn't completely MS-DOS compatible, for example.

That's why I thought that different DOSes used different FAT32 IDs, maybe, and this prevents booting.

https://en.wikipedia.org/wiki/Partition_type# … f_partition_IDs

"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 8 of 10, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2022-10-16, 08:37:
Yes, right, but that's not what I meant to say. 😅 […]
Show full quote
weedeewee wrote on 2022-10-16, 07:51:

Partition ID is definitely different for fat12/16 & fat32

Yes, right, but that's not what I meant to say. 😅

In the past, different IDs for plain FAT existed.
Partly also because they were different (FAT16, FAT16B, FAT16/VFAT).

The FAT of Atari TOS earlier than 1.04 wasn't completely MS-DOS compatible, for example.

That's why I thought that different DOSes used different FAT32 IDs, maybe, and this prevents booting.

https://en.wikipedia.org/wiki/Partition_type# … f_partition_IDs

Yeah, there are different partition IDs for FAT16/FAT32 to distinguish whether the disk/partition should be accessed via CHS or LBA.

I remember an old caveat, that if the disk contains a 0x05 extended partition, it'll almost always be considered a CHS drive by the OS regardless of BIOS setting, and in some cases, even BIOS will report the drive as 8.4GB max. I suppose that was to ensure compatibility with OSes that predate LBA as mixing LBA and CHS accesses could corrupt data in some cases.

I don't think the filesystem ID matters in this case. It seems to be more a FAT32-specific issue with the MS-DOS/ROM-DOS boot code, whereas with PTS-DOS 32 it is working perfectly fine under all circumstances. On the other hand, FreeDOS kernel can be chainloaded just fine by GRUB4DOS under all circumstances as well.

According to a ROM-DOS manual that I could find, the ROM-DOS.SYS is the kernel and it would be copied as IBMBIO.COM via SYS command, but IBMDOS.COM doesn't seem to be among the files initially present on the boot medium so I wonder if it was created on-site by SYS command.

Additionally, later GRUB4DOS added "msdos" and "pcdos" arguments meant to boot the DOS kernel files directly, but so far I haven't gotten it working at all. None could be loaded this way (including PTS-DOS 32). ROM-DOS.SYS only managed to reach "0123" (it should output "0123456" before showing the starting output) whereas IO.SYS doesn't show any visible output (but I presume it got stuck at the same stage as ROM-DOS).

Reply 9 of 10, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie

A bump on this. I took out the boot sector dumps from the VM snapshots, for both FAT16 and FAT32. On the surface (looking at it using a hex editor), it seems the generated boot codes for FAT16 and FAT32 are very different.

Especially with ROM-DOS 7.10. From the signature it seems to be using ROM-DOS 6.22's boot code (DLDOS622) when installing to a FAT16 partition. If installing to a FAT32 partition, the boot code will have a signature for ROM-DOS 7.10 (DLDOS710). This significant difference might be the reason why ROM-DOS and MS-DOS could coexist on a FAT16 partition, but not on a FAT32 one.

Signature-wise, MS-DOS doesn't appear to differ much with FAT16 or FAT32. Both dumps use "MSWIN4.1" as signature.

This is all I could know with just a hex editor. To look further I'll need to use something like HIEW for a disassembled output.

Reply 10 of 10, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Thanks for the feedback, good luck! 🙂🤞

"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//