18

I just installed Ubuntu Server 20.04.2 LTS and have a situation where it 'hangs' after booting up.

It gets to (what I guess is) the end of the boot process, and hangs on a line saying:

cloud-init [1781]: YYYY-MM-DD HH:MM:SS,182 - cc_final_message.py[WARNING]: Used fallback datasource

The date and time changes with each boot - not sure if the '182' is part of the timestamp - I think it is, since it also changes each time.

Initially, I could press 'Enter' and it would go to login, but now it is just hanging there, and never gets to login.

I can access the server over SSH no problem, and I cannot see anything that is not working once I am in.

I found these from a while back:

https://ubuntuforums.org/showthread.php?t=2446855 https://stackoverflow.com/questions/64486060/cloud-init-not-executing-vra-cloud-config-script

which imply that it is not an issue, but pressing Enter does not get me to the login prompt now which makes me uneasy.

I'm looking for help / suggestions on how to diagnose the issue, and fix it.

Thanks,

Alan.

4
  • 3
    Try with Ctrl-D, it should return to login prompt, although error message will continue to show after booting. If curious, here is an explanation about difference beetween Ctrl-C and Ctrl-D superuser.com/a/169055/510166
    – Pin
    Commented Jul 27, 2021 at 11:47
  • Thanks Pin - I will give that a go if / when it comes up again.
    – Alan
    Commented Jul 30, 2021 at 3:48
  • 1
    I have the same "issue". I just Ctrl + Alt + F4'ed my way to a new window and was able to log in. F1 is the window with the hang up. F2 - F6 are available.
    – sds
    Commented Oct 20, 2021 at 21:53
  • Don't hit enter. Just type in your username, as you're already at the login prompt. All that messaging is just standard error to the console but doesn't affect the fact that you're already at the login prompt.
    – huyz
    Commented Jan 14, 2022 at 10:21

3 Answers 3

7

If you're able to SSH into the machine, then the server has successfully completed the boot cycle but is stuck on that final bit. It's interesting that Enter is no longer bringing you to the login prompt, though. Does Ctrl+C interrupt whatever process is running to allow a login?

One item you may want to look at is disabling the early boot stage as it can sometimes lead to this sort of problem on some server installations depending on the system's configuration. To do this, create an empty file named cloud-init.disabled in the /etc/cloud/ directory:

sudo touch /etc/cloud/cloud-init.disabled

This will not have any negative impact on the system's ability to boot. You can read more about the early boot stages here if there are other settings that you would like to tweak.

1
  • Ctrl-C does not appear to do anything - it does not get me to the login prompt. I 'touched' that filename, rebooted, and it now hangs showing no messages at all - just a blinking cursor (neither Enter nor Ctrl-C do anything still). I can still SSH in fine though.
    – Alan
    Commented Mar 8, 2021 at 6:47
6

I find I have the same issue but found out how to get the console working again. Press CTL-ALT-F2 and you'll get a working console. Interestingly enough, if you return to tty1 with CTL-ALT-F1 you also get a login prompt that works there too.

2
  • Hi Bensod, That does seem to work - you can (almost) always open a new console (maybe one through seven?) by using Ctrl-Alt-F1 through Ctrl-Alt-F7 (or maybe nine - I'm not in front of my machine right now to check). I had forgotten that! Interesting that when you went back, TTY1 was now more functional. Alan.
    – Alan
    Commented May 17, 2021 at 20:33
  • I don't think you need to switch. Just pretend all these messages aren't not there, and you're already at the login prompt. In other words, just type your username; don't hit enter
    – huyz
    Commented Jan 14, 2022 at 10:24
0

In my case, it was a typo when renaming my hostname causing difference between hostname in /etc/hostname and /etc/hosts.

As a result, the computer was unable to resolve its own hostname to "localhost," leading to extremely slow performance at boot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .