374 words
1 minute
First Pi, New Journey
外观展示
外壳是之后淘的,铝合金CNC,手感很好,肉眼看上去效果很不错,散热比直接给个风扇好一点但不多,可它帅啊!!!

系统安装
新款的Raspberry Pi可以烧录Raspberry Pi OS到SD卡后插上即用。
值得一提的是,它终于把烧录工具更新了,老版本的总是找不到在哪改系统配置,现在成例行流程后确实顺手了许多。


烧录的时候十分建议把Raspberry Pi Connect打开,相当于免费的内网穿透,估计也算在购买费用里面了,来都来了,也挺方便倒是。

加装屏幕
Raspberry Pi 5预留的视频输出口依旧是Micro HDMI,比Mini HDMI还要小一圈,转接头喜加一。
装上这个显示器后,散热直接崩掉,烫手,而且驱动设置不方便,最终还是未使用。
图中从左到右依次是HDMI转Mini HDMI,HDMI转Micro HDMI,触控笔,GPIO屏幕

简单初始化
风扇在默认情况下是45度开始转动,个人觉得烫手,所以首先更改配置让它在低温时也维持一定的转速,脚本如下:
#!/bin/bash
# 定义要添加的内容content="dtparam=cooling_fan=ondtparam=fan_temp0=36000,fan_temp0_hyst=2000,fan_temp0_speed=90dtparam=fan_temp1=40000,fan_temp1_hyst=3000,fan_temp1_speed=150dtparam=fan_temp2=52000,fan_temp2_hyst=4000,fan_temp2_speed=200dtparam=fan_temp3=58000,fan_temp3_hyst=5000,fan_temp3_speed=255"
# 将定义的内容追加到文件末尾echo "$content" | sudo tee -a /boot/firmware/config.txt > /dev/nullecho "内容已成功添加到 /boot/firmware/config.txt"接下来就是更换软件源为国内的软件源,我这里选择的是阿里云的软件源。
#!/bin/bash
sudo systemctl stop packagekit.servicesudo sed 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list -isudo apt update -yDocker在我这是刚需,所以例行装一个。
#!/bin/bash
# 添加 Docker 官方 GPG key:sudo apt-get update -ysudo apt-get install -y ca-certificates curlsudo install -m 0755 -d /etc/apt/keyringssudo curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/debian/gpg -o /etc/apt/keyrings/docker_aliyun.ascsudo chmod a+r /etc/apt/keyrings/docker_aliyun.asc
# 添加仓库到 Apt 源:echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker_aliyun.asc] http://mirrors.aliyun.com/docker-ce/linux/debian \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker_aliyun.list > /dev/nullsudo apt-get update -y
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo groupadd dockersudo usermod -aG docker $USER#!/bin/bash
# 定义要添加的镜像源NEW_MIRRORS='[ "https://docker.1panel.live", "https://hub.rat.dev", "https://docker.1ms.run"]'
# 系统级别配置文件路径CONFIG_FILE="/etc/docker/daemon.json"
# ANSI 转义序列用于颜色输出GREEN='\033[0;32m'RED='\033[0;31m'BLUE='\033[0;34m'NC='\033[0m' # No Color
# 打印带颜色的信息函数print_green() { echo -e "${GREEN}$1${NC}"}
print_red() { echo -e "${RED}$1${NC}"}
print_blue() { echo -e "${BLUE}$1${NC}"}
sudo apt install jq -y
# 检查配置文件是否存在if [ -f "$CONFIG_FILE" ]; then print_blue "配置文件 $CONFIG_FILE 存在。"
# 备份原始配置文件,并添加时间戳 BACKUP_FILE="$CONFIG_FILE.bak.$(date +%Y%m%d%H%M%S)" cp "$CONFIG_FILE" "$BACKUP_FILE" print_green "已备份原始配置文件至 $BACKUP_FILE"
# 读取现有配置 existing_config=$(cat "$CONFIG_FILE")
# 将新的镜像源合并到现有配置中 updated_config=$(echo "$existing_config" | jq --argjson new_mirrors "$NEW_MIRRORS" ' if has("registry-mirrors") then .registry-mirrors += $new_mirrors | unique else . + {registry-mirrors: $new_mirrors} end ')
# 写入更新后的配置 echo "$updated_config" | sudo tee "$CONFIG_FILE" > /dev/null print_green "已成功更新配置文件。"else # 如果文件不存在,则创建新文件并写入镜像源 NEW_CONFIG='{"registry-mirrors": '"$NEW_MIRRORS"'}' echo "$NEW_CONFIG" | sudo tee "$CONFIG_FILE" > /dev/null print_green "已创建新配置文件并添加镜像源。"fi
# 重启 Docker 服务使更改生效sudo systemctl restart dockerprint_green "Docker 服务已重启。" First Pi, New Journey
https://blog.yremmmm.com/posts/raspberry5/ Some information may be outdated









