[GH-ISSUE #20] msdos.exe crashes when there's an external storage connected to PC #21

Closed
opened 2026-03-03 18:48:14 +03:00 by kerem · 3 comments
Owner

Originally created by @SelfRef on GitHub (Dec 6, 2024).
Original GitHub issue: https://github.com/oerg866/win98-quickinstall/issues/20

Hello, and thanks for this useful project :)

The problem

Since I'm using QuickInstall I sometimes pass by some strange issue that I was not sure first what was caused by. While preparing an ISO image, the executed msdos.exe in Wine is crashing, preventing the ISO to be created. The error looks like this:
image
While the logs show this:

Logs
❯ ./sysprep.py --osroot _OS_ROOT_ --iso winme_install_ready.iso
Output root directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OUTPUT_
Output image ISO: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/winme_install_ready.iso
Output image USB: None
Input OS roots: ['_OS_ROOT_']
Input Extra files: ['_EXTRA_CD_FILES_']
Input Base Drivers: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_DRIVER_
Input Extra Drivers: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_EXTRA_DRIVER_
Preprocessing drivers...
Preprocessing EXTRA drivers...
Preprocessing SLIPSTREAMED drivers...
Processing OS Root "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_"
The specified OS Root "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_" does not contain a "win98qi.inf" file, which would contain the name for the installer menu.
Please enter the name for this installation: 
Windows directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_/WINDOWS (relative: WINDOWS)
Windows CAB directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_/WIN9X (relative: WIN9X)
Processing system registry...
Stock Windows 9x detected.
Using SHELL32.DLL to reboot!
wine: Unhandled exception 0xc0000417 in thread 200 at address 004863A8 (thread 0200), starting debugger...
0210:fixme:dbghelp:elf_search_auxv can't find symbol in module
Traceback (most recent call last):
  File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 376, in <module>
    registry_add_reg(osroot, osroot_windir_relative, slowpnp_reg, slowpnp_866)
  File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 173, in registry_add_reg
    run_regedit('tmp.reg')
  File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 130, in run_regedit
    subprocess.run(['wine', msdos_exe, regedit_exe, '/L:SYSTEM.DAT', '/R:USER.DAT', 'tmp.reg'], check=True, stdout=global_stdout)
  File "/usr/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['wine', '/home/selfref/Projects/Windows98QuickInstall_20241022_1015/tools/msdos.exe', b'Z:\\home\\selfref\\Projects\\Windows98QuickInstall_20241022_1015\\registry\\regedit.exe', '/L:SYSTEM.DAT', '/R:USER.DAT', 'tmp.reg']' returned non-zero exit status 23.

Tried solutions

I've tried to remove ~/.wine directory, try different Wine version and even used Distrobox to run the script in sandboxed Ubuntu 20.04.4 LTS with Wine installed, but it behaved the same.

Workaround and context

At the end, I noticed the issue is related with connected storage devices. I use libvirt to run virtual machine on old hard drives connected via ATA adapter, so I have often HDD connected as well as one or more thumb drives that all are visible as /dev/sdx devices. When at least one of such device is available in my system, the script doesn't work. When I disconnect all /dev/sdx devices, it magically works without any issues. I wonder if only I have this issue or can it be reproduced. The current lsbk output from when last crash happened:

❯ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda           8:0    0   1,3G  0 disk  
├─sda1        8:1    0   1,2G  0 part  /run/media/selfref/1C44-1CFE
└─sda2        8:2    0  59,1M  0 part  
zram0       253:0    0     4G  0 disk  [SWAP]
nvme0n1     259:0    0 953,9G  0 disk  
├─nvme0n1p1 259:1    0   512M  0 part  /boot
└─nvme0n1p2 259:2    0 953,4G  0 part  
  └─root    254:0    0 953,4G  0 crypt /

(/dev/sda is an old HDD, the rest is system drive and swap)

System details

System: Arch Linux
Wine: 9.20
QuickInstall: 0.9.5 (Windows98QuickInstall_20241022_1015.zip from releases)

Originally created by @SelfRef on GitHub (Dec 6, 2024). Original GitHub issue: https://github.com/oerg866/win98-quickinstall/issues/20 Hello, and thanks for this useful project :) ## The problem Since I'm using QuickInstall I sometimes pass by some strange issue that I was not sure first what was caused by. While preparing an ISO image, the executed `msdos.exe` in Wine is crashing, preventing the ISO to be created. The error looks like this: ![image](https://github.com/user-attachments/assets/95ced220-97f1-4489-acbd-680c05ce1171) While the logs show this: <details> <summary>Logs</summary> ```sh ❯ ./sysprep.py --osroot _OS_ROOT_ --iso winme_install_ready.iso Output root directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OUTPUT_ Output image ISO: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/winme_install_ready.iso Output image USB: None Input OS roots: ['_OS_ROOT_'] Input Extra files: ['_EXTRA_CD_FILES_'] Input Base Drivers: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_DRIVER_ Input Extra Drivers: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_EXTRA_DRIVER_ Preprocessing drivers... Preprocessing EXTRA drivers... Preprocessing SLIPSTREAMED drivers... Processing OS Root "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_" The specified OS Root "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_" does not contain a "win98qi.inf" file, which would contain the name for the installer menu. Please enter the name for this installation: Windows directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_/WINDOWS (relative: WINDOWS) Windows CAB directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_/WIN9X (relative: WIN9X) Processing system registry... Stock Windows 9x detected. Using SHELL32.DLL to reboot! wine: Unhandled exception 0xc0000417 in thread 200 at address 004863A8 (thread 0200), starting debugger... 0210:fixme:dbghelp:elf_search_auxv can't find symbol in module Traceback (most recent call last): File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 376, in <module> registry_add_reg(osroot, osroot_windir_relative, slowpnp_reg, slowpnp_866) File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 173, in registry_add_reg run_regedit('tmp.reg') File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 130, in run_regedit subprocess.run(['wine', msdos_exe, regedit_exe, '/L:SYSTEM.DAT', '/R:USER.DAT', 'tmp.reg'], check=True, stdout=global_stdout) File "/usr/lib/python3.12/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['wine', '/home/selfref/Projects/Windows98QuickInstall_20241022_1015/tools/msdos.exe', b'Z:\\home\\selfref\\Projects\\Windows98QuickInstall_20241022_1015\\registry\\regedit.exe', '/L:SYSTEM.DAT', '/R:USER.DAT', 'tmp.reg']' returned non-zero exit status 23. ``` </details> ## Tried solutions I've tried to remove `~/.wine` directory, try different Wine version and even used Distrobox to run the script in sandboxed Ubuntu 20.04.4 LTS with Wine installed, but it behaved the same. ## Workaround and context At the end, I noticed the issue is related with connected storage devices. I use `libvirt` to run virtual machine on old hard drives connected via ATA adapter, so I have often HDD connected as well as one or more thumb drives that all are visible as `/dev/sdx` devices. When at least one of such device is available in my system, the script doesn't work. When I disconnect all `/dev/sdx` devices, it magically works without any issues. I wonder if only I have this issue or can it be reproduced. The current `lsbk` output from when last crash happened: ```sh ❯ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 1,3G 0 disk ├─sda1 8:1 0 1,2G 0 part /run/media/selfref/1C44-1CFE └─sda2 8:2 0 59,1M 0 part zram0 253:0 0 4G 0 disk [SWAP] nvme0n1 259:0 0 953,9G 0 disk ├─nvme0n1p1 259:1 0 512M 0 part /boot └─nvme0n1p2 259:2 0 953,4G 0 part └─root 254:0 0 953,4G 0 crypt / ``` (`/dev/sda` is an old HDD, the rest is system drive and swap) ## System details System: Arch Linux Wine: 9.20 QuickInstall: 0.9.5 (Windows98QuickInstall_20241022_1015.zip from releases)
kerem closed this issue 2026-03-03 18:48:14 +03:00
Author
Owner

@oerg866 commented on GitHub (Dec 6, 2024):

Huuuuuuuh.... Yeah this is one of those strange WINE things that I can't
really figure out...

However, there are a few more things you can try...

Are you familiar at all with the python language?

You may be able to modify the sysprep script to run the required command by
using DOSBox instead of msdos.exe...

I'm currently sick in bed but I can take a look for myself next week.

Best
Eric

On Fri, Dec 6, 2024, 15:09 Kris @.***> wrote:

Hello, and thanks for this useful project :)
The problem

Since I'm using QuickInstall I sometimes pass by some strange issue that I
was not sure first what was caused by. While preparing an ISO image, the
executed msdos.exe in Wine is crashing, preventing the ISO to be created.
The error looks like this:
image.png (view on web)
https://github.com/user-attachments/assets/95ced220-97f1-4489-acbd-680c05ce1171
While the logs show this:
Logs

❯ ./sysprep.py --osroot OS_ROOT --iso winme_install_ready.iso
Output root directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/OUTPUT
Output image ISO: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/winme_install_ready.iso
Output image USB: None
Input OS roots: ['OS_ROOT']
Input Extra files: ['EXTRA_CD_FILES']
Input Base Drivers: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/DRIVER
Input Extra Drivers: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/EXTRA_DRIVER
Preprocessing drivers...
Preprocessing EXTRA drivers...
Preprocessing SLIPSTREAMED drivers...
Processing OS Root "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/OS_ROOT"
The specified OS Root "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/OS_ROOT" does not contain a "win98qi.inf" file, which would contain the name for the installer menu.
Please enter the name for this installation:
Windows directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/OS_ROOT/WINDOWS (relative: WINDOWS)
Windows CAB directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/OS_ROOT/WIN9X (relative: WIN9X)
Processing system registry...
Stock Windows 9x detected.
Using SHELL32.DLL to reboot!
wine: Unhandled exception 0xc0000417 in thread 200 at address 004863A8 (thread 0200), starting debugger...
0210:fixme:dbghelp:elf_search_auxv can't find symbol in moduleTraceback (most recent call last): File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 376, in registry_add_reg(osroot, osroot_windir_relative, slowpnp_reg, slowpnp_866) File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 173, in registry_add_reg run_regedit('tmp.reg') File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 130, in run_regedit subprocess.run(['wine', msdos_exe, regedit_exe, '/L:SYSTEM.DAT', '/R:USER.DAT', 'tmp.reg'], check=True, stdout=global_stdout) File "/usr/lib/python3.12/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args,subprocess.CalledProcessError: Command '['wine', '/home/selfref/Projects/Windows98QuickInstall_20241022_1015/tools/msdos.exe', b'Z:\home\selfref\Projects\Windows98QuickInstall_20241022_1015\registry\regedit.exe', '/L:SYSTEM.DAT', '/R:USER.DAT', 'tmp.reg']' returned non-zero exit status 23.

Tried solutions

I've tried to remove ~/.wine directory, try different Wine version and
even used Distrobox to run the script in sandboxed Ubuntu 20.04.4 LTS with
Wine installed, but it behaved the same.
Workaround and context

At the end, I noticed the issue is related with connected storage devices.
I use libvirt to run virtual machine on old hard drives connected via ATA
adapter, so I have often HDD connected as well as one or more thumb drives
that all are visible as /dev/sdx devices. When at least one of such
device is available on my system, the script doesn't work. When I
disconnect all /dev/sdx devices, it magically works without any issues. I
wonder if only I have this issue or can it be reproduced. The current lsbk
output from when last crash happened:

❯ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1,3G 0 disk
├─sda1 8:1 0 1,2G 0 part /run/media/selfref/1C44-1CFE
└─sda2 8:2 0 59,1M 0 part
zram0 253:0 0 4G 0 disk [SWAP]
nvme0n1 259:0 0 953,9G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot
└─nvme0n1p2 259:2 0 953,4G 0 part
└─root 254:0 0 953,4G 0 crypt /

(/dev/sda is an old HDD, the rest is system drive and swap)
System details

System: Arch Linux
Wine: 9.20
QuickInstall: 0.9.5 (Windows98QuickInstall_20241022_1015.zip from releases)


Reply to this email directly, view it on GitHub
https://github.com/oerg866/win98-quickinstall/issues/20, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAISOPOWHOXKELEE5HZAOD32EGVYTAVCNFSM6AAAAABTEXSHWOVHI2DSMVQWIX3LMV43ASLTON2WKOZSG4ZDGMJVGA2DEOI
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

<!-- gh-comment-id:2523517020 --> @oerg866 commented on GitHub (Dec 6, 2024): Huuuuuuuh.... Yeah this is one of those strange WINE things that I can't really figure out... However, there are a few more things you can try... Are you familiar at all with the python language? You may be able to modify the sysprep script to run the required command by using DOSBox instead of msdos.exe... I'm currently sick in bed but I can take a look for myself next week. Best Eric On Fri, Dec 6, 2024, 15:09 Kris ***@***.***> wrote: > Hello, and thanks for this useful project :) > The problem > > Since I'm using QuickInstall I sometimes pass by some strange issue that I > was not sure first what was caused by. While preparing an ISO image, the > executed msdos.exe in Wine is crashing, preventing the ISO to be created. > The error looks like this: > image.png (view on web) > <https://github.com/user-attachments/assets/95ced220-97f1-4489-acbd-680c05ce1171> > While the logs show this: > Logs > > ❯ ./sysprep.py --osroot _OS_ROOT_ --iso winme_install_ready.iso > Output root directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OUTPUT_ > Output image ISO: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/winme_install_ready.iso > Output image USB: None > Input OS roots: ['_OS_ROOT_'] > Input Extra files: ['_EXTRA_CD_FILES_'] > Input Base Drivers: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_DRIVER_ > Input Extra Drivers: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_EXTRA_DRIVER_ > Preprocessing drivers... > Preprocessing EXTRA drivers... > Preprocessing SLIPSTREAMED drivers... > Processing OS Root "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_" > The specified OS Root "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_" does not contain a "win98qi.inf" file, which would contain the name for the installer menu. > Please enter the name for this installation: > Windows directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_/WINDOWS (relative: WINDOWS) > Windows CAB directory: /home/selfref/Projects/Windows98QuickInstall_20241022_1015/_OS_ROOT_/WIN9X (relative: WIN9X) > Processing system registry... > Stock Windows 9x detected. > Using SHELL32.DLL to reboot! > wine: Unhandled exception 0xc0000417 in thread 200 at address 004863A8 (thread 0200), starting debugger... > 0210:fixme:dbghelp:elf_search_auxv can't find symbol in moduleTraceback (most recent call last): File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 376, in <module> registry_add_reg(osroot, osroot_windir_relative, slowpnp_reg, slowpnp_866) File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 173, in registry_add_reg run_regedit('tmp.reg') File "/home/selfref/Projects/Windows98QuickInstall_20241022_1015/./sysprep.py", line 130, in run_regedit subprocess.run(['wine', msdos_exe, regedit_exe, '/L:SYSTEM.DAT', '/R:USER.DAT', 'tmp.reg'], check=True, stdout=global_stdout) File "/usr/lib/python3.12/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args,subprocess.CalledProcessError: Command '['wine', '/home/selfref/Projects/Windows98QuickInstall_20241022_1015/tools/msdos.exe', b'Z:\\home\\selfref\\Projects\\Windows98QuickInstall_20241022_1015\\registry\\regedit.exe', '/L:SYSTEM.DAT', '/R:USER.DAT', 'tmp.reg']' returned non-zero exit status 23. > > Tried solutions > > I've tried to remove ~/.wine directory, try different Wine version and > even used Distrobox to run the script in sandboxed Ubuntu 20.04.4 LTS with > Wine installed, but it behaved the same. > Workaround and context > > At the end, I noticed the issue is related with connected storage devices. > I use libvirt to run virtual machine on old hard drives connected via ATA > adapter, so I have often HDD connected as well as one or more thumb drives > that all are visible as /dev/sdx devices. When at least one of such > device is available on my system, the script doesn't work. When I > disconnect all /dev/sdx devices, it magically works without any issues. I > wonder if only I have this issue or can it be reproduced. The current lsbk > output from when last crash happened: > > ❯ lsblk > NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS > sda 8:0 0 1,3G 0 disk > ├─sda1 8:1 0 1,2G 0 part /run/media/selfref/1C44-1CFE > └─sda2 8:2 0 59,1M 0 part > zram0 253:0 0 4G 0 disk [SWAP] > nvme0n1 259:0 0 953,9G 0 disk > ├─nvme0n1p1 259:1 0 512M 0 part /boot > └─nvme0n1p2 259:2 0 953,4G 0 part > └─root 254:0 0 953,4G 0 crypt / > > (/dev/sda is an old HDD, the rest is system drive and swap) > System details > > System: Arch Linux > Wine: 9.20 > QuickInstall: 0.9.5 (Windows98QuickInstall_20241022_1015.zip from releases) > > — > Reply to this email directly, view it on GitHub > <https://github.com/oerg866/win98-quickinstall/issues/20>, or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAISOPOWHOXKELEE5HZAOD32EGVYTAVCNFSM6AAAAABTEXSHWOVHI2DSMVQWIX3LMV43ASLTON2WKOZSG4ZDGMJVGA2DEOI> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >
Author
Owner

@SelfRef commented on GitHub (Dec 6, 2024):

That's a good suggestion. I'll definitely try to use DOSBox and share my results, how it works.

<!-- gh-comment-id:2523678891 --> @SelfRef commented on GitHub (Dec 6, 2024): That's a good suggestion. I'll definitely try to use DOSBox and share my results, how it works.
Author
Owner

@oerg866 commented on GitHub (Apr 23, 2025):

No fruther input here; closing

<!-- gh-comment-id:2825730457 --> @oerg866 commented on GitHub (Apr 23, 2025): No fruther input 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#21
No description provided.