You are here
Adrian Moya - Wed, 2010/08/18 - 16:52
Hi guys, I'm giving the final touchs to an appliance, and copied a script to /usr/lib/inithooks/firstboot.d/myscript
myscript reads information from the user to finish configuring the system.
The problem is that when the systems boots the first time, the scripts get executed, but when it ask the first question, it doesn't receive any input. So the appliance hangs there. I'm not getting input from the keyboard. The script works normally if I execute manually in the console. Any ideas?
Forum:
It could be VirtualBox
I've just confirmed that on firstboot of an appliance in virtualbox, at the time those scripts are being executed, there is no keyboard input!
This affects those using virtualbox as hypervisor. Let me check with vmware if this happens...
Not a good idea to make firstboot scripts interactive
However you should keep in mind there isn't always a user behind the console ready to answer your questions. So for the script that installs security updates we implemented a 5 second timeout. If you don't answer by then it defaults to installing them.
When there is no "reasonable" default what we've done instead is either created a di-live installer hook or added a configuration script to /usr/local/bin...Add new comment