oerg866 / win98-quickinstall

A framework + installer to (very) quickly install Windows 98 on anything from a 486 up to a modern system
223 stars 6 forks source link

Strange filenames triggered an error "OSError: [Errno 22] Invalid argument" #10

Closed eotect closed 1 week ago

eotect commented 4 months ago

I lazily copied a whole windows 98 setup cd to my os_root. Runing:

python sysprep.py --osroot ..\root

Produced an error aborting everythime:

Output root directory: F:\system\win98se\quickinstall\_OUTPUT_
Output image ISO: None
Output image USB: None
Input OS roots: ['..\\root']
Input Extra files: ['_EXTRA_CD_FILES_']
Input Base Drivers: F:\system\win98se\quickinstall\_DRIVER_
Input Extra Drivers: F:\system\win98se\quickinstall\_EXTRA_DRIVER_
Preprocessing drivers...
Preprocessing EXTRA drivers...
Preprocessing SLIPSTREAMED drivers...
Processing OS Root "F:\system\win98se\root"
Windows directory: F:\system\win98se\root\WINDOWS (relative: WINDOWS)
Windows CAB directory: F:\system\win98se\root\cdrom\win98 (relative: cdrom\win98)
Processing system registry...
Stock Windows 9x detected.
Using SHELL32.DLL to reboot!
known unique files: 2, total files 2
Processing system registry...
Stock Windows 9x detected.
Using SHELL32.DLL to reboot!
known unique files: 2, total files 2
SUHDLOG.DAT
Finalizing drivers for this OSRoot...
known unique files: 177, total files 177
Packing system root...
Traceback (most recent call last):
  File "F:\system\win98se\quickinstall\sysprep.py", line 408, in <module>
    mercypak_pack(osroot, os.path.join(output_osroot, 'FULL.866'), mercypak_v2=True)
  File "F:\system\win98se\quickinstall\mercypak.py", line 239, in mercypak_pack
    file_dos_date = dos_date(file_stat.st_mtime)
  File "F:\system\win98se\quickinstall\mercypak.py", line 319, in dos_date
    timestamp = datetime.datetime.utcfromtimestamp(mtime) + mpak_utc_offset
OSError: [Errno 22] Invalid argument

After dig into mercypak.py , I found out that a file name root\cdrom\boot.images\floppy_1.44.00.ima caused the problem. Not sure how to fix it, so I just deleted the file. And everything worked fine.

oerg866 commented 4 months ago

Perhaps this file has a broken time stamp - could you show me the explorer properties page for that file?

oerg866 commented 1 week ago

Nothing new here, closing.