1

Just wondering if anyone knows of a way to stop the following boot messages with a centos 6.5 vm created with qemu-kvm

When I start the vm there is a slight delay as the vm posts the following boot messages:

Booting from Hard Disk...  
Press any key to continue.  
Press any key to continue. 
Press any key to continue.  
Press any key to continue. 
Press any key to continue.  

Then after a few of the press any key to continue messages appear the vm boots normally

I would just like to know if there is a way to make the vm boot without pausing briefly for user input.

Anyone got any ideas?

grub menu.lst is

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/vda1
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/vda
default=0
timeout=0
serial --unit=0 --speed=115200
terminal --timeout=0 serial console
title CentOS (2.6.32-431.3.1.el6.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32-431.3.1.el6.x86_64 ro root=UUID=a1b3f6ef-9520-4231-bcae-              13161dba015c rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_GB.UTF-8 rd_NO_MD       console=ttyS0,115200 crashkernel=auto SYSFONT=latarcyrheb-sun16 rd_NO_LVM rd_NO_DM   initrd /boot/initramfs-2.6.32-431.3.1.el6.x86_64.img
Brent
  • 55
  • 1
  • 5

1 Answers1

1

This is the grub timeout which allows you to select an alternate kernel or to change the boot options.

It is governed by the timeout parameters in the /etc/grub.conf configuration file within the virtual guest. The on-line manual info grub has more.

To be correct there are two timeout parameters:

The first is the timeout of selection menu allowing you to select different kernels or alternate systems.

The second timeout parameter is the one for serial redirection, which is what you see when starting a KVM Virtual guest from the commandline.

As the manual says When both the serial port and the attached monitor and keyboard are configured they will both ask for a key to be pressed until the timeout expires. If a key is pressed then the boot menu is displayed to that device. Disconcertingly, the other device sees nothing.

HBruijn
  • 72,524
  • 21
  • 127
  • 192
  • I'm not sure it is or if it is I must be configuring something incorrectly. I have timeout=0 set in the menu.lst which got rid of the traditional screen where you press any key to select an alternative kernel or os to boot. So this seems to be something different – Brent Feb 11 '14 at 10:49
  • there should be a top level `timeout` and then there's another timeout for the serial redirection of the grub output, which is what you see when you boot a VM from the command line. `terminal --timeout=5 serial console`. When you hit `any key` on the serial console during that first 5 seconds all output of the grub boot sequence will be redirected to serial. If you don't you and you would connect to the VNC console you would see the boot output there. – HBruijn Feb 11 '14 at 11:02
  • As the manual says _When both the serial port and the attached monitor and keyboard are configured they will both ask for a key to be pressed until the timeout expires. If a key is pressed then the boot menu is displayed to that device. Disconcertingly, the other device sees nothing._ – HBruijn Feb 11 '14 at 11:04
  • HBruijn thank you for you response so far. just to clarify I have set timeout=0 on top level and at terminal level. Are you saying it also needs to be set on the serial line as well? – Brent Feb 11 '14 at 11:11
  • Never tried it, so I don't know. It would seem the obvious thing to do. – HBruijn Feb 11 '14 at 11:18
  • Doesn't seem to work, still getting prompted for the key press. I'll have more of a look through info grub see if I can come up with a solution – Brent Feb 11 '14 at 11:25
  • HBruijn was correct however my defult install had a /boot/grub/menu.lst and a /boot/grub/grub.conf I was editing the wrong one – Brent Feb 14 '14 at 16:51