Raspberry Pi Intro
Quick And Easy Way To Install Raspberry Pi OS #raspiSeries — Episode 0
Hi there! Let’s get started with just a Raspberry Pi 4 board and a power connector.
In this episode we will:
Flash the Raspberry Pi OS
onto the SD card
and access it via SSH.
No display or Micro HDMI needed.
Hardware:
Raspberry Pi 4
How to Set Up a Headless System Without Ever Connecting a Monitor!
My System:
OS: Ubuntu 24.04 LTS
Processor: Intel® Core™ i7–9750H × 12 — 8.0 GiB RAMLet's get started!
Let’s get started!
0# step— Buy an SD card like this one:
SDCS2/64GB
microSD Memory Card Canvas Select Plus
Read: 100MB/s — Class 10 with SD Adapter
1# step — Install Raspberry Pi OS using Raspberry Pi Imager; To install on Raspberry Pi OS in a Terminal window, type:
sudo apt install rpi-imager
2# step —Configure the following settings: Raspberry Pi 4, Raspberry Pi OS (64-bit), and select your SD card. Then click Next
:
3# step — Open your Linux terminal and type:
ssh pi@raspberrypi.local
j3@j3-LAPTOP:~$ ssh pi@raspberrypi.local
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
SHA256:9ipBVAynVWVaGNQkO90MnCZlhIiMsqq9Mw8eVZ0/BWY.
Please contact your system administrator.
Add correct host key in /home/j3/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/j3/.ssh/known_hosts:3
remove with:
ssh-keygen -f '/home/j3/.ssh/known_hosts' -R 'raspberrypi.local'
Host key for raspberrypi.local has changed and you have requested strict checking.
Host key verification failed.
j3@j3-LAPTOP:~$ ssh-keygen -f '/home/j3/.ssh/known_hosts' -R 'raspberrypi.local'
# Host raspberrypi.local found: line 2
# Host raspberrypi.local found: line 3
/home/j3/.ssh/known_hosts updated.
Original contents retained as /home/j3/.ssh/known_hosts.old
j3@j3-LAPTOP:~$ ssh pi@raspberrypi.local
The authenticity of host 'raspberrypi.local (192.168.0.114)' can't be established.
ED25519 key fingerprint is SHA256:9ipBVAynVWVaGNQkO90MnCZlhIiMsqq9Mw8eVZ0/BWY.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'raspberrypi.local' (ED25519) to the list of known hosts.
pi@raspberrypi.local's password:
Linux raspberrypi 6.6.31+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jul 3 20:17:36 2024
pi@raspberrypi:~ $
This issue occurred because I already had an entry for the Raspberry Pi in my known_hosts file. If you haven’t accessed it before, you will be prompted with the message, Are you sure you want to continue connecting (yes/no/[fingerprint])?
Simply type “yes” to proceed.
4# step — To update and configure your Raspberry Pi, type:
sudo raspi-config
Here is all my output for your reference:
pi@raspberrypi:~ $ sudo raspi-config
Hit:1 http://deb.debian.org/debian bookworm InRelease
Get:2 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:4 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages [167 kB]
Get:5 http://archive.raspberrypi.com/debian bookworm InRelease [39.0 kB]
Get:6 http://deb.debian.org/debian-security bookworm-security/main armhf Packages [163 kB]
Get:7 http://deb.debian.org/debian-security bookworm-security/main Translation-en [103 kB]
Get:8 http://archive.raspberrypi.com/debian bookworm/main arm64 Packages [440 kB]
Get:9 http://archive.raspberrypi.com/debian bookworm/main armhf Packages [443 kB]
Fetched 1,355 kB in 4s (316 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
^[[3~The following packages will be upgraded:
raspi-config
1 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
Need to get 34.8 kB of archives.
After this operation, 2,048 B of additional disk space will be used.
Get:1 http://archive.raspberrypi.com/debian bookworm/main arm64 raspi-config all 20240708 [34.8 kB]
Fetched 34.8 kB in 1s (37.8 kB/s)
Reading changelogs... Done
(Reading database ... 128147 files and directories currently installed.)
Preparing to unpack .../raspi-config_20240708_all.deb ...
Unpacking raspi-config (20240708) over (20240625) ...
Setting up raspi-config (20240708) ...
Sleeping 5 seconds before reloading raspi-config
Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.
Command (m for help):
Disk /dev/mmcblk0: 58.27 GiB, 62562238464 bytes, 122191872 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc4870184
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 1056767 1048576 512M c W95 FAT32 (LBA)
/dev/mmcblk0p2 1056768 122191871 121135104 57.8G 83 Linux
Command (m for help): Partition number (1,2, default 2):
Partition 2 has been deleted.
Command (m for help): Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-122191871, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (1056768-122191871, default 122191871):
Created a new partition 2 of type 'Linux' and of size 57.8 GiB.
Partition #2 contains a ext4 signature.
Command (m for help):
Disk /dev/mmcblk0: 58.27 GiB, 62562238464 bytes, 122191872 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc4870184
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 1056767 1048576 512M c W95 FAT32 (LBA)
/dev/mmcblk0p2 1056768 122191871 121135104 57.8G 83 Linux
Command (m for help): The partition table has been altered.
Syncing disks.
Created symlink /etc/systemd/system/multi-user.target.wants/wayvnc.service → /lib/systemd/system/wayvnc.service.
Generating locales (this might take a while)...
en_GB.UTF-8... done
pt_BR.UTF-8... done
Generation complete.
Current default time zone: 'America/Porto_Velho'
Local time is now: Sat Aug 10 16:10:21 -04 2024.
Universal Time is now: Sat Aug 10 20:10:21 UTC 2024.
Broadcast message from root@raspberrypi on pts/1 (Sat 2024-08-10 16:11:13 -04):
The system will reboot now!
pi@raspberrypi:~ $ Connection to raspberrypi.local closed by remote host.
Connection to raspberrypi.local closed.
j3@j3-LAPTOP:~$
Rerun the scanner to confirm Raspberry Pi get an ip:
5 # step — Using RealVNC; On Ubuntu Terminal, type:
sudo apt-get update
sudo apt-get install realvnc-vnc-server
6 # step — Some Desktop configuration:
That’s all for now, folks!
In the next episode, we’ll configure the Pi camera.
See you soon!
Bye!
Credits & References
Raspberry Pi OS by raspberrypi.com
Related Posts
Raspberry PI
0#Episode — #raspiSeries — Raspberry Pi Intro — Quick And Easy Way To Install Raspberry Pi OS
1#Episode — #raspiSeries — Raspberry Pi Camera Module — How To Connect the Rpicam, Take Pictures, Record Video, and Apply image effects
2#Episode — #raspiSeries — Raspberry Pi Camera Project — How to Build a Residential Intrusion Detection System
3#Episode — #raspiSeries — Raspberry Pi Camera Project — How to Build a Residential Intrusion Detection System