Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patching installation media is not working #3

Closed
rbsamoht opened this issue Jun 17, 2022 · 5 comments
Closed

Patching installation media is not working #3

rbsamoht opened this issue Jun 17, 2022 · 5 comments

Comments

@rbsamoht
Copy link

rbsamoht commented Jun 17, 2022

I tried to patch my installation media for Windows 98 as documented in the README file but it doesn't work for some reason.

System details

  • OS: Ubuntu 22.04 LTS
  • patcher9x v0.6.23-beta2
  • ISO: Windows 98SE

What I tried

I first copied the content of the win98 folder from my Windows 98 CD-ROM to a directory on my system, see the output below:

:~$ ls win98
BASE4.CAB     NET9.CAB      WIN98_32.CAB  WIN98_51.CAB  deltemp.com
BASE5.CAB     OEMSETUP.BIN  WIN98_33.CAB  WIN98_52.CAB  dossetup.bin
BASE6.CAB     OEMSETUP.EXE  WIN98_34.CAB  WIN98_53.CAB  install.exe
CATALOG3.CAB  PRECOPY1.CAB  WIN98_35.CAB  WIN98_54.CAB  install.txt
DRIVER11.CAB  PRECOPY2.CAB  WIN98_36.CAB  WIN98_55.CAB  mini.cab
DRIVER12.CAB  SCANREG.EXE   WIN98_37.CAB  WIN98_56.CAB  ols
DRIVER13.CAB  SUCATREG.EXE  WIN98_38.CAB  WIN98_57.CAB  save32.com
DRIVER14.CAB  SUHELPER.BIN  WIN98_39.CAB  WIN98_58.CAB  scandisk.exe
DRIVER15.CAB  WIN98_21.CAB  WIN98_40.CAB  WIN98_59.CAB  scandisk.pif
DRIVER16.CAB  WIN98_22.CAB  WIN98_41.CAB  WIN98_60.CAB  scanprog.exe
DRIVER17.CAB  WIN98_23.CAB  WIN98_42.CAB  WIN98_61.CAB  setup0.wav
DRIVER18.CAB  WIN98_24.CAB  WIN98_43.CAB  WIN98_62.CAB  setup1.wav
DRIVER19.CAB  WIN98_25.CAB  WIN98_44.CAB  WIN98_63.CAB  setup2.wav
DRIVER20.CAB  WIN98_26.CAB  WIN98_45.CAB  WIN98_64.CAB  smartdrv.exe
EXTRACT.EXE   WIN98_27.CAB  WIN98_46.CAB  WIN98_65.CAB  suback.bin
FORMAT.COM    WIN98_28.CAB  WIN98_47.CAB  WIN98_66.CAB  tour
NET10.CAB     WIN98_29.CAB  WIN98_48.CAB  WIN98_67.CAB  w98setup.bin
NET7.CAB      WIN98_30.CAB  WIN98_49.CAB  WIN98_68.CAB  wb16off.exe
NET8.CAB      WIN98_31.CAB  WIN98_50.CAB  chl99.cab     xmsmmgr.exe

After this, I run:

~$ ./patcher9x win98/
0: cancel execution
1: extract VMM.VXD from VMM32.VXD, patch it and save to VMM32 folder
2: patch VMM.VXD/VMM32.VXD directly
3: do 1 and 2 simultaneously
4: scan *.CAB archives, extract VMM32.VXD and patch it directly [default]
5: extract VMM32.VXD from selected CAB and patch it directly
Choose (0-5):

I assume option 4 should be chosen in that case:

Choose (0-5): 4
ERROR; file "vmm32.vxd" cannot be extracted, cabinet set is incomplete
ERROR; file "vmm32.vxd" cannot be extracted, cabinet set is incomplete
Error: File not found
(trace: patcher9x.c on 1049)
Invalid file operations:
        1: patch.c, 388: fopen(win98//VMM32.VXD, rb)
Patching proccess failure
Press enter to exit...

What am I doing wrong here?

@birdie-github
Copy link

birdie-github commented Jun 18, 2022

I have a similar issue while running the patcher under Windows XP SP3:

C:\patcher9x-0.6.23-win32>patcher9x.exe C:\win98
0: cancel execution
1: extract VMM.VXD from VMM32.VXD, patch it and save to VMM32 folder
2: patch VMM.VXD/VMM32.VXD directly
3: do 1 and 2 simultaneously
4: scan *.CAB archives, extract VMM32.VXD and patch it directly [default]
5: extract VMM32.VXD from selected CAB and patch it directly
Choose (0-5): 4
Error: File not found
(trace: patcher9x.c on 1049)
Invalid file operations:
        1: patch.c, 388: fopen(c:\win98\VMM32.VXD, rb)
Patching proccess failure
Press enter to exit...

The ISO I'm using is:

File Name: en_win98_se_oem.iso (bootable OEM version)
File Size: 655,591,424 bytes (625.22 MB)
Volume Label: Win98 SE
CRC32: D1AF0A78
MD5: 7C32B76E1B8374597CB5EF58A22AA635
SHA-1: FA040CD3F7FD472E9612B1721BC72D7B82538450

Can be downloaded from https://archive.org/download/microsoft-windows-98-second-edition-oem-x05-29232 -> Microsoft Windows 98 Second Edition OEM [X05-29232].iso

Edit: I should have removed the RO flag from files, looks like I've fixed the issue.**

Now I'm going to test the new ISO.

Edit: I've no idea how to put this file back into WIN98_54.CAB (cab files cannot be edited, only extracted and rebuilt - but then Windows 98 spans its files across multiple archives and packing them back in the same order looks like an impossible task). Let's see how this can be worked around.

Edit: everything works, thanks!!

@JHRobotics
Copy link
Owner

@rbsamoht:
It's look like cab files are corrupted. Try extract it with 7zip (you'll need p7zip-full package):

~$ cd win98
~/win98$ 7za e WIN98_21.CAB vmm32.vxd

You can also check archives integrity with 't' command

~/win98$ 7za t WIN98_21.CAB

If archives are OK, please let me know and I'll try to do some deeper testing on Ubuntu (I'm doing main development and testing on Debian/Devuan).

@birdie-github:
Reading from/writing to read only files IS issue, thanks you to report. I'll fix it to next release (hope soon). And yes, replace files in CAB archive is very difficult task - but I hope, the trick which I'm doing (leaving extracted files in install directory) is works in all cases. It isn't as nice as having patched files in original archives, but it works! I'm glad that the rest is works for you :-)

@rbsamoht
Copy link
Author

rbsamoht commented Jun 20, 2022

Hi @JHRobotics, thanks for your answer

Here is what I did to start from a fresh state:

  • Mount the ISO image of Windows 98 SE under the /mnt/cdrom directory
  • cp -r /mnt/cdrom/win98 ~/win98
  • Run the integrity check:
~$ 7za t ~/win98/WIN98_21.CAB

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs 12th Gen Intel(R) Core(TM) i9-12900K (90672),ASM,AES-NI)

Scanning the drive for archives:
1 file, 122880 bytes (120 KiB)

Testing archive: /home/thomas/win98/WIN98_21.CAB
--
Path = /home/thomas/win98/WIN98_21.CAB
Type = Cab
Physical Size = 122880
Total Physical Size = 109655591
Method = LZX:21
Blocks = 183
Volumes = 66
ID = 29755

Everything is Ok

Files: 5422
Size:       300445748
Compressed: 109655591
  • Run patcher:
~$ ./patcher9x win98
0: cancel execution
1: extract VMM.VXD from VMM32.VXD, patch it and save to VMM32 folder
2: patch VMM.VXD/VMM32.VXD directly
3: do 1 and 2 simultaneously
4: scan *.CAB archives, extract VMM32.VXD and patch it directly [default]
5: extract VMM32.VXD from selected CAB and patch it directly
Choose (0-5):
ERROR; file "vmm32.vxd" cannot be extracted, cabinet set is incomplete
ERROR; file "vmm32.vxd" cannot be extracted, cabinet set is incomplete
Error: File not found
(trace: patcher9x.c on 1049)
Invalid file operations:
        1: patch.c, 388: fopen(win98/VMM32.VXD, rb)
Patching proccess failure
Press enter to exit...

I also tried the procedure you suggested:

~$ 7za e win98/WIN98_21.CAB vmm32.vxd

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs 12th Gen Intel(R) Core(TM) i9-12900K (90672),ASM,AES-NI)

Scanning the drive for archives:
1 file, 122880 bytes (120 KiB)

Extracting archive: win98/WIN98_21.CAB
--
Path = win98/WIN98_21.CAB
Type = Cab
Physical Size = 122880
Total Physical Size = 109655591
Method = LZX:21
Blocks = 183
Volumes = 66
ID = 29755

Everything is Ok

Files: 61
Size:       2600468
Compressed: 109655591

Once the file is extracted, I can patch it successfully:

./patcher9x vmm32.vxd
0: cancel execution
1: extract VMM.VXD from VMM32.VXD, patch it and save to VMM32 folder
2: patch VMM.VXD/VMM32.VXD directly [default]
3: do 1 and 2 simultaneously
4: scan *.CAB archives, extract VMM32.VXD and patch it directly
5: extract VMM32.VXD from selected CAB and patch it directly
Choose (0-5):
Patch applied successfully!
Press enter to exit...

Something may be wrong with the scan *.CAB archives, extract VMM32.VXD and patch it directly method. Let me know if you want me to do any other test on my side.
Also note that I was able to do successful installation of Windows 98 using this ISO so I'm almost sure it is not corrupted.

@JHRobotics
Copy link
Owner

Hello @rbsamoht,

thanks for diagnostic and I'm sorry suspected you that you had corrupted CAB archives. I found bug in working with multi-volume cab files - I used to handled them as singled archive, but if file is split between multiple archives it didn't work. Could you test updated version: https://github.com/JHRobotics/patcher9x/releases/tag/v0.6.27 please? I added more diagnostics messages and if it wouldn’t work, we will know about issue more at last.

@rbsamoht
Copy link
Author

Hi @JHRobotics, thanks for the update. No worries for suspecting the corruption of the CAB archive, it could have been a reasonable explanation of the issue.

I was able to successfully test the patch operation with your updated load (v0.6.27):

~$ ./patcher9x win98/
0: cancel execution
1: extract VMM.VXD from VMM32.VXD, patch it and save to VMM32 folder
2: patch VMM.VXD/VMM32.VXD directly
3: do 1 and 2 simultaneously
4: scan *.CAB archives, extract VMM32.VXD and patch it directly [default]
5: extract VMM32.VXD from selected CAB and patch it directly
Choose (0-5):
Extracting vmm32.vxd from multivolume (DRIVER15.CAB - WIN98_68.CAB) ... SUCCESS
Patch applied successfully!
Press enter to exit...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants