How to install Ubuntu Server on your Raspberry Pi

Gaaah. can’t get the indent to display in the comment. See my original comment whihc has it right

1 Like

put triple backticks ``` above and below the pasted text to keep your indendation intact …

2 Likes

Maybe you could tell your users up front that headless will not work for WiFi – at least until you get that fixed?
Saying at the beginning that a headless installation is possible, then saying “it won’t work the first time, just type ‘sudo reboot’ and it will work the second time” sounds like a bad practical joke. Headless means no monitor and no keyboard, so one cannot “just type sudo reboot”. I’ve just wasted a couple hours of my time and I’m less than happy. I would prefer you not make other users unhappy.

1 Like

Unfortunately the fix didn’t make it into groovy’s release (20.10) (or more precisely, the fix that did make it in wasn’t sufficient). However, a (sufficient) fix did make it into hirsute’s release (21.04), though too late for the focal .2 release.

In other words, headless does work for WiFi with the current (21.04) server release. The necessary changes have also been back-ported to focal, but as a first-time boot issue that won’t take effect until the next point-release in August when fresh images are made.

3 Likes

I already read that. And still, your first timer is likely to get the nice stable version of Ubuntu and if they’re doing headless wifi, they’ll run headlong into this issue and may waste considerable time trying to get it to work, or they may conclude that it’s not worth their time and try another distribution. I think it’s worthwhile being upfront with your users about limitations.

A post was split to a new topic: Image does not fill SD card

there is no SSH by default for 20 or 21 version, the ssh file in boot is ignored so no headless possible

Suggest updating the example eth0 address to a valid IP on the /24 subnet. i.e. 192.168.1.23

2 Likes

put dd instructions for people who don’t want to use some other unnecessary program to copy data to a memory card

It’s very easy to set-up a Raspberry Pi to boot from USB. Can you add a section on copying the to a USB drive, or directly installing everything on a USB drive?

If you install without a monitor, you can change user-data-chpasswd-expire :false .

The provided steps don’t work for me with a PI 4, ubuntu 20.04, and a POE hat. No IP ever arrives on the network for me to configure it headlessly.

I see a green light flash somewhat randomly for a few minutes until it appears to have booted, and then no green light after this point at all.

Does Ubuntu suport the POE Hat natively? if not it would be a nice improvement to see.

Also be aware that the ssid is case sensitive, and if you get anything wrong the first time, because cloud-init only tries once, you will need to re-image the card and try again.

Thanks for including the section on configuring a static IP address. I noticed that this section can be improved in 3 aspects:

  1. The example IP addresses given in the text are different from the example IP addresses in the example config file excerpt. This may confuse readers. The example IP addresses should be aligned between descriptive text and config file excerpt.
  2. The choice of IP address and subnet in the config file excerpt is 192.168.101.23/24. The 23/24 part may confuse readers because numbers 23 and 24 are so close, but here they have nothing to do with each other.
  3. The IP address and subnet configuration in the config file excerpt 192.168.101.23/24 will make it impossible for this network interface to reach the gateway4: 192.168.1.1 configured in the next line. The given example should be consistent so that it configures a working static IP setup if given gateway and nameserver actually exist.

I therefore suggest to change the section to read as follows:

Set a static IP

To set a static IP you need to replace the

dhcp4: true

line in the network-config file with lines that specify the intended IP address as well as its default gateway and DNS server. You can do this for either the eth0 or wlan0 interface (or both). It is important that you get the indenting right for this work correctly

For example, if you were planning to give the pi the address 192.168.1.230 in the 192.168.1.0/24 subnet with a default gateway of 192.168.1.1 and a DNS server of 192.168.1.53 then the following text would work. The same structure works for both the eth0 or wlan0 sections in the file:

ethernets:
  eth0:
    addresses:
      - 192.168.1.230/24
    gateway4: 192.168.1.1
    nameservers:
      addresses: [192.168.1.53]
    optional: true

I suggest to change ssh ubuntu@<Raspberry Pi’s IP address> to ssh -o PreferredAuthentications=password ubuntu@<Raspberry Pi’s IP address>. Password is rarely the preferred type of authentication these days. And Raspberry Pi just returns “Too many authentication failures” error.

Two problems :slight_smile:

  1. Isp for Etcher is wrong should be https://www.balena.io not .oi.
  2. Many users with Pi 4B have a SSD or similar, so instructions to install onto that devise would be somewhat handy to put it mildly.

There might be more as I have only got as far as updating the SD card :frowning:

Someone really needs to make changes long the lines suggested by @ ianmacs in October 2021. Anyone who doesn’t know their way around Linux networking configuration and is just trying to follow the instructions verbatim will be hopelessly lost and not get a reachable system. All of the suggestions made in that October post are good.

@wjcarpenter that post is a wiki. YOU can edit it.

It’s a great way to contribute to the Ubuntu community.

2 Likes

I don’t see how. The only thing I see is a link to suggest changes, and that link brings me to this forum thread. But maybe you are looking at a different place than I am. I’m looking at https://ubuntu.com/tutorials/how-to-install-ubuntu-on-your-raspberry-pi. If there’s a way for me to update it directly, I’d be happy to do so.

The ‘edit’ button is at the bottom of the very first post in this thread.

1 Like