Jump to content











Photo
- - - - -

How do I boot Grub4DOS from VHD in PCem?


  • Please log in to reply
41 replies to this topic

#26 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 02 May 2021 - 08:02 PM

In PC Emulator, output of "root" as well as "root (hd0,2)" at the command line is "(hd0,2) Filesystem type is fat12, partition type 0x01". Then, after the mapping, "root (fd0)" gives an error 17 message.

 

In VirtualBox I can boot and autoexecute the editor from the menu, as desired. When I go to the command line, "geometry" gives me the answer "Partition num: 2, active, Filesystem type is fat12, partition type 0x01". Here, "root" alone gives an error 17 message, while "root (hd0,2)" also returns "(hd0,2) Filesystem type is fat12, partition type 0x01".

 

Gerolf



#27 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 03 May 2021 - 02:41 AM

I still had to test the modified GRLDR from the new version https://github.com/c...21-04-28.7z.txt (time-stamped 04:37). It booted successfully, but skipped the FAT12 partition as "non-MS" and refused to read from it. GRLDR thus had to be copied to a non-hidden FAT16 logical partition to be found. Partitioning had to be made with FDISK of MS-DOS 3.31 to leave empty space for GRLDR.MBR following the master boot sector. The command "bootlace 0x80" failed in PC Emulator with a "Warning: EBIOS not present! It is not reliable running under DOS without EBIOS." So VirtualBox was used for the following steps.

 

On a newly created VHD with 1023/16/63 geometry, I created partitions as reported by FDISK of MS-DOS 3.31:

Partition Status   Type   Start  End Size
 C: 1        A   PRI DOS      0   15   16
    2            EXT DOS     16 1022 1007
Total disk space is 1023 cylinders.

Display Logical DOS Drive Information
Drv Start End  Size
 D:   16    48   33

with 33 cylinders being the minimum size for FAT16. Here's the partition table:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01 
01 00 01 0F 3F 0F 3F 00 00 00 C1 3E 00 00 00 00 
01 10 05 0F FF FE 00 3F 00 00 10 7D 0F 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA 

I formatted drive D: from Windows at the command line, having temporarily mounted this FAT16 partition as ImDisk VirtualDisk. Then I booted from a PC-DOS 2.0 disk to install that system with FORMAT C: /S so that it can boot from the 16 cylinder FAT12 partition. I booted from another DOS disk with the new GRLDR and BOOTLACE.COM on it and entered the commands "COPY GRLDR C:" and  "BOOTLACE 0x80". This is what happened at reboot:

Try (hd0,1): non-MS: skip
Try (hd0,1): Extended:
Try (hd0,2): invalid or null
Try (hd0,3): invalid or null
Try (hd0,4): FAT16: No GRLDR
No floppy
Cannot find GRLDR
Press space bar to hold the screen, any other key to boot previous MBR ...
Timeout: Current date is Tue  1-01-1980
Enter new date:
Current time is 2:55:23.77
Enter new time:

The IBM Personal Computer DOS
Version 2.00 (C)Copyright IBM Corp 1981, 1982, 1983

C>dir GRLDR

Volume in drive C has no label
Directory of  C:\

GRLDR         331101   4-28-21  4:37a
       1 File(s)  7667712 bytes free

So the installed GRLDR.MBR boots, rejects the FAT12 partition, but then chainloads the previous MBR and boots PC-DOS 2.0 from exactly this partition, so that I can autoexecute GRUB.EXE as a fallback. I prepared the partition as described in post #11. AUTOEXEC.BAT looks like this:

SET GRUBDIR=C:\_PRO\GRUB4DOS\6A210428
SET PATH=C:\_SYS\PCD200;C:\_PRO\DOSTOOLS;%GRUBDIR%
GRUB

MENU.LST has this entry:

title Editor\n\n Edit AUTOEXEC.BAT and MENU.LST
map --unmap=0,1
# map (hd0,0)/_SYS/PCD200/PCD200ED.IMG (fd0)
find --set-root /_SYS/PCD200/PCD200ED.IMG
map /_SYS/PCD200/PCD200ED.IMG (fd0)
map (fd0) (fd1)
map --hook
root (fd0)
chainloader (fd0)+1

Again, it can be booted to PC-DOS 2.0 and the editor can be executed in VirtualBox, but not in PC Emulator, where it gives an error 17 message. At the command line, "root" returns: "(hd0,0) Filesystem type is fat12, partition type 0x01", and "geometry" returns:

drive 0x80(CHS): C/H/S=1023/16/63, Sector Count/Size=1031184/512
   Partition num: 0, active,  Filesystem type is fat12, partition type 0x01
   Partition num: 4,  Filesystem type is fat16, partition type 0x04

Now I could copy GRLDR to the FAT16 partition, which allowed for direct booting to the Grub4DOS menu. Again, the editor could be started in VirtualBox, but not in PC Emulator. The same after I tried a workaround, moving the editor boot image from the FAT12 partition to the FAT16 partition: (hd0,0)/_SYS/PCD200/PCD200ED.IMG  => (hd0,4)/_SYS/PCD200/PCD200ED.IMG.

 

Gerolf



#28 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 03 May 2021 - 05:56 AM

Typo correction: "Try (hd0,0): non-MS: skip"

 

Gerolf



#29 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 03 May 2021 - 06:19 AM

Why do you insist on using PCem? I don't see what makes it better than some other solution like VirtualBox or VMware Workstation.

#30 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 May 2021 - 12:05 PM

When you run:

root (hd0,2)

you are actually issuing a command "establish root on (hd0,2)"

 

When you run:

root

you are actually asking the question "what is the current root?"

 

If I get it right, it seems that for *some reasons* the "relative address" file <current root> /_SYS/PCD200/PCD200ED.IMG fails the mapping to the (fd0), whilst the "absolute address" (hd0,2) /_SYS/PCD200/PCD200ED.IMG works? :dubbio:

 

Only for the record (as it is irrelevant to the issue at hand) the partition table you posted is not enough, in the sense that the first partition (the one recognized by grub4dos as non-MS) is fine (in the sense that its addresses can be read), but the second one, being an extended partition tells us nothing about the actual FAT16 volume.

 

Anyway, maybe, just maybe, the grub4dos doesn't expect such a small (and FAT12 formatted) first partition on HD media, can you try formatting the whole image of 1023/16/63 as a single (primary, actrive) FAT16 volume?

 

:duff:

Wonko



#31 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 04 May 2021 - 01:27 AM

Why do you insist on using PCem? I don't see what makes it better than some other solution like VirtualBox or VMware Workstation.

 

It's not even better, it's much slower. And you suffer failures where you thought you were right. Another emulator provides an additional, I think valuable, platform for software testing. It already turns out that PC Emulator behaves differently from VirtualBox, demanding for EBIOS features, for example. Such feedback may help deal with complexity as you better understand how the legacy software worked.

 

can you try formatting the whole image of 1023/16/63 as a single (primary, actrive) FAT16 volume?

 
Sure. Keeping the observed FAT12 anomaly in mind, I should reduce complexity for the sake of error searching. My initial intention was to boot various old operating systems, starting with PC-DOS 2.0; hence the need for a boot manager, but maybe not for partitioning, if only "map" or "partnew" work.
 
Now I created a new fixed-size VHD of 1023/16/63 geometry (with PCem) and one partition of maximum size (with FDISK of MS-DOS 3.31 as the oldest system that can handle 503 MiB in a single partition, totaling one cylinder less than before):
Partition Status   Type  Start  End Size
 C: 1        A   PRI DOS     0 1021 1022
Total disk space is 1022 cylinders.

For comparison, on another disk, I created such a partition under MS-DOS 8.0 (as the latest of the following systems whose FDISK no longer show cylinder numbers):

Partition  Status   Type    Volume Label  Mbytes   System   Usage
 C: 1         A    PRI DOS                   503   UNKNOWN   100%
Total disk space is   503 Mbytes (1 Mbyte = 1048576 bytes)

For the maximum size, the created partition tables look the same:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01 
01 00 06 0F FF FD 3F 00 00 00 E1 B7 0F 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA

I installed MS-DOS 3.31, GRUB.EXE and GRLDR (like in post 11, step 6, for folder C:\_SYS\MSD331). AUTOEXEC.BAT now looks like this:

SET GRUBDIR=C:\_PRO\GRUB4DOS\6A210428
SET PATH=C:\_SYS\MSD331;C:\_PRO\DOSTOOLS;%GRUBDIR%
GRUB

I had to build a new editor disk MSD331ED.IMG (like in post 15, for folder C:\_SYS\MSD331) so that the large partition can be accessed. The image consists of the MSDOS 3.31 system files, FreeDOS editor, and another AUTOEXEC.BAT:

C:
A:\EDIT C:\AUTOEXEC.BAT C:\MENU.LST
C:\AUTOEXEC.BAT

This is the MENU.LST entry for the editor:

title Editor\n\n Edit AUTOEXEC.BAT and MENU.LST
map --unmap=0,1
find --set-root /_SYS/MSD331/MSD331ED.IMG
map /_SYS/MSD331/MSD331ED.IMG (fd0)
map (fd0) (fd1)
map --hook
root (fd0)
chainloader (fd0)+1

In VirtualBox, this arragement boots MS-DOS 3.31 and autoexecutes GRUB.EXE. The editor can be started from the menu, as desired, and returns to it. In PC Emulator, the "root (fd0)" command causes an error 17 message. (Could this be a consequence of the missing EBIOS functionality? I might configure another ROM.) At the command line, "root" says: "(hd0,0) Filesystem type is fat16, partition type 0x06". To this information, "geometry" adds: "Partition num: 0, active".

 

Something unexpected happened when reboot came after I had executed "bootlace 0x80" (under VirtualBox, due to the EBIOS missing in PCem, AUTOEXEC.BAT temporarily absent):

Try (hd0,0): non-MS: skip
Try (hd0,1): invalid or null
Try (hd0,2): invalid or null
Try (hd0,3): invalid or null
No floppy
Cannot find GRLDR
Press space bar to hold the screen, any other key to boot previous MBR ...
Timeout: Current date is Tue  5-04-2021
Enter new date (mm-dd-yy):
Current time is 2:56:35.73
Enter new time:

Microsoft(R) MS-DOS(R)  Version 3.31
             (C)Copyright Microsoft Corp 1981-1987

C>dir GRLDR

Volume in drive C has no label
Directory of  C:\

GRLDR         331101   4-28-21  4:37a
       1 File(s) 524640256 bytes free

In both VBox and PCem, GRLDR, in this one-partition scenario, cannot be found and booted though it is present; but if AUTOEXEC.BAT is present, GRUB.EXE, from the DOS chainloaded as a fallback by the MBR, loads the menu. The editor can be started successfully in VirtualBox, but fails in PC Emulator with the known error 17.
 

Gerolf


Edited by Gerolf, 04 May 2021 - 01:41 AM.


#32 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 04 May 2021 - 09:19 AM

Well, in your setup, for the editor you can try using rootnoverify (fd0) instead of root (fd0), but cannot say if it will help.

 

The fact that the root (fd0) gives error 17 is probably the same root cause of the Try (hd0,0): non-MS: skip

 

Somehow the grub4dos (in the case of the editor only partially, in the case of the installed grldr.mbr via bootlace.com completely) does not like the bootsector of the floppy image or of the partition, but this seemingly happens only on PCem and not in Virtualbox. :dubbio:

 

Maybe it is the bootsector code installed by those very early MS-DOS versions that creates the issue or some other unexpected BPB value/field..

 

If I were you,. I would try a grub4dos floppy (a floppy which bootsector invokes grldr) and see what happens, there is one fat12grldr.img included in the very old 0.4.2 version:

https://sourceforge....grub4dos 0.4.2/

it is of a 1.44 MB floppy, I would try it "as is" before attempting to make a smaller floppy image.

You can replace the grldr in it with (at least) the 0.4.4-2009-10-16.

 

About the hard disk image, I would try deleting the volume partition and recreate it, formatting it under a higher DOS version (like 6.22, 7.,0 or later) and then SYS the older DOS you use.

 

:duff:

Wonko



#33 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 05 May 2021 - 02:42 AM

Well, in your setup, for the editor you can try using rootnoverify (fd0) instead of root (fd0), but cannot say if it will help. (...)

I would try a grub4dos floppy (a floppy which bootsector invokes grldr) and see what happens, there is one fat12grldr.img included in the very old 0.4.2 version

 

In PCem, for the editor image, it helped in that a "rootnoverify (fd0)" passed without complaint, but next line "chainloader (fd0)+1" hanged with "Error 25: Disk read error". Exactly the same (either error 17 at "root" or 25 at "chainloader") happened when I used fat12grldr.img with an analogous MENU.LST entry. In VirtualBox, fat12grldr.img correctly booted to the menu and allowed returning to MS-DOS 3.31.

 

About the hard disk image, I would try deleting the volume partition and recreate it, formatting it under a higher DOS version (like 6.22, 7.,0 or later) and then SYS the older DOS you use.

 

Okay. I took the VHD I already had partitioned for maximum size under MS-DOS 8.0 (Windows ME bootdisk). In PCem, I prepared it now with FORMAT C: under that version.

 

Then I transferred MS-DOS 3.31 using SYS C: and COPY COMMAND.COM C: and re-installed everything as described in my previous post. In VBox, I executed "bootlace 0x80".

 

The results were still the same, with "Try (hd0,0): non-MS: skip" and "Cannot find GRLDR", even in VBOX, and error 17 or error 25 in PCem. Sometimes, again, there was an additional line before "try", namely:  "BIOS: Drive=0x80, H=16, S=63".

 

I formatted drive D: from Windows at the command line, having temporarily mounted this FAT16 partition as ImDisk Virtual Disk.

In PCem, I created a fresh 1023/16/63 VHD and partitioned it for maximum size under MS-DOS 3.31.I mounted the VHD as ImDisk Virtual Disk in Windows Explorer. The formatting dialog popped up immediately. I selected file system type FAT and standard cluster size and unmounted the disk after formatting.

 

I tried to transfer MS-DOS 3.31 using SYS C: but received an error message: "No room for system on destination disk". MS-DOS 8.0 required the system files to be at their standard locations already, but SYS C: worked with MS-DOS 7.0 (Windows 95 boot disk).

 

I re-installed everything in analogy to my previous post, except for a folder named "C:\_SYS\MSD700" and an editor boot image named "MSD700ED.IMG". In VBox, I executed "bootlace 0x80" and purposely removed C:\GRLDR, so in PCem, at reboot, I got the message "Try (hd0,0): FAT16: No GRLDR", signaling the file system was recognized. After re-installation, GRLDR could directly boot to the menu. But when I wanted to boot the editor disk in PCem, errors 17 or 25 remained.

 

Gerolf



#34 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 May 2021 - 09:20 AM

So, in a nutshell, with a larger FAT16 partition the "Try (hd0,0): non-MS: skip" issue is solved, good :) .

 

We are ending the possible options about the floppy editor image, however :wacko: .

 

The fact that the PcEM refuses to work with a "normal" 1.44 MB floppy diskette (fat12grldr.img) that - historically - has booted on *any* system or emulator seems to mean that there is some form of incompatibility between grub4dos and PcEM.

 

Maybe you can try with a virtual floppy or hard disk image dd-ed to memory, but I am not convinced that it can change anything.

 

Or - yet another huge stretch - with a makebootfat image (which is at the same time a floppy or superfloppy and a harddisk image). :dubbio:

 

 

:duff:

Wonko


  • Gerolf likes this

#35 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 06 May 2021 - 11:21 PM

So, in a nutshell, with a larger FAT16 partition the "Try (hd0,0): non-MS: skip" issue is solved, good

 

No. That issue is solved, regardless of the partition size, with a FAT16-formatting being done under Windows 10, which seems too hard a condition to be acceptable for a boot manager.
 

The fact that the PcEM refuses to work with a "normal" 1.44 MB floppy diskette (fat12grldr.img) that - historically - has booted on *any* system or emulator seems to mean that there is some form of incompatibility between grub4dos and PcEM.

 

No. These errors 17 or 25 did not occur in version 0.4.6a of 2014-01-17 (see post 19), so I would call their appearance in the modified new version a "bug" rather than an "incompatibility".

 

But there is more functionality besides mapping that I might test for the modified version of 2021-04-28 (post 24). An easy thing to do should be to change the active and hidden states of two primary partitions in order to dual-boot systems from either a FAT12 or a FAT16 partition. Also, when I created so many small partitions within the first 32 MiB in post 10 (step 3a), I intended to boot various DOS versions from logical partitions, temporarily registered as primary ones in the partition table using "partnew", see README_GRUB4DOS.txt:

 

 

Besides the mappings in the above section, you may instead choose to create a new primary partition with the PARTNEW command. PARTNEW can generate a primary partition entry (in the partition table) for a logical partition. For example,

    partnew (hd0,3) 0x07 (hd0,4)+1

where the file (hd0,4)+1 stands for the whole partition (hd0,4). This command will create a new primary partition (hd0,3) whose type is 0x07 and whose contents/data is the same as that of the logical partition (hd0,4).

 

But I did not yet get so far. Combining steps that worked, I created a new fixed-sized 1023/16/63 VHD in PCem and partitioned it under MS-DOS 3.31. I created a FAT12 volume of 16 cylinders (<8 MiB) and installed PC-DOS 2.0 to it. I tested it to be bootable. I hid this partition in TinyHexer and, under MS-DOS 3.31, created a second partition of 33 cylinders (>16 MiB, minimum size for FAT16) which I formatted under Windows 10. Then I transferred MS-DOS 7.0 to the second partition without reformatting, using SYS C:. Here's the partition table:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 
01 00 11 0F 3F 0F 3F 00 00 00 C1 3E 00 00 80 00 
01 10 04 0F 3F 30 00 3F 00 00 F0 81 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA 

And MS-DOS 3.31 FDISK's output:

Partition Status   Type  Start  End Size
    1            non-DOS     0   15   16
 C: 2        A   PRI DOS    16   48   33

In VBox, I executed "bootlace 0x80". With C:\GRLDR still missing, in PCem, at reboot, I got the message "Try (hd0,0): non-MS: skip. Try (hd0,1): FAT16: No GRLDR", signaling the file system was recognized. After installation, GRLDR could boot to the Grub4DOS menu. I created partition marker files named "PCD200.ID" and "MSD700.ID" and these MENU.LST entries:

title PC-DOS 2.0
find --set-root /MSD700.ID
hide 
find --set-root /PCD200.ID
unhide 
makeactive
chainloader ()+1

title MS-DOS 7.0
find --set-root /PCD200.ID
hide 
find --set-root /MSD700.ID
unhide 
makeactive
chainloader ()+1

While I could boot MS-DOS 7.0 as expected, PC-DOS 2.0, after the "chainloader ()+1" command, died saying: "Non-System disk or disk error. Replace and strike any key when ready". It was even unbootable after re-installation. The same thing occurred when I repeated the whole installation and partitioned the VHD using FDISK for MS-DOS 7.0, which resulted in slightly different partition sizes. Dual-booting only worked with MS-DOS 3.31 installed to the small FAT12 partition, which is not my preferred choice here.
 

Gerolf


Edited by Gerolf, 06 May 2021 - 11:23 PM.


#36 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 07 May 2021 - 03:09 AM

My first "partnew" experiment was successful. I created an extended partition with a minimum-sized logical partition inside:

Partition Status   Type  Start  End Size
    1            non-DOS     0   15   16
 C: 2        A   PRI DOS    16   48   33
    3            EXT DOS    49 1021  973

Display Logical DOS Drive Information
Drv Start End Size
 D:   49   49    1

Entering the commands "partnew (hd0,3) 0x01 (hd0,4)+1" and "makeactive (hd0,3)" at the Grub4DOS command line provided a 0.5 MiB drive "C:" to which I could install MS-DOS 6.22 using FORMAT C: /S. Booting MS-DOS 6.22 and 7.0 alternatingly was possible with these MENU.LST entries:

title MS-DOS 7.0
partnew (hd0,3) 0 0 0
find --set-root /MSD331.ID
hide 
find --set-root /MSD700.ID
unhide 
makeactive
chainloader ()+1

title MS-DOS 6.22 Logical Partition
partnew (hd0,3) 0x01 (hd0,4)+1
root (hd0,3)
makeactive
chainloader ()+1

I probably cannot use a partition marker file "MSD622.ID" here because it would appear on both logical (hd0,4) and primary (hd0,3) partitions.

 

Gerolf


Edited by Gerolf, 07 May 2021 - 03:19 AM.


#37 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 May 2021 - 08:32 AM

Instead of partnew, for the 6.22 install I would try map --in-situ, if it works :unsure: it is - unlike the effect of partnew, "volatile".

 

 

 

******************************************************************************
*** About the new map option --in-situ ***
******************************************************************************

--in-situ is used with hard drive images or hardrive partitions. With an
in-situ map, we can typically use a logical partition as a primary partition.

In-situ map is a whole drive map. It only virtualize the partition table and
the number of hidden sectors in the BPB of the DOS Boot Record.

While disk emulation may encounter various problems with win9x, the in-situ map
works fine with win9x.

Note that --in-situ will not change the real partition table.

Example:

map --in-situ (hd0,4)+1 (hd0)

 

 

:duff:

Wonko



#38 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 08 May 2021 - 12:14 AM

Steve wrote:

 

 

Use RMPrepUSB - Drive Info - P1 to display contents of partition 1 PBR.
What is the difference between a WIn10 PBR and an an unrecognised PBR?

 

Hallo Steve, thank you for making me look into this detail again, so when reformatting the FAT16 partition in question (the second partition, post 35), I discovered that I have to correct an error I made: Formatting under Windows 10 is indeed NOT required, MS-DOS 5.0 is enough. Only MS-DOS 3.31 and older create a format that is rejected by the installed GRLDR.MBR saying "Try (hd0,1): non-MS: skip".

 

I added the VHD as Virtual Disk in Disk Management, selected "List Hard Disks" in RMPrepUSB Settings, and got the following Drive Info for partition 2:

 

a ) MS-DOS 3.31 ("Try (hd0,1): non-MS"):

COMMAND LINE: DRIVE=8 USBINFO USBSTART=P2 ALLDRIVES SURE 

RMPARTUSB v2.1.739 (c)2017 RM Education plc [SSi]
=================================================

Accessing Drive 8 - "Msft Virtual Disk" (527,966,208 bytes)

Sector at LBA 16128

============= SECTOR DATA ================


[Sector 16128]  7MB
0000 EB 28 90 49 42 4D 20 20 - 33 2E 33 00 02 04 01 00  ë(IBM   3.3.....
0010 02 00 02 F0 81 F8 21 00 - 3F 00 10 00 00 3F 00 00  ...ðø!. ?...?..
0020 00 00 00 00 00 01 00 00 - 00 00 FA 33 ED B8 C0 07  ........ ..ú3í¸À.
0030 8E D8 C4 1E 1C 00 88 16 - FD 01 0A D2 79 08 89 1E  ŽØÄ.ˆ ý..Òy.‰
0040 24 00 8C 06 26 00 8E C5 - 8E D5 BC 00 7C FC 1E 36  $.Œ.&.ŽÅ ŽÕ¼.|ü6
0050 C5 36 78 00 BF 2A 7C B9 - 0B 00 F3 A4 1F C6 06 2E  Å6x.¿*|¹ ..ó¤Æ..
0060 00 0F BF 78 00 B8 2A 7C - AB 91 AB FB 8A 16 FD 01  .¿x.¸*| «‘«ûŠý.
0070 CD 13 A0 10 00 98 F7 26 - 16 00 03 06 0E 00 E8 73  Í .˜÷& ....ès
0080 00 E8 79 00 BB 00 05 53 - E8 A0 00 5F BE 71 01 B9  .èy.»..S è ._¾q.¹
0090 0B 00 90 F3 A6 75 57 83 - C7 15 B1 0B 90 90 F3 A6  ..ó¦uWƒ DZ.ó¦
00A0 75 4C 26 8B 47 1C 99 8B - 0E 0B 00 03 C1 48 F7 F1  uL&‹G™‹ ...ÁH÷ñ
00B0 3D 14 00 7F 02 B0 14 96 - A1 11 00 B1 04 D3 E8 E8  =..°– ¡.±.Óèè
00C0 32 00 FF 36 24 00 C4 1E - 6D 01 E8 30 00 E8 5B 00  2.ÿ6$.Ä m.è0.è[.
00D0 2B F0 76 0D E8 1D 00 52 - F7 26 0B 00 03 D8 5A EB  +ðv.è.R ÷&...ØZë
00E0 E9 5B 8A 2E 15 00 8A 16 - FD 01 FF 2E 6D 01 BE 8B  é[Š..Š ý.ÿ.m.¾‹
00F0 01 EB 54 90 01 06 24 00 - 11 2E 26 00 C3 A1 18 00  .ëT..$. .&.á.
0100 F6 26 1A 00 91 A1 24 00 - 8B 16 26 00 F7 F1 92 8B  ö&.‘¡$. ‹&.÷ñ’‹
0110 0E 18 00 F6 F1 2A CC 91 - FE C5 86 E9 D0 CE D0 CE  .öñ*Ì‘ þņéÐÎÐÎ
0120 0A F1 86 F2 87 CA 8A 16 - FD 01 C3 BF 05 00 B8 01  .ñ†ò‡ÊŠ ý.ÿ..¸.
0130 02 CD 13 72 03 B0 01 C3 - 80 FC 11 74 F8 33 C0 CD  .Ír.°.à €ütø3ÀÍ
0140 13 4F 75 EA BE D5 01 E8 - 1D 00 BE AB 01 E8 17 00  Ouê¾Õ.è .¾«.è.
0150 33 C0 CD 16 36 C7 06 72 - 04 34 12 EA 00 00 FF FF  3ÀÍ6Ç.r .4ê..ÿÿ
0160 B4 0E BB 07 00 CD 10 AC - 3C 24 75 F4 C3 00 00 70  ´»..ͬ <$uôÃ..p
0170 00 49 4F 20 20 20 20 20 - 20 53 59 53 4D 53 44 4F  .IO       SYSMSDO
0180 53 20 20 20 53 59 53 00 - 00 00 00 0A 0D 4E 6F 6E  S   SYS. .....Non
0190 2D 53 79 73 74 65 6D 20 - 64 69 73 6B 20 6F 72 20  -System  disk or 
01A0 64 69 73 6B 20 65 72 72 - 6F 72 24 0A 0D 52 65 70  disk err or$..Rep
01B0 6C 61 63 65 20 61 6E 64 - 20 73 74 72 69 6B 65 20  lace and  strike 
01C0 61 6E 79 20 6B 65 79 20 - 77 68 65 6E 20 72 65 61  any key  when rea
01D0 64 79 0A 0D 24 0A 0D 44 - 69 73 6B 20 62 6F 6F 74  dy..$..D isk boot
01E0 20 66 61 69 6C 75 72 65 - 24 20 20 20 20 20 20 20   failure $       
01F0 20 20 20 20 20 20 20 20 - 20 20 20 20 20 80 55 AA                €Uª

[Sector 16129]  7MB
0200 F8 FF FF FF FF FF 00 00 - 00 00 00 00 00 00 00 00  øÿÿÿÿÿ.. ........
0210 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0220 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0230 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0240 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0250 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0260 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0270 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0280 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0290 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02A0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02B0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02C0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02D0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02E0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0300 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0310 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0320 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0330 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0340 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0350 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0360 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0370 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0380 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0390 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03A0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03B0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03C0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03D0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03E0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........

========= END OF SECTOR DATA ================


Drive 8  Msft Virtual Disk  F/W Rev.=1.0  Serial No.= [ bytes = 00 00 00 00 00 00 00 00 ]
Reported size 527,966,208 bytes (503.5078MiB)  Last LBA 1,031,183
RMPrepUSB Max 518,192,640 bytes (494.1870MiB)  Last LBA 1,012,094

b ) MS-DOS 5.0 ("Try (hd0,1): FAT16"):

COMMAND LINE: DRIVE=8 USBINFO USBSTART=P2 ALLDRIVES SURE 

RMPARTUSB v2.1.739 (c)2017 RM Education plc [SSi]
=================================================

Accessing Drive 8 - "Msft Virtual Disk" (527,966,208 bytes)

Sector at LBA 16128

============= SECTOR DATA ================


[Sector 16128]  7MB
0000 EB 3C 90 4D 53 44 4F 53 - 35 2E 30 00 02 04 01 00  ë<MSDOS 5.0.....
0010 02 00 02 F0 81 F8 21 00 - 3F 00 10 00 00 3F 00 00  ...ðø!. ?...?..
0020 00 00 00 00 80 00 29 1B - 09 68 19 4E 20 20 20 20  ....€.) .hN    
0030 20 20 20 20 20 20 46 41 - 54 31 36 20 20 20 FA 33        FA T16   ú3
0040 C0 8E D0 BC 00 7C 16 07 - BB 78 00 36 C5 37 1E 56  ÀŽÐ¼.|. »x.6Å7V
0050 16 53 BF 3E 7C B9 0B 00 - FC F3 A4 06 1F C6 45 FE  S¿>|¹.. üó¤.ÆEþ
0060 0F 8B 0E 18 7C 88 4D F9 - 89 47 02 C7 07 3E 7C FB  ‹|ˆMù ‰G.Ç.>|û
0070 CD 13 72 79 33 C0 39 06 - 13 7C 74 08 8B 0E 13 7C  Íry3À9. |t.‹|
0080 89 0E 20 7C A0 10 7C F7 - 26 16 7C 03 06 1C 7C 13  ‰ | |÷ &|..|
0090 16 1E 7C 03 06 0E 7C 83 - D2 00 A3 50 7C 89 16 52  |..|ƒ Ò.£P|‰R
00A0 7C A3 49 7C 89 16 4B 7C - B8 20 00 F7 26 11 7C 8B  |£I|‰K| ¸ .÷&|‹
00B0 1E 0B 7C 03 C3 48 F7 F3 - 01 06 49 7C 83 16 4B 7C  .|.ÃH÷ó ..I|ƒK|
00C0 00 BB 00 05 8B 16 52 7C - A1 50 7C E8 92 00 72 1D  .»..‹R| ¡P|è’.r
00D0 B0 01 E8 AC 00 72 16 8B - FB B9 0B 00 BE E6 7D F3  °.è¬.r‹ û¹..¾æ}ó
00E0 A6 75 0A 8D 7F 20 B9 0B - 00 F3 A6 74 18 BE 9E 7D  ¦u. ¹. .ó¦t¾ž}
00F0 E8 5F 00 33 C0 CD 16 5E - 1F 8F 04 8F 44 02 CD 19  è_.3ÀÍ^ .D.Í
0100 58 58 58 EB E8 8B 47 1A - 48 48 8A 1E 0D 7C 32 FF  XXXëè‹G HHŠ.|2ÿ
0110 F7 E3 03 06 49 7C 13 16 - 4B 7C BB 00 07 B9 03 00  ÷ã..I| K|»..¹..
0120 50 52 51 E8 3A 00 72 D8 - B0 01 E8 54 00 59 5A 58  PRQè:.rØ °.èT.YZX
0130 72 BB 05 01 00 83 D2 00 - 03 1E 0B 7C E2 E2 8A 2E  r»...ƒÒ. ..|ââŠ.
0140 15 7C 8A 16 24 7C 8B 1E - 49 7C A1 4B 7C EA 00 00  |Š$|‹ I|¡K|ê..
0150 70 00 AC 0A C0 74 29 B4 - 0E BB 07 00 CD 10 EB F2  p.¬.Àt)´ »..Íëò
0160 3B 16 18 7C 73 19 F7 36 - 18 7C FE C2 88 16 4F 7C  ;|s÷6 |þˆO|
0170 33 D2 F7 36 1A 7C 88 16 - 25 7C A3 4D 7C F8 C3 F9  3Ò÷6|ˆ %|£M|øÃù
0180 C3 B4 02 8B 16 4D 7C B1 - 06 D2 E6 0A 36 4F 7C 8B  ô.‹M|± .Òæ.6O|‹
0190 CA 86 E9 8A 16 24 7C 8A - 36 25 7C CD 13 C3 0D 0A  ʆéŠ$|Š 6%|ÍÃ..
01A0 4E 6F 6E 2D 53 79 73 74 - 65 6D 20 64 69 73 6B 20  Non-Syst em disk 
01B0 6F 72 20 64 69 73 6B 20 - 65 72 72 6F 72 0D 0A 52  or disk  error..R
01C0 65 70 6C 61 63 65 20 61 - 6E 64 20 70 72 65 73 73  eplace a nd press
01D0 20 61 6E 79 20 6B 65 79 - 20 77 68 65 6E 20 72 65   any key  when re
01E0 61 64 79 0D 0A 00 49 4F - 20 20 20 20 20 20 53 59  ady...IO       SY
01F0 53 4D 53 44 4F 53 20 20 - 20 53 59 53 00 00 55 AA  SMSDOS    SYS..Uª

[Sector 16129]  7MB
0200 F8 FF FF FF FF FF FF FF - FF FF 00 00 00 00 00 00  øÿÿÿÿÿÿÿ ÿÿ......
0210 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0220 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0230 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0240 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0250 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0260 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0270 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0280 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0290 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02A0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02B0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02C0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02D0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02E0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0300 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0310 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0320 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0330 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0340 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0350 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0360 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0370 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0380 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0390 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03A0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03B0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03C0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03D0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03E0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........

========= END OF SECTOR DATA ================


FAT16
000B Bytes Per Sector = 512 (0200h)
000D Sectors Per Cluster = 4 (04h)
000E Reserved Sectors before first FAT = 1 (0001h)
0010 Number of FATs = 2 (02h)
0011 Root Entries = 512 (0200h)
0013 Total Log Sectors (small) = 33264 (81F0h)
0015 Media Descriptor = 248 (F8h) HDD
0016 Sectors per FAT table = 33 (0021h)
0018 Sectors per Track = 63 (003Fh)
001A Number of Heads per Cylinder = 16 (0010h)
001C Hidden Sectors preceding Partition = 16128 (00003F00h)
0020 Total Log. Sectors (big) = 0 (00000000h)
0024 Physical Drive Number = 128 (80h) First Fixed Disk
0026 Extended Boot Signature = 41 (29h)
0027 Volume ID Serial No. = 426248475 (1968091Bh)
002B Volume Label = N          
0036 FileSystem Type = FAT16   

First FAT begins at LBA 16129
Second FAT begins at LBA 16162
Root Directory begins at LBA 16195
Cluster 0 begins at LBA 16219
First file data (cluster #2) begins at LBA 16227
Drive 8  Msft Virtual Disk  F/W Rev.=1.0  Serial No.= [ bytes = 00 00 00 00 00 00 00 00 ]
Reported size 527,966,208 bytes (503.5078MiB)  Last LBA 1,031,183
RMPrepUSB Max 518,192,640 bytes (494.1870MiB)  Last LBA 1,012,094

Seems to make quite a difference for RMPrepUSB too.

 

Gerolf



#39 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 08 May 2021 - 02:17 AM

Instead of partnew, for the 6.22 install I would try map --in-situ, if it works :unsure: it is - unlike the effect of partnew, "volatile".

 

This seems to fail. I assume the menu entry should be like this:

title MS-DOS 6.22 Logical Partition / map --in-situ
map --in-situ (hd0,4)+1 (hd0)
map --hook
root (hd0,0)
makeactive
chainloader ()+1

At the Grub4DOS command line, after "partnew (hd0,3) 0 0 0", "geometry" outputs:

drive 0x80(CHS): C/H/S=1022/16/63, Sector Count/Size=1030176/512
   Partition num: 0,  Filesystem type is fat12, partition type 0x11
   Partition num: 1, active, Filesystem type is fat16, partition type 0x04
   Partition num: 4,  Filesystem type is fat12, partition type 0x01
   Partition num: 5,  Filesystem type unknown, partition type 0x06

"map --in-situ (hd0,4)+1 (hd0)" outputs:

FAT12 BPB found with 0xEB (jmp) leading the boot sector.
BPB probed C/H/S = 1/16/63, BPB probed total sectors = 945
probed C/H/S = 1/16/63, probed total sectors = 945

"map --hook" gives no comment. "root (hd0,0)" then hangs with a blinking cursor. Alternatively, after "map --hook", "geometry" instead outputs

drive 0x80(LBA): C/H/S=1/16/63, Sector Count/Size=945/512

and then also hangs with a blinking cursor.

 

Gerolf



#40 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 08 May 2021 - 04:27 PM

Even PC-DOS 4.01 is enough.

Steve wrote:

 

 

The FAT sector has IBM as identifier, so I guess it is correct in that it is a non-MSDOS partition?
Maybe a limitation of grub4dos.

I don't think so. I repeated the test with PC-DOS 5.02 and PC-DOS 4.01, which have "IBM 5.0" and "IBM 4.0" strings in the FAT sector, respectively. Both file systems are accepted by the installed GRLDR.MBR, saying "Try (hd0,1): FAT16".

 

c ) PC-DOS 4.01 ("Try (hd0,1): FAT16"):

COMMAND LINE: DRIVE=8 USBINFO USBSTART=P2 ALLDRIVES SURE 

RMPARTUSB v2.1.739 (c)2017 RM Education plc [SSi]
=================================================

Accessing Drive 8 - "Msft Virtual Disk" (527,966,208 bytes)

Sector at LBA 16128

============= SECTOR DATA ================


[Sector 16128]  7MB
0000 EB 3C 90 49 42 4D 20 20 - 34 2E 30 00 02 04 01 00  ë<IBM   4.0.....
0010 02 00 02 F0 81 F8 21 00 - 3F 00 10 00 00 3F 00 00  ...ðø!. ?...?..
0020 00 00 00 00 80 01 29 1C - 19 10 1A 4E 4F 20 4E 41  ....€.) NO NA
0030 4D 45 20 20 20 20 46 41 - 54 31 36 20 20 20 FA 33  ME    FA T16   ú3
0040 C0 8E D0 BC 00 7C 16 07 - BB 78 00 36 C5 37 1E 56  ÀŽÐ¼.|. »x.6Å7V
0050 16 53 BF 3E 7C B9 0B 00 - FC F3 A4 06 1F C6 45 FE  S¿>|¹.. üó¤.ÆEþ
0060 0F 8B 0E 18 7C 88 4D F9 - 89 47 02 C7 07 3E 7C FB  ‹|ˆMù ‰G.Ç.>|û
0070 CD 13 72 7C 33 C0 39 06 - 13 7C 74 08 8B 0E 13 7C  Ír|3À9. |t.‹|
0080 89 0E 20 7C A0 10 7C F7 - 26 16 7C 03 06 1C 7C 13  ‰ | |÷ &|..|
0090 16 1E 7C 03 06 0E 7C 83 - D2 00 A3 50 7C 89 16 52  |..|ƒ Ò.£P|‰R
00A0 7C A3 49 7C 89 16 4B 7C - B8 20 00 F7 26 11 7C 8B  |£I|‰K| ¸ .÷&|‹
00B0 1E 0B 7C 03 C3 48 F7 F3 - 01 06 49 7C 83 16 4B 7C  .|.ÃH÷ó ..I|ƒK|
00C0 00 BB 00 05 8B 16 52 7C - A1 50 7C E8 87 00 72 20  .»..‹R| ¡P|è‡.r 
00D0 B0 01 E8 A1 00 72 19 8B - FB B9 0B 00 BE DB 7D F3  °.è¡.r‹ û¹..¾Û}ó
00E0 A6 75 0D 8D 7F 20 BE E6 - 7D B9 0B 00 F3 A6 74 18  ¦u. ¾æ }¹..ó¦t
00F0 BE 93 7D E8 51 00 32 E4 - CD 16 5E 1F 8F 04 8F 44  ¾“}èQ.2ä Í^.D
0100 02 CD 19 58 58 58 EB E8 - BB 00 07 B9 03 00 A1 49  .ÍXXXëè »..¹..¡I
0110 7C 8B 16 4B 7C 50 52 51 - E8 3A 00 72 E6 B0 01 E8  |‹K|PRQ è:.ræ°.è
0120 54 00 59 5A 58 72 C9 05 - 01 00 83 D2 00 03 1E 0B  T.YZXrÉ. ..ƒÒ...
0130 7C E2 E2 8A 2E 15 7C 8A - 16 24 7C 8B 1E 49 7C A1  |ââŠ.|Š $|‹I|¡
0140 4B 7C EA 00 00 70 00 AC - 0A C0 74 29 B4 0E BB 07  K|ê..p.¬ .Àt)´».
0150 00 CD 10 EB F2 3B 16 18 - 7C 73 19 F7 36 18 7C FE  .Íëò; |s÷6|þ
0160 C2 88 16 4F 7C 33 D2 F7 - 36 1A 7C 88 16 25 7C A3  ˆO|3Ò÷ 6|ˆ%|£
0170 4D 7C F8 C3 F9 C3 B4 02 - 8B 16 4D 7C B1 06 D2 E6  M|øÃùô. ‹M|±.Òæ
0180 0A 36 4F 7C 8B CA 86 E9 - 8A 16 24 7C 8A 36 25 7C  .6O|‹Ê†é Š$|Š6%|
0190 CD 13 C3 0D 0A 4E 6F 6E - 2D 53 79 73 74 65 6D 20  ÍÃ..Non -System 
01A0 64 69 73 6B 20 6F 72 20 - 64 69 73 6B 20 65 72 72  disk or  disk err
01B0 6F 72 0D 0A 52 65 70 6C - 61 63 65 20 61 6E 64 20  or..Repl ace and 
01C0 70 72 65 73 73 20 61 6E - 79 20 6B 65 79 20 77 68  press an y key wh
01D0 65 6E 20 72 65 61 64 79 - 0D 0A 00 49 42 4D 42 49  en ready ...IBMBI
01E0 4F 20 20 43 4F 4D 49 42 - 4D 44 4F 53 20 20 43 4F  O  COMIB MDOS  CO
01F0 4D 00 00 00 00 00 00 00 - 00 00 00 00 00 00 55 AA  M....... ......Uª

[Sector 16129]  7MB
0200 F8 FF FF FF FF FF FF FF - 00 00 00 00 00 00 00 00  øÿÿÿÿÿÿÿ ........
0210 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0220 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0230 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0240 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0250 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0260 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0270 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0280 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0290 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02A0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02B0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02C0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02D0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02E0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0300 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0310 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0320 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0330 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0340 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0350 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0360 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0370 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0380 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0390 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03A0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03B0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03C0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03D0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03E0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........

========= END OF SECTOR DATA ================


FAT16
000B Bytes Per Sector = 512 (0200h)
000D Sectors Per Cluster = 4 (04h)
000E Reserved Sectors before first FAT = 1 (0001h)
0010 Number of FATs = 2 (02h)
0011 Root Entries = 512 (0200h)
0013 Total Log Sectors (small) = 33264 (81F0h)
0015 Media Descriptor = 248 (F8h) HDD
0016 Sectors per FAT table = 33 (0021h)
0018 Sectors per Track = 63 (003Fh)
001A Number of Heads per Cylinder = 16 (0010h)
001C Hidden Sectors preceding Partition = 16128 (00003F00h)
0020 Total Log. Sectors (big) = 0 (00000000h)
0024 Physical Drive Number = 128 (80h) First Fixed Disk
0026 Extended Boot Signature = 41 (29h)
0027 Volume ID Serial No. = 437262620 (1A10191Ch)
002B Volume Label = NO NAME    
0036 FileSystem Type = FAT16   

First FAT begins at LBA 16129
Second FAT begins at LBA 16162
Root Directory begins at LBA 16195
Cluster 0 begins at LBA 16219
First file data (cluster #2) begins at LBA 16227
Drive 8  Msft Virtual Disk  F/W Rev.=1.0  Serial No.= [ bytes = 00 00 00 00 00 00 00 00 ]
Reported size 527,966,208 bytes (503.5078MiB)  Last LBA 1,031,183
RMPrepUSB Max 518,192,640 bytes (494.1870MiB)  Last LBA 1,012,094

d ) PC-DOS 5.02 ("Try (hd0,1): FAT16"):

COMMAND LINE: DRIVE=8 USBINFO USBSTART=P2 ALLDRIVES SURE 

RMPARTUSB v2.1.739 (c)2017 RM Education plc [SSi]
=================================================

Accessing Drive 8 - "Msft Virtual Disk" (527,966,208 bytes)

Sector at LBA 16128

============= SECTOR DATA ================


[Sector 16128]  7MB
0000 EB 3C 90 49 42 4D 20 20 - 35 2E 30 00 02 04 01 00  ë<IBM   5.0.....
0010 02 00 02 F0 81 F8 21 00 - 3F 00 10 00 00 3F 00 00  ...ðø!. ?...?..
0020 00 00 00 00 80 00 29 FC - 19 29 2B 4E 4F 20 4E 41  ....€.)ü )+NO NA
0030 4D 45 20 20 20 20 46 41 - 54 31 36 20 20 20 FA 33  ME    FA T16   ú3
0040 C0 8E D0 BC 00 7C 16 07 - BB 78 00 36 C5 37 1E 56  ÀŽÐ¼.|. »x.6Å7V
0050 16 53 BF 3E 7C B9 0B 00 - FC F3 A4 06 1F C6 45 FE  S¿>|¹.. üó¤.ÆEþ
0060 0F 8B 0E 18 7C 88 4D F9 - 89 47 02 C7 07 3E 7C FB  ‹|ˆMù ‰G.Ç.>|û
0070 CD 13 72 79 33 C0 39 06 - 13 7C 74 08 8B 0E 13 7C  Íry3À9. |t.‹|
0080 89 0E 20 7C A0 10 7C F7 - 26 16 7C 03 06 1C 7C 13  ‰ | |÷ &|..|
0090 16 1E 7C 03 06 0E 7C 83 - D2 00 A3 50 7C 89 16 52  |..|ƒ Ò.£P|‰R
00A0 7C A3 49 7C 89 16 4B 7C - B8 20 00 F7 26 11 7C 8B  |£I|‰K| ¸ .÷&|‹
00B0 1E 0B 7C 03 C3 48 F7 F3 - 01 06 49 7C 83 16 4B 7C  .|.ÃH÷ó ..I|ƒK|
00C0 00 BB 00 05 8B 16 52 7C - A1 50 7C E8 92 00 72 1D  .»..‹R| ¡P|è’.r
00D0 B0 01 E8 AC 00 72 16 8B - FB B9 0B 00 BE E6 7D F3  °.è¬.r‹ û¹..¾æ}ó
00E0 A6 75 0A 8D 7F 20 B9 0B - 00 F3 A6 74 18 BE 9E 7D  ¦u. ¹. .ó¦t¾ž}
00F0 E8 5F 00 33 C0 CD 16 5E - 1F 8F 04 8F 44 02 CD 19  è_.3ÀÍ^ .D.Í
0100 58 58 58 EB E8 8B 47 1A - 48 48 8A 1E 0D 7C 32 FF  XXXëè‹G HHŠ.|2ÿ
0110 F7 E3 03 06 49 7C 13 16 - 4B 7C BB 00 07 B9 03 00  ÷ã..I| K|»..¹..
0120 50 52 51 E8 3A 00 72 D8 - B0 01 E8 54 00 59 5A 58  PRQè:.rØ °.èT.YZX
0130 72 BB 05 01 00 83 D2 00 - 03 1E 0B 7C E2 E2 8A 2E  r»...ƒÒ. ..|ââŠ.
0140 15 7C 8A 16 24 7C 8B 1E - 49 7C A1 4B 7C EA 00 00  |Š$|‹ I|¡K|ê..
0150 70 00 AC 0A C0 74 29 B4 - 0E BB 07 00 CD 10 EB F2  p.¬.Àt)´ »..Íëò
0160 3B 16 18 7C 73 19 F7 36 - 18 7C FE C2 88 16 4F 7C  ;|s÷6 |þˆO|
0170 33 D2 F7 36 1A 7C 88 16 - 25 7C A3 4D 7C F8 C3 F9  3Ò÷6|ˆ %|£M|øÃù
0180 C3 B4 02 8B 16 4D 7C B1 - 06 D2 E6 0A 36 4F 7C 8B  ô.‹M|± .Òæ.6O|‹
0190 CA 86 E9 8A 16 24 7C 8A - 36 25 7C CD 13 C3 0D 0A  ʆéŠ$|Š 6%|ÍÃ..
01A0 4E 6F 6E 2D 53 79 73 74 - 65 6D 20 64 69 73 6B 20  Non-Syst em disk 
01B0 6F 72 20 64 69 73 6B 20 - 65 72 72 6F 72 0D 0A 52  or disk  error..R
01C0 65 70 6C 61 63 65 20 61 - 6E 64 20 70 72 65 73 73  eplace a nd press
01D0 20 61 6E 79 20 6B 65 79 - 20 77 68 65 6E 20 72 65   any key  when re
01E0 61 64 79 0D 0A 00 49 42 - 4D 42 49 4F 20 20 43 4F  ady...IB MBIO  CO
01F0 4D 49 42 4D 44 4F 53 20 - 20 43 4F 4D 00 00 55 AA  MIBMDOS   COM..Uª

[Sector 16129]  7MB
0200 F8 FF FF FF FF FF FF FF - 00 00 00 00 00 00 00 00  øÿÿÿÿÿÿÿ ........
0210 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0220 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0230 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0240 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0250 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0260 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0270 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0280 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0290 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02A0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02B0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02C0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02D0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02E0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
02F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0300 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0310 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0320 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0330 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0340 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0350 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0360 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0370 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0380 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
0390 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03A0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03B0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03C0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03D0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03E0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........
03F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ........ ........

========= END OF SECTOR DATA ================


FAT16
000B Bytes Per Sector = 512 (0200h)
000D Sectors Per Cluster = 4 (04h)
000E Reserved Sectors before first FAT = 1 (0001h)
0010 Number of FATs = 2 (02h)
0011 Root Entries = 512 (0200h)
0013 Total Log Sectors (small) = 33264 (81F0h)
0015 Media Descriptor = 248 (F8h) HDD
0016 Sectors per FAT table = 33 (0021h)
0018 Sectors per Track = 63 (003Fh)
001A Number of Heads per Cylinder = 16 (0010h)
001C Hidden Sectors preceding Partition = 16128 (00003F00h)
0020 Total Log. Sectors (big) = 0 (00000000h)
0024 Physical Drive Number = 128 (80h) First Fixed Disk
0026 Extended Boot Signature = 41 (29h)
0027 Volume ID Serial No. = 724113916 (2B2919FCh)
002B Volume Label = NO NAME    
0036 FileSystem Type = FAT16   

First FAT begins at LBA 16129
Second FAT begins at LBA 16162
Root Directory begins at LBA 16195
Cluster 0 begins at LBA 16219
First file data (cluster #2) begins at LBA 16227
Drive 8  Msft Virtual Disk  F/W Rev.=1.0  Serial No.= [ bytes = 00 00 00 00 00 00 00 00 ]
Reported size 527,966,208 bytes (503.5078MiB)  Last LBA 1,031,183
RMPrepUSB Max 518,192,640 bytes (494.1870MiB)  Last LBA 1,012,094

Gerolf



#41 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 08 May 2021 - 05:21 PM

RMPrepUSB looks for byte 26h  being value 28h or 29h.

The IBM 3.3 PBR has 00 at byte 26h, so it is not recognised by RMPrepUSB.

Byte 26 was defined starting with MSDOS 4 (extended BPR).

 

grub4dos assembler code looks for 'FAT16' or 'FAT12' string at  address 36h - these bytes are not present in the 'bad' PBRs.

Since the PBR boot code starts at 3ah in your early MSDOS 3 PBRs, you cannot patch the eight bytes required because it would corrupt the boot code.

I would guess that Chenal may say that pre-MSDOS 4 PBRs are not supported. :-(

 

grldrstart.S

2:    
        //fat12/16
        cmpl    $0x31544146, 0x36(%si)        /* fat12/16 Partition?  FAT1 */
        jne     1f                      /* not */
        cmpl    $0x20202032, 0x3a(%si)  /* fat12 Partition? 2 */
        je      4f                      /* yes */
//fat16
        cmpl    $0x20202036, 0x3a(%si)  /* fat16 Partition? 6 */
        je      5f                      /* yes */
3:     
        cmpl    $0x20202020, 07(%si)    /* ntfs Partition? */
        jne     1f


#42 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 09 May 2021 - 12:15 AM

Even FAT12 is enough to get GRLDR.MBR say "Try (hd0,0): FAT12" if only the formatting is done with DOS 4.01 or above (and RMPrepUSB can recognize the PBR data then). This does not help much, though, because PC-DOS 2.0 will only boot if it has formatted the partition by itself. And worse, it will only boot if a DOS MBR is present and will fail to do so after GRLDR.MBR has been bootlace'd. Some bytes in the DOS MBR must be required to boot PC-DOS 2.0. This thought immediately leads to a workaround to fix the dual-boot setup in post # 35: chainload the DOS MBR.

 

I created another fixed-sized 1023/16/63 VHD in PCem and partitioned it under MS-DOS 3.31; just a single, active partition. As before, I created a FAT12 volume of 16 cylinders and installed PC-DOS 2.0 to it. Then I opened the VHD in TinyHexer and saved the first sector to a separate file PCD200.MBR, which I copied to the FAT12 partition of the dual-boot disk in post # 35. I wrote a new MENU.LST entry:

title PC-DOS 2.0 via MBR
partnew (hd0,3) 0 0 0
find --set-root /MSD700.ID
hide 
find --set-root /_PCD200.ID
unhide 
makeactive
chainloader ()/PCD200.MBR

That way I can boot PC-DOS 2.0 from Grub4DOS (well, you cannot tell the kids the whole story of DOS and Windows without PC-DOS 2.0). Now it is not so important if GRLDR cannot be found on partitions formatted under MS-DOS 3.31 or below. The main problem under PCem is that "root" still fails after "map", limiting the multibooting options to switching the active and hidden states of primary partitions and to the "partnew" method (post # 36) that screws up the partition table.
 

Gerolf






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users