Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

NO.1
Prerequisites

A TF card with the best possible performance and quality, with as much disk space as possible

This article uses the SanDisk Extreme Pro TF card (128GB), with a read speed of 200m/s and a write speed of 90m/s

If you use a card with relatively lower read/write speeds, it is possible, but the system and application installation will be relatively slower

You will need a TF card reader to input the system onto the TF card

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

A Raspberry Pi 4B (4GB)

2GB is too small, 8GB is a bit more expensive, 4GB is just right

The Raspberry Pi 4B has USB3 and Gigabit Ethernet, which is sufficient for lightweight NAS attempts. If you need long-term stable use, you should have a certain level of technical ability

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

NO.2
Flashing the System

Download the Ubuntu Server 22.04 system

Official website link

https://cn.ubuntu.com/download/raspberry-pi

Remember to choose the 64-bit system

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Download the Raspberry Pi image software

Official website link

https://www.raspberrypi.com/software/

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Open the software

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Select custom image

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Select the image you just downloaded

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Then select the SD card

Note that the size and name of your TF card must match, otherwise do not accidentally format another hard drive

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Then wait for the system to write, verify, and complete

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Prompt that the flashing is complete

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

NO.3
Booting the System

To set up Ubuntu, you will need a bunch of items

For the Raspberry Pi

  1. Connect a display (requires Micro HDMI data cable)

  2. A keyboard is needed (no mouse is required since the Ubuntu server version is installed)

This article uses a video capture card

To transmit the Raspberry Pi’s screen to OBS via data cable, a wireless keyboard and mouse set was specially purchased

OBS download link

https://obsproject.com/

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

OBS capturing screen video display

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Seeing the system boot normally indicates that the system flashing was successful

NO.4
Setting Up the System

Default username and password for Ubuntu

Default username: ubuntu

Default password: ubuntu

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

After the first successful login, you will be prompted to

change to a new password (the new password needs to be confirmed twice)

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

The above is the password for the Ubuntu user

The command to change the root password is

sudo passwd

You will also need to enter the new password and confirm whether it matches twice

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Using the following command, you can switch to the root user

All operations regarding the Raspberry Pi in this article will be deployed under the root user

sudo su

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

This article uses a wired connection via Ethernet, Wi-Fi setup is not described here

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Check the current IP address of the Raspberry Pi

The IP is used to access the Raspberry Pi Ubuntu system via SSH from the computer

Using the command

ip addr

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

Open a terminal on the computer, this article uses the git bash terminal

Note that the computer and Raspberry Pi must be on the same subnet, which can be understood as connected to the same router via Ethernet, or the same Wi-Fi

Use the following command to connect to the Raspberry Pi via SSH

ssh user@ip

This article uses

ubuntu as the username

192.168.1.238 as the internal network address of the Raspberry Pi

ssh [email protected]

On the first SSH attempt, you will be prompted to confirm whether to continue, type yes

Then enter the corresponding password for the ubuntu account to connect

Subsequent commands can be executed on the computer without needing a screen and keyboard for the Raspberry Pi

Setting Up Ubuntu Server 22 on Raspberry Pi 4B for NAS

NO.5
Tips

To summarize

  1. The prerequisites for flashing the Raspberry Pi system are a TF card, a card reader, and a computer

  2. The software and image for flashing the Raspberry Pi system, including the official image download link and tool download link

  3. The steps for using software to flash the Raspberry Pi system (be careful not to accidentally format other disks)

  4. The hardware and software displayed on the Raspberry Pi, including a video capture card (requires a micro HDMI data cable) and OBS open-source software (to capture and display data from the capture card)

  5. The default username and password for the first login to the Raspberry Pi, changing the password, setting the root password, and switching to the root account

  6. Checking the Raspberry Pi’s IP address and accessing it from the computer using SSH

END.

Reference Reading

“Raspberry Pi 4B (Raspberry Pi For NAS): Building a Home Multi-Function NAS”

Click on the bottom to read the original text

You can view the corresponding video demonstration (if there is no video, it may still be under review or recording)

Leave a Comment

Your email address will not be published. Required fields are marked *