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

Install failed with "FAILED TO LOAD COMMAND.COM" #78

Closed
iyzsong opened this issue Apr 12, 2024 · 8 comments
Closed

Install failed with "FAILED TO LOAD COMMAND.COM" #78

iyzsong opened this issue Apr 12, 2024 · 8 comments
Assignees
Labels
bug Something isn't working install The SvarDOS installer

Comments

@iyzsong
Copy link

iyzsong commented Apr 12, 2024

Hello, with svardos-usb.img I can't finish the installation, both on a real hardware and qemu. qemu steps and log are:

wget http://svardos.org/download/20240201/svardos-20240201-usb.zip
unzip svardos-20240201-usb.zip
fallocate -l 1G disk.img

# Then run the installer in qemu
qemu-system-i386 -accel kvm -hda svardos-usb.img -hdb disk.img
# Results:
Format drive D:
Install SvarDOS
Your computer will reboot now.

# Then run qemu with only disk.img
qemu-system-i386 -accel kvm -hda disk.img

# Results:
INSTALLING SVARDOS BUILD SVARDOS
C:\COMMAND.COM > C:\CMD.COM
1 file(s) copied
 appinfo\amb.lsm -> C:\SVARDOS\appinfo\amb.lsm
 doc\amb\amb.txt -> C:\SVARDOS\doc\amb\
 bin\amb.com -> C:\SVARDOS\
Package amb installed: 3 files extracted, 0 errors.
ERR 2, FAILED TO LOAD COMMAND.COM
@bttrx
Copy link
Collaborator

bttrx commented Apr 14, 2024

This problem is caused by POSTINST.BAT making the COMSPEC environment variable point to the wrong drive.

You installed SvarDOS to drive D:, which is no longer present on the -hda disk.img run.

A workaround:

  1. When SVARDOS INSTALLATION displays "Please remove the installation disk from your drive.", don't remove the "disk" (svardos-usb.img), but press any key to reboot.
  2. On the "Welcome to SvarDOS" screen press ESC to quit the installer.
  3. Run C:\SVED.COM C:\TEMP\POSTINST.BAT and in line 4 turn D: into C:
  4. Leave SVED
  5. Turn the machine off
  6. Run qemu-system-i386 -accel kvm -hda disk.img

@bttrx
Copy link
Collaborator

bttrx commented Apr 14, 2024

@mateuszviste

Offending line in install.c is fprintf(fd, "SET COMSPEC=%c:\\CMD.COM\r\n", targetdrv);

Does it make sense to support other drives than C: here? C: is a hard-coded value at several other places, e.g., when creating PKG.CFG.

@mateuszviste
Copy link
Collaborator

Hi Iyzons, thanks for your very detailed report!

And thank you Robert for your investigations. I think you are right and the problem comes from the line you mention. I suppose that last time I tested USB installation it was on FreeCOM, and with it changing COMSPEC does no immediate harm as it is kept loaded in memory all the time.

Having targetdrv there makes no sense indeed, it's clearly a bug. After files are copied to the target drive and the computer is rebooted, the system drive is necessarily C:.

@mateuszviste
Copy link
Collaborator

I have committed the fix as suggested by Robert.

New ("bleeding edge") build 20240414 available on svardos.org. I hope it works. :-)

@bttrx
Copy link
Collaborator

bttrx commented Apr 14, 2024

Build 20240414 worked for me. :-)

@bttrx bttrx added the install The SvarDOS installer label Apr 14, 2024
@mateuszviste
Copy link
Collaborator

Build 20240414 worked for me. :-)

Awesome, thanks for testing! I'm closing the ticket then.

@iyzsong - hopefully it will work for you as well, but of course feel free to reopen the ticket if that's not the case. :)

@bttrx bttrx added the bug Something isn't working label Apr 14, 2024
@iyzsong
Copy link
Author

iyzsong commented Apr 15, 2024

Yes, it works for me too, on a VIA eden box, thanks!

@bttrx
Copy link
Collaborator

bttrx commented Apr 15, 2024

@iyzsong Thanks for your feedback!

roytam1 pushed a commit to roytam1/SvarDOS that referenced this issue Apr 28, 2024
git-svn-id: svn://svn.svardos.org/svardos@1805 911cea91-c70f-4353-bd03-772f58fe8c9d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working install The SvarDOS installer
Projects
None yet
Development

No branches or pull requests

3 participants