LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   OS cannot be loaded without keyboard because of grub (http://www.linuxquestions.org/questions/linux-newbie-8/os-cannot-be-loaded-without-keyboard-because-of-grub-805350/)

linuxn 05-01-2010 02:48 PM

OS cannot be loaded without keyboard because of grub
 
Hello to everyone!

I was working on a linux server before few weeks. There was a grub/keyboard issue. If no keyboard is attached (ps port) the grub isn't loading the operating system. If the keyboard is attached the grub is loading the operating system by default without any keyboard interaction.

The difference is only that there is a keyboard attached. Thats all.

I was searching on the web and one thing came along: "turn on/off 'stop on errors' feature in your bios.". Maybe its this, but tonight I'm not able to check if its this becuase the server is in a remote location.

However I would like to hear what you think of this problem.

Have a good time!

cantab 05-01-2010 05:50 PM

Are you sure you're even reaching grub? As mentioned, many bioses have various options for halt on errors. Halt on "all" means it will stop the POST if there's no keyboard.

fpmurphy 05-01-2010 06:25 PM

Try adding apm=off to the kernel command line in grub.conf.

jstephens84 05-01-2010 06:35 PM

I have to agree I would check to make sure you are even reaching grub. I have never seen this and I run about 24 red hat servers and none of them have a keyboard attached to them. If you are getting this to grub I would do what the other person suggested but use apci=off as I believe apm is older and pretty much no longer used.

linuxn 05-02-2010 01:47 AM

Thank you all for your responses.

@cantab,
Yes. I'm reaching the grub. My customized grub menu shows and it waits for my choice while waiting few seconds for the default option selected. If there's a keyboard attached the default choice is selected. If no keyboard is attached then nothing happens - grub just doesn't load the default option.

@fpmurphy,
I think I tried this before but I'm not sure. I'll post my grub.conf in this response.

@jstephens84,
As I said I reach the grub. I'll try these days with the option you provided and the one from fpmurphy. If its working with one of these options I'll immediately report it here. I'm not using redhat but fedora if there's a difference.

Here is my grub.conf file:

Quote:

default=0
timeout=1
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
password --md5 **********************************

title Server Operating System
root (hd0,0)
kernel /boot/vmlinuz-2.6.33.1.1 ro selinux=0 rhgb quiet
initrd /boot/initrd-2.6.33.1.1.img
Thats all. Have a good day!

keif 05-01-2015 02:26 PM

Hello everyone. I'm hoping to resurrect this thread, since I have been beating my head over the desk trying to figure this issue out myself.

I'm running CentOS. When I boot with the keyboard/mouse plugged in, the unit boots fine and the screen goes straight into the

Code:

"Press any key to enter the menu"

Booting CentOS (2.6.18-274.7.1.e15) in 2 seconds...


But when I unplug the keyboard/mouse and boot, the grub screen shows up with a choice of two kernels to boot from:

Code:

GNU GRUB version 0.97 (630K lower / 1034440K upper memory)

CentOS (2.6.18-274.7.1.e15)
CentOS ((2.6.18-274.e15)

Both of these screens have the CentOS blue backdrop with white flower pattern.

I've tried the suggestions below in /etc/grub.conf

Code:

apci=off
and
apm=off

Still no go. I even removed the titles in /etc/grub.conf, which I figured wouldn't work but I'll try anything at this point. Still having the same issue.

It wouldn't be an issue if the timeout would just work. But as it is now, a user must choose which kernel to boot from when the keyboard/mouse is not plugged in.

If anyone has run into this before, or if you have any suggestions then I would be more than grateful.

Thanks!

Keith

jpollard 05-01-2015 05:15 PM

You might try using the serial console - though that becomes a pain if you try to use a keyboard (it won't work).

Most servers (the ones I used to work with) all had a keyboard/mouse/display connection to a KVM of some kind which is then connected to an administrative net.

Grub legacy has support for a serial console (which is always present as far as I know). If such is defined to be used, it will disable the keyboard/display; but SHOULD allow the timeout to pass directly to boot. Of course, this causes a problem when you DO need to use the keyboard locally.

keif 05-04-2015 12:14 PM

Thank you jpollard for the suggestion. I'm going to give it a try and will get back to you with the results.

keif 05-18-2015 12:25 PM

A solution was found for this issue. Well, I guess it's a trick really.

Assuming you have the unit set up with a static ip...

1) You set the unit to boot to network without having anything available to boot to
2) Have the second boot device to the drive.

Once it finds that there is nothing to boot to, it will try to boot to the secondary boot device (The drive) and when it does this it goes into the default kernel without halting at the duel grub menu.

As long as you have a link on the network interface this will work. If there is no link on the network interface then boot to network will be ignored (PXE) and it will go straight to the drive, where you'll end up at the duel choice grub menu.

In bios enable boot to network, then set it to boot to network as first device (And drive as second), and if there's anything like OPROM LAN, make sure it's set to enable.

I tested this several times and it works like a charm.


NOTE: I would make this as resolved, but I did not start the thread.

Thanks everyone for your help.


All times are GMT -5. The time now is 03:41 AM.