0

For the past few hours I have been following to official Ubuntu guide to setup an Ubuntu server on my Raspberry Pi 3B+ however whenever I boot up the server and sign in it doesn’t connect to the internet, I’ve follows the official guide to fix the sudo nano /etc/netplan/50-cloud-init.yaml file and reboot but nothing will work.

Edit:

Output of lsb_release -d:

Description: Ubuntu 20.04.5 LTS

Output of ip a:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
     inet 127.0.0.1/8 scope host lo 
        valid_lft forever preferred_lft forever
     inet6 ::1/128 scope host
        valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:27:eb:ee:90:91 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_code1 state DOWN group default qlen 1000
    link/ether b8:27:eb:bb:c5:c4 brd ff:ff:ff:ff:ff:ff

Output of cat /etc/netplan/50-cloud-init.yaml:

#This file is generated from information provided by the datasource. Changes
#to it will not persist across an instance reboot. To disable cloud-init’s
#network configuration capabilities, write a file
#/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
#network: {config: disabled}
network:
    version: 2
    wifis:
        renderer: networkd
        wlan0:
            access-points:
                Mywifinetwork
                    password: mypassword
            dhcp4: true
            optional: true

1 Answers1

0

I had the same connectivity issues with my Ubuntu Server on the Raspberry Pi 3B. I resolved it by following these steps. Check them out—they might help you too!

Step 1: Image Configuration

  • Use the Raspberry Pi Imager to create the SD card image.
  • Select the appropriate Raspberry Pi model (3B/3B+/4) as the device.
  • Choose Ubuntu Server 64/32-bit as the operating system.
  • Customize settings such as ID, Password, WiFi, TimeZone, and SSH during the image creation process.

Step 2: Connection to Router/Modem

  • Connect your Raspberry Pi to the router or modem using an Ethernet cable.

Step 3: Identify Raspberry Pi IP

  • Find the IP address assigned to your Raspberry Pi. You can check this information using the modem administrator control panel or tools like Angry IP Scanner. This information is essential for remote connections.

Step 4: Connect via SSH

  • Use an SSH client like Putty to connect to your Raspberry Pi using its IP address.

Step 5: Netplan Configuration

  • Modify the netplan configuration file. Ensure that the indentation is correct (use 2 or 4 spaces, no tabs).
    # This file is generated from information provided by the datasource. Changes
    # to it will not persist across an instance reboot. To disable cloud-init’s
    # network configuration capabilities, write a file
    # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
    # network: {config: disabled}
    network:
        version: 2
        wifis:
            renderer: networkd
            wlan0:
                access-points:
                    Mywifinetwork:
                        password: mypassword
                dhcp4: true
                optional: true
    
  • Run the following commands to apply the changes:
    sudo netplan --debug try
    sudo netplan --debug generate
    sudo netplan --debug apply
    

Step 6: WiFi Connection

  • Disconnect the Raspberry Pi from the modem or router. After these steps, it should be capable of using WiFi.

Note: When powering on the Raspberry Pi, it may take a few minutes before it fully boots up and connects to WiFi. Please be patient during this startup period.