Strange question. Right :) I am experimenting with OS4 emulation and I would like to make the installation process more automated for beginners.
I have an hardfile with a script. I want to launch this script right after the OS41FE Classic is installed to this hardfile and the system starts from it for the first time.
Is that possible?
On OS3.x, I would simply place the script to WBStartup... but there is no such drawer in OS4 :)
@amikit Probably it still what RIBDEVIL say, i.e. in os3 it was "On OS3.x, I would simply place the script to WBStartup... but there is no such drawer in OS4 :)" , on os4 that driver removed, and instead WBStartup tool is used, where you write what you want to run and from where manually. I.e. in os3 you put what you need to driver, on os4 you write what you need to run in prefs:wbstartup.
1. I have hardfile with my script 2. I boot the original BootFloppy.adf which runs the installer from the original AmigaOS4.1FE ISO 3. I install the OS to the hardfile (without formatting it), the installer reboots when finished 4. the OS4 boots from the hardfile
The question is how can I make this clean OS launch my script while the OS is booting for the first time?
I tried to copy my own SYS:Prefs/Env-Archive/Sys/wbstartup.prefs to the hardfile BEFORE the OS got installed on it, but the file was overwritten during the OS installation and replaced by the default one.
I also tried to remove a "D" attribute of my wbstartup.prefs so it could not be deleted/overwritten, but the OS installer did not like it and rebooted instead of finishing the installation.
Is there any other way of launching my script? I guess my own s:user-startup would get overwritten too...
You add your script to the WBStartup with WBStartupCTRL from the installation tool. When the system boots, the script will be run, and the last thing the script should do is remove itself again using the WBStartupCTRL tool.
This is how the post install stuff is done on the OS4 Install CD.
Simon
Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such. ---- http://codebench.co.uk
In the 4 steps described above I have no chance to launch WBStartupCTRL or any other program. That's the essence of this puzzle, actually.
All I have is the hardfile to which I can copy some files BEFORE the OS installation takes place.
In OS3.x, I would create a WBStartup drawer on an empty hardfile and copy my script there. And then let the OS install itself. Then my script would be launched automatically even with "clean" OS install.
But what about OS4, is there any chance to execute a file which was present on the hardfile BEFORE the OS installation?
Can you not create the wbstartup.prefs on a running installation and copy that to the hardfile via the installer?
Simon
Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such. ---- http://codebench.co.uk
can you copy over the custom prefs after the installation finishes?
Luckily for you, the system falls back to using the WBStartup drawer if it exists. I guess the solution could be to create that drawer, put your script in it, and when the new installation is run for the first time, it will run the script. The script should then delete itself AND the wbstartup drawer. On the next reboot, the system will boot normally.
Simon
Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such. ---- http://codebench.co.uk
can you copy over the custom prefs after the installation finishes?
I cannot, the OS installer reboots right after it's finished with the installation.
Quote:
Luckily for you, the system falls back to using the WBStartup drawer if it exists.
I almost yelled Hooray! But it seems the system falls back to using the WBStartup drawer if it exists AND the wbstartup.prefs does not exist at the same time...
Right, then I'm sorry, but it looks like there's not much more that can be done. What you are proposing is beyond the scope of the design.
Simon
Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such. ---- http://codebench.co.uk
Yes, it's like that. I just wanted to make it automated. The reason is that OS4 boots to ugly grey Workbench without drivers. Those are delivered to the system by my script, you know.
@AmiKit I don't have a classic Amiga to test it with but this might be possible:
Assuming that the installer is rebooting by calling the OS3 exec ColdReboot() function, write a program that patches the exec ColdReboot() function with code that returns without doing anything. Add that program to the startup-sequence on BootFloppy.adf; placing it just above the line that starts the Installation call. When the reboot doesn't do anything in the Installer, control should return to the startup-sequence on BootFloppy.adf, allowing you to add whatever you want below the Installation call. You should add a program that removes the ColdReboot() patch and calls the real ColdReboot() function so the system works normally.
If you're bold enough to try the wild idea above, you're on your own and don't blame me if your Amiga explodes or crashes. As I mentioned, I don't have a classic Amiga to test the above procedure.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450