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

Closed
opened 2026-03-03 18:48:07 +03:00 by kerem · 2 comments
Owner

Originally created by @eotect on GitHub (May 15, 2024).
Original GitHub issue: https://github.com/oerg866/win98-quickinstall/issues/10

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.

Originally created by @eotect on GitHub (May 15, 2024). Original GitHub issue: https://github.com/oerg866/win98-quickinstall/issues/10 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.
kerem closed this issue 2026-03-03 18:48:08 +03:00
Author
Owner

@oerg866 commented on GitHub (May 16, 2024):

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

<!-- gh-comment-id:2115806101 --> @oerg866 commented on GitHub (May 16, 2024): Perhaps this file has a broken time stamp - could you show me the explorer properties page for that file?
Author
Owner

@oerg866 commented on GitHub (Sep 22, 2024):

Nothing new here, closing.

<!-- gh-comment-id:2365452787 --> @oerg866 commented on GitHub (Sep 22, 2024): Nothing new here, closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/win98-quickinstall#9
No description provided.