3

I am trying to install Ubuntu 20.10 on my raspberry Pi 4 8Gb RAM using a 16 Gb SD card. I have followed this tutorial exactly. I have tried to install it using wlan0 or eth0 by modifying the network-config file as:

#ethernets:
  eth0:
    dhcp4: true
    optional: true
#wifis:
  wlan0:
    dhcp4: true
    optional: true
    access-points:
      "My network":
    password: "My password"

but I am always getting stucked at the cloud-init point. I am getting exactly this: enter image description here

It hangs on until I press enter. Then I get to the login prompt but I can't log in as I type "ubuntu" for both login and password, it returns: "incorrect password". I have seen answers saying to try to ssh into the pi, but I don't get it as my Pi doesn't even have an fixed IP address. So my question is: how should I get over it ? I am completely blocked at that point.

I have also tried other versions as I would initially prefer ubuntu 18.04, but I wasn't able to find any desktop version, and the server version I found doesn't boot properly. My raspberry simply considers there is no SD card

Any help or hint would be much appreciated. Thank you very much

  • FWIW, I'm having this error even without modifying the network-config file, and I've tried user-data files that work on other pis. This is frustrating. – weberc2 Oct 15 '21 at 15:04
  • @weberc2 As far as I can remember, I had an error in the config file. I think there was a space or a tab not in the right place. Be really carefull how you write it. What I had done to "debug" it was removing litterally all elements, until it worked. If necessary, I can find my config file back if you really need it – Joachim Bsh Oct 15 '21 at 15:58
  • I guess I don't know why I would have an error... I haven't touched that file. As far as network-config goes, I'm using whatever file comes with the stock ubuntu image. I've only touched user-data. – weberc2 Oct 15 '21 at 16:06

3 Answers3

3

If the cloud functionality is not required, the cloud-init process can be deactivated!

To do this, the following file must be created:

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

Result in /etc/cloud/:

-rw-r - r-- 1 root root 0 May 19 11:09 pm cloud-init.disabled

If you delete the empty file, cloud-init is started during the boot process again. I hope this helps.

Greetings TopGoal

TopGoal
  • 31
  • 2
0

So after L O N G hours of trying to understand what was going on, I finally got it working. The error was in the network-config file. I had a symbol which was not marked as a comment and hence the cloud-init was not starting correctly because the network-config file had threw an error. However this is NOT mentionned in any status ! There is only a warning. So be extremely carefull at how your network-config file is written. If there is an error there, the cloud-init doesn't boot correctly, and for some reason, both ubuntu login and password are not accepted.

0

There are actually several causes that can result in the ubuntu login loop, see this answer for a more comprehensive list of how to fix it. In my case, the home directory permissions were changed to read-only.

jmarina
  • 1,025
  • 1
  • 11
  • 22