I have a CentOS 7 server on Amazon ec2, I'm using the AMI from CentOS.

It takes about 10min to restart the server,

I got this line from the messages log:

Nov 19 14:26:35 XXXXX systemd: Startup finished in 2.034s (kernel) + 10.576s (initrd) + 12.801s (userspace) = 25.413s.

It shows me that there are no hangups in the boot process.

This is rsyslog from messages log:

Nov 19 14:16:14 XXXXX rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="560" x-info="http://www.rsyslog.com"] exiting on signal 15.
Nov 19 14:26:28 XXXXX rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="560" x-info="http://www.rsyslog.com"] start

And it shows that it takes 10min from rsyslog shuts down until it starts again.

What could be making the reboot hang?

Update, I tried to do a reboot again from the EC2 Management Console.
Looking at the system log in the EC2 Management Console it took 5 minutes to go from,

[429844.962972] reboot: machine restart

to the next update.

[H[J[1;1H[?25l[m[H[J[1;1H[20;7H[mUse the ^ and v keys to change the selection. Press 'e' to edit the selected item, or 'c' for a command prompt. [4;80H [7m[4;1H CentOS Linux (3.10.0-229.20.1.el7.x86_64) 7 (Core)

Which looks like the first line of the GRUB boot menu.

It seems like CentOS isn't rebooting the machine at the end, and Amazon waits 4-5 minutes then hard resets the machine.
Amazon Reboot process

  • could it be linked to some dns bad resolution ? something timing out ? Anything network related ? – Pierre-Alain TORET Nov 24 '15 at 13:26
  • @pat I added some more log info to the question. – Ragnar Nov 24 '15 at 15:18

It looks to me like it is actually rebooting fine but is waiting for you to select from the grub menu. When you don't select it after a while it will time out and boot up on whatever the first selection is. Open your grub config and set


then reload grub. That will hopefully take care of it for you.

  • 1
    The GRUB_TIMEOUT is set to 1 sec, so that would not account for the missing 4 minutes. – Ragnar Nov 25 '15 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.