-
Notifications
You must be signed in to change notification settings - Fork 230
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
core:bootfilename fails when it mentions volume number. #2165
Comments
I disagree that volume identifiers should be considered acceptable if they happen to align with the "start on disk". I think it would be better to explicitly enforce that the string must be a relative path instead of global. The issue is due to how we manage the "start on" disk. Because that is handled at the game settings level, the boot location may change between two different flights of the same vessel. Which would make it so that either "1" or "0" is valid depending on settings. So, if we want to maintain that the boot file must be located on the start up disk we really need to ensure that volume information is not stored in the boot file name. We probably also need some additional documentation to explain the restriction, and to specifically clarify that the relative root is the start up volume, not the current volume or directory. If we want to suggest that vessels are allowed to boot from different disks, that's another discussion entirely. I personally prefer that boot files need to be on the start up volume. I do think that a component of this discussion should/will be addressed when I fix #2121, since we will have more verbose identification of which file the system is attempting to boot from and why it may have failed. |
Actually, fixing #2121 would completely remove any need to demand the boot cannot include an explicit volume identifier. Because if the failure to find the boot file was described at runtime, then say trying to boot from "0:/myarchivefile.ks" when the archive can't be seen would generate an error message at boot time explaining what happened. |
It may be more portable to allow global paths, but I'm not sure that I like the idea still. I'll acknowledge however is that my primary bias that I personally don't like being able to start on and boot from the archive when a communication system is enabled. Given that PXE allows you to do a network boot, I really shouldn't let that bias dominate. |
One of these days I'd like to see us incorporate the signal delay into file operations. Right now we don't. (If you type I think enforcing the no-boot-from-archive is actually trying to fix the problem by attacking one symptom of it instead of by attacking the actual cause of it. |
This should be mentioned on the documentation for BOOTFILENAME. I've dealt with this for several months now, and it has been a pain. After a reboot, I've had to type "RUNPATH(CORE:BOOTFILENAME)." in order to get my code up and running, and I've never (before now) figured out why it wasn't running that command automatically. |
Make a boot file called "1:/runme.ks" (to verify it's on the local volume):
set core:bootfilename to "runme.ks". reboot.
set core:bootfilename to "/runme.ks". reboot.
set core:bootfilename to "1:/runme.ks". reboot.
Explicitly mentioning the "1:" volume number makes it do nothing on boot.
It may make sense to say the boot filename should be local (i.e. that "0:/runme.ks" shouldn't work, maybe.) But it shouldn't fail just because the correct local volume was explicitly mentioned instead of merely implied.
(This was discovered because of some posts in the kOS thread of the Kerbal Space Program forums.)
The text was updated successfully, but these errors were encountered: