how to answer linux bootup questions automatically
hello
I have a some linux boxes that I want to managed them remotely.Some times I have to reboot them duo to some tasks but some times they stop on some boot up questions during boot time like fixing HDD or mount point problems that some body have to press F for example (before starting network and ssh daemons) now I have to wait for some body to access the desktop and press F or some other characters for other questions . I wanted to know is there any config file or any trick to auto answer all the questions? Thanks a lot. |
No .. these problems may occur because the OS or partition is unavailable, they need to be fixed manually
|
I know that it has to fixed manually but it should has some solution to answer those questions automatically . like making some answer file or something like that.
|
Quote:
And think about what you're asking: you're wanting a program to be run, BEFORE the disk is available, and the OS is loaded??? How do you think you'll be able to do that? |
Quote:
|
And what if your partition table is damaged? .. if you think it's possible to write some system diagnostic/self-healing code and fit it in the 446 bytes of the MBR along with the initial boot code, please go right ahead :)
|
Quote:
Sounds like what you really want is a KVM solution so you can access the console remotely. There are kvm solutions that allow you to use the same local monitor/keyboard/mouse for many machines, and there are also solutions that work over IP, so you can be remote but still access the local console. |
Quote:
And if you're getting messages about disks needing to be checked, etc., then chances are you're doing something very wrong when you're shutting the system down, and it's only a matter of time before you won't be able to recover things. Not a Linux problem either...yanking the plug over and over on a Mac or Windows box causes similar problems. |
thank you all of you because of your replies.
It seems that I can not solve my problem this way. let me explain my problem then you suggest me what to do. I made an remote automation system on Linux and run it on an embedded PC and putted it in a place that some times has a high voltage power . when this high voltage power occurs some thing bad happens and /var becomes read only after that mysql stops working the other related processes stop working too so the only way that I have found is to restarting the system but it stops on a simple question for fixing /var and mounting it again and so on ... now what can I do to solve this problem . Thanks a lot. |
Quote:
Kind regards |
To boot your system, assuming you're using GRUB:
Now, the point in all this is that one of the files in the initrd referenced cpio archive is a script describing the steps to be taken to actually boot the system. So, if you uncompress the archive, you can (sometimes) tweak the boot process to do things differently for your system. Again, on most systems, there is a program, mkinitrd that you can use to rebuild your initial RAM disk image containing your tweaks. (See info mkinitrd for details.) For your specific problem, which, from your description, sounds like it is the fsck program being run by your init script after your system has booted from stage 2, loaded your kernel, and started the "after boot" checks. If that's the case, perhaps you should look at your system's init script(s) (typically found in /etc/rc or /etc/rc.d/) to see where fsck is invoked, and change the parameters being used. (See info fsck and the file system specific checker that fsck will invoke for your system for specific options.) |
thanks a lot PTrenholme truly thank you because of your description.
|
You're welcome, but I must confess that the boot description is just a minor paraphrase from the "hacking" section of the info grub file. So the real thanks should be to the GRUB documentation team, not me.
|
Quote:
|
I founded by my self:
there is a file for auto answering it: /etc/default/rcS Quote:
|
All times are GMT -5. The time now is 08:34 AM. |